You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.9 KiB

  1. extends ./_layout.pug
  2. block adminContent
  3. .hero
  4. h1.title#title= t('nav.myprofile')
  5. h2.subtitle= t('admin:profile.subtitle')
  6. i.pageicon.nc-icon-outline.business_business-contact-86
  7. .form-sections
  8. .columns.is-gapless
  9. .column.is-two-thirds
  10. admin-profile(inline-template, email=user.email, name=user.name, provider=user.provider)
  11. div
  12. section
  13. label.label= t('admin:profile.email')
  14. p.control.is-fullwidth
  15. input.input(type='text', placeholder=t('admin:profile.email'), value=user.email, disabled)
  16. if user.provider === 'local'
  17. section
  18. label.label= t('admin:profile.password')
  19. p.control.is-fullwidth
  20. input.input(type='password', placeholder=t('admin:profile.password'), value='********', v-model='password')
  21. section
  22. label.label= t('admin:profile.passwordverify')
  23. p.control.is-fullwidth
  24. input.input(type='password', placeholder=t('admin:profile.password'), value='********', v-model='passwordVerify')
  25. section
  26. label.label= t('admin:profile.displayname')
  27. p.control.is-fullwidth
  28. input.input(type='text', placeholder=t('admin:profile.displaynameexample'), v-model='name')
  29. //-section
  30. label.label #{t('admin:profile.tfa')}: #[strong.is-red(v-cloak) {{ tfaStatus }}]
  31. button.button.is-blue(@click='$store.dispatch("modalProfile2fa/open")', :disabled='tfaIsActive')
  32. i.nc-icon-outline.ui-1_circle-add
  33. span= t('admin:profile.tfaenable')
  34. button.button.is-blue(@click='saveUser', :disabled='!tfaIsActive')
  35. i.nc-icon-outline.ui-1_circle-delete
  36. span= t('admin:profile.tfadisable')
  37. section
  38. button.button.is-green(@click='saveUser')
  39. i.nc-icon-outline.ui-1_check
  40. span= t('admin:profile.savechanges')
  41. .column
  42. .panel-aside
  43. label.label= t('admin:profile.provider')
  44. p.control.account-profile-provider
  45. case user.provider
  46. when 'local': i.nc-icon-outline.ui-1_database
  47. when 'windowslive': i.icon-windows2.is-blue
  48. when 'azure': i.icon-windows2.is-blue
  49. when 'google': i.icon-google.is-blue
  50. when 'facebook': i.icon-facebook.is-indigo
  51. when 'github': i.icon-github.is-grey
  52. when 'slack': i.icon-slack.is-purple
  53. when 'ldap': i.icon-arrow-repeat-outline
  54. default: i.icon-warning
  55. = t('auth:providers.' + user.provider)
  56. label.label= t('admin:profile.membersince')
  57. p.control= moment(user.createdAt).format('LL')
  58. label.label= t('admin:profile.lastprofileupdate')
  59. p.control= moment(user.updatedAt).format('LL')
  60. //-modal-profile-2fa