feat: 2FA UI + modal

This commit is contained in:
NGPixel
2017-06-11 21:11:01 -04:00
committed by Nicolas Giard
parent d7992a5e19
commit 879ca63be5
14 changed files with 147 additions and 40 deletions

View File

@@ -1,25 +0,0 @@
.modal(v-bind:class='{ "is-active": upgradeModal.state }')
.modal-background
.modal-container
.modal-content
template(v-if='upgradeModal.step === "running"')
header.is-blue Install
section.modal-loading
i
span Wiki.js {{ upgradeModal.mode }} in progress...
em Please wait
template(v-if='upgradeModal.step === "error"')
header.is-red Installation Error
section.modal-loading
span {{ upgradeModal.error }}
footer
a.button.is-grey.is-outlined(v-on:click='upgradeCancel') Abort
a.button.is-deep-orange(v-on:click='upgradeStart') Try Again
template(v-if='upgradeModal.step === "confirm"')
header.is-deep-orange Are you sure?
section
label.label You are about to {{ upgradeModal.mode }} Wiki.js.
span.note You will not be able to access your wiki during the operation. Content will not be affected. However, it is your responsability to ensure you have a backup in the unexpected event content gets lost or corrupted.
footer
a.button.is-grey.is-outlined(v-on:click='upgradeCancel') Abort
a.button.is-deep-orange(v-on:click='upgradeStart') Start

View File

@@ -27,7 +27,15 @@ block adminContent
p.control.is-fullwidth
input.input(type='text', placeholder=t('admin:profile.displaynameexample'), v-model='name')
section
button.button.is-green(v-on:click='saveUser')
label.label #{t('admin:profile.tfa')}: #[strong.is-red(v-cloak) {{ tfaStatus }}]
button.button.is-blue(@click='$store.dispatch("modalProfile2fa/open")', :disabled='tfaIsActive')
i.icon-circle-plus
span= t('admin:profile.tfaenable')
button.button.is-blue(@click='saveUser', :disabled='!tfaIsActive')
i.icon-circle-minus
span= t('admin:profile.tfadisable')
section
button.button.is-green(@click='saveUser')
i.icon-check
span= t('admin:profile.savechanges')
.column
@@ -49,3 +57,5 @@ block adminContent
p.control= moment(user.createdAt).format('LL')
label.label= t('admin:profile.lastprofileupdate')
p.control= moment(user.updatedAt).format('LL')
modal-profile-2fa