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.

51 lines
2.3 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. .form-sections
  7. .columns.is-gapless
  8. .column.is-two-thirds
  9. admin-profile(inline-template, email=user.email, name=user.name, provider=user.provider)
  10. div
  11. section
  12. label.label= t('admin:profile.email')
  13. p.control.is-fullwidth
  14. input.input(type='text', placeholder=t('admin:profile.email'), value=user.email, disabled)
  15. if user.provider === 'local'
  16. section
  17. label.label= t('admin:profile.password')
  18. p.control.is-fullwidth
  19. input.input(type='password', placeholder=t('admin:profile.password'), value='********', v-model='password')
  20. section
  21. label.label= t('admin:profile.passwordverify')
  22. p.control.is-fullwidth
  23. input.input(type='password', placeholder=t('admin:profile.password'), value='********', v-model='passwordVerify')
  24. section
  25. label.label= t('admin:profile.displayname')
  26. p.control.is-fullwidth
  27. input.input(type='text', placeholder=t('admin:profile.displaynameexample'), v-model='name')
  28. section
  29. button.button.is-green(v-on:click='saveUser')
  30. i.icon-check
  31. span= t('admin:profile.savechanges')
  32. .column
  33. .panel-aside
  34. label.label= t('admin:profile.provider')
  35. p.control.account-profile-provider
  36. case user.provider
  37. when 'local': i.icon-server
  38. when 'windowslive': i.icon-windows2.is-blue
  39. when 'azure': i.icon-windows2.is-blue
  40. when 'google': i.icon-google.is-blue
  41. when 'facebook': i.icon-facebook.is-indigo
  42. when 'github': i.icon-github.is-grey
  43. when 'slack': i.icon-slack.is-purple
  44. when 'ldap': i.icon-arrow-repeat-outline
  45. default: i.icon-warning
  46. = t('auth:providers.' + user.provider)
  47. label.label= t('admin:profile.membersince')
  48. p.control= moment(user.createdAt).format('LL')
  49. label.label= t('admin:profile.lastprofileupdate')
  50. p.control= moment(user.updatedAt).format('LL')