wikijs-fork/server/views/pages/admin/profile.pug

62 lines
2.8 KiB
Plaintext
Raw Normal View History

2016-11-21 01:09:50 +00:00
extends ./_layout.pug
block adminContent
2017-05-21 03:21:16 +00:00
.hero
h1.title#title= t('nav.myprofile')
h2.subtitle= t('admin:profile.subtitle')
.form-sections
.columns.is-gapless
.column.is-two-thirds
admin-profile(inline-template, email=user.email, name=user.name, provider=user.provider)
div
2017-02-10 02:35:37 +00:00
section
2017-05-21 03:21:16 +00:00
label.label= t('admin:profile.email')
2017-02-10 02:35:37 +00:00
p.control.is-fullwidth
2017-05-21 03:21:16 +00:00
input.input(type='text', placeholder=t('admin:profile.email'), value=user.email, disabled)
if user.provider === 'local'
section
label.label= t('admin:profile.password')
p.control.is-fullwidth
input.input(type='password', placeholder=t('admin:profile.password'), value='********', v-model='password')
section
label.label= t('admin:profile.passwordverify')
p.control.is-fullwidth
input.input(type='password', placeholder=t('admin:profile.password'), value='********', v-model='passwordVerify')
2017-02-10 02:35:37 +00:00
section
2017-05-21 03:21:16 +00:00
label.label= t('admin:profile.displayname')
2017-02-10 02:35:37 +00:00
p.control.is-fullwidth
2017-05-21 03:21:16 +00:00
input.input(type='text', placeholder=t('admin:profile.displaynameexample'), v-model='name')
section
2017-06-12 01:11:01 +00:00
label.label #{t('admin:profile.tfa')}: #[strong.is-red(v-cloak) {{ tfaStatus }}]
button.button.is-blue(@click='$store.dispatch("modalProfile2fa/open")', :disabled='tfaIsActive')
2017-06-18 22:35:33 +00:00
i.nc-icon-outline.ui-1_circle-add
2017-06-12 01:11:01 +00:00
span= t('admin:profile.tfaenable')
button.button.is-blue(@click='saveUser', :disabled='!tfaIsActive')
2017-06-18 22:35:33 +00:00
i.nc-icon-outline.ui-1_circle-delete
2017-06-12 01:11:01 +00:00
span= t('admin:profile.tfadisable')
section
button.button.is-green(@click='saveUser')
2017-06-18 22:35:33 +00:00
i.nc-icon-outline.ui-1_check
2017-05-21 03:21:16 +00:00
span= t('admin:profile.savechanges')
.column
.panel-aside
label.label= t('admin:profile.provider')
p.control.account-profile-provider
case user.provider
2017-06-18 22:35:33 +00:00
when 'local': i.nc-icon-outline.ui-1_database
2017-05-21 03:21:16 +00:00
when 'windowslive': i.icon-windows2.is-blue
when 'azure': i.icon-windows2.is-blue
when 'google': i.icon-google.is-blue
when 'facebook': i.icon-facebook.is-indigo
when 'github': i.icon-github.is-grey
when 'slack': i.icon-slack.is-purple
when 'ldap': i.icon-arrow-repeat-outline
default: i.icon-warning
= t('auth:providers.' + user.provider)
label.label= t('admin:profile.membersince')
p.control= moment(user.createdAt).format('LL')
label.label= t('admin:profile.lastprofileupdate')
p.control= moment(user.updatedAt).format('LL')
2017-06-12 01:11:01 +00:00
modal-profile-2fa