Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/Status.vue
<template> | <template> | ||||
<div v-if="!state.isReady" id="status-box" :class="'p-4 mb-3 rounded process-' + className"> | <div v-if="!state.isReady" id="status-box" :class="'p-4 mb-3 rounded process-' + className"> | ||||
<div v-if="state.step != 'domain-confirmed'" class="d-flex align-items-start"> | <div v-if="state.step != 'domain-confirmed'" class="d-flex align-items-start"> | ||||
<p id="status-body" class="flex-grow-1"> | <p id="status-body" class="flex-grow-1"> | ||||
<span v-if="scope == 'dashboard'">We are preparing your account.</span> | <span v-if="scope == 'dashboard'">We are preparing your account.</span> | ||||
<span v-else-if="scope == 'domain'">We are preparing the domain.</span> | <span v-else-if="scope == 'domain'">We are preparing the domain.</span> | ||||
<span v-else-if="scope == 'distlist'">We are preparing the distribution list.</span> | |||||
<span v-else>We are preparing the user account.</span> | <span v-else>We are preparing the user account.</span> | ||||
<br> | <br> | ||||
Some features may be missing or readonly at the moment.<br> | Some features may be missing or readonly at the moment.<br> | ||||
<span id="refresh-text" v-if="refresh">The process never ends? Press the "Refresh" button, please.</span> | <span id="refresh-text" v-if="refresh">The process never ends? Press the "Refresh" button, please.</span> | ||||
</p> | </p> | ||||
<button v-if="refresh" id="status-refresh" href="#" class="btn btn-secondary" @click="statusRefresh"> | <button v-if="refresh" id="status-refresh" href="#" class="btn btn-secondary" @click="statusRefresh"> | ||||
<svg-icon icon="sync-alt"></svg-icon> Refresh | <svg-icon icon="sync-alt"></svg-icon> Refresh | ||||
</button> | </button> | ||||
</div> | </div> | ||||
<div v-else class="d-flex align-items-start"> | <div v-else class="d-flex align-items-start"> | ||||
<p id="status-body" class="flex-grow-1"> | <p id="status-body" class="flex-grow-1"> | ||||
<span v-if="scope == 'dashboard'">Your account is almost ready.</span> | <span v-if="scope == 'dashboard'">Your account is almost ready.</span> | ||||
<span v-else-if="scope == 'domain'">The domain is almost ready.</span> | <span v-else-if="scope == 'domain'">The domain is almost ready.</span> | ||||
<span v-else-if="scope == 'distlist'">The distribution list is almost ready.</span> | |||||
<span v-else>The user account is almost ready.</span> | <span v-else>The user account is almost ready.</span> | ||||
<br> | <br> | ||||
Verify your domain to finish the setup process. | Verify your domain to finish the setup process. | ||||
</p> | </p> | ||||
<div v-if="scope == 'domain'"> | <div v-if="scope == 'domain'"> | ||||
<button id="status-verify" class="btn btn-secondary text-nowrap" @click="confirmDomain"> | <button id="status-verify" class="btn btn-secondary text-nowrap" @click="confirmDomain"> | ||||
<svg-icon icon="sync-alt"></svg-icon> Verify | <svg-icon icon="sync-alt"></svg-icon> Verify | ||||
</button> | </button> | ||||
▲ Show 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | export default { | ||||
switch (this.scope) { | switch (this.scope) { | ||||
case 'dashboard': | case 'dashboard': | ||||
url = '/api/v4/users/' + this.$store.state.authInfo.id + '/status' | url = '/api/v4/users/' + this.$store.state.authInfo.id + '/status' | ||||
break | break | ||||
case 'domain': | case 'domain': | ||||
url = '/api/v4/domains/' + this.$route.params.domain + '/status' | url = '/api/v4/domains/' + this.$route.params.domain + '/status' | ||||
break | break | ||||
case 'distlist': | |||||
url = '/api/v4/groups/' + this.$route.params.list + '/status' | |||||
break | |||||
default: | default: | ||||
url = '/api/v4/users/' + this.$route.params.user + '/status' | url = '/api/v4/users/' + this.$route.params.user + '/status' | ||||
} | } | ||||
return url | return url | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |