logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

password_reset.vue (3116B)


  1. <template>
  2. <div class="settings panel panel-default">
  3. <div class="panel-heading">
  4. {{ $t('password_reset.password_reset') }}
  5. </div>
  6. <div class="panel-body">
  7. <form
  8. class="password-reset-form"
  9. @submit.prevent="submit"
  10. >
  11. <div class="container">
  12. <div v-if="!mailerEnabled">
  13. <p v-if="passwordResetRequested">
  14. {{ $t('password_reset.password_reset_required_but_mailer_is_disabled') }}
  15. </p>
  16. <p v-else>
  17. {{ $t('password_reset.password_reset_disabled') }}
  18. </p>
  19. </div>
  20. <div v-else-if="success || throttled">
  21. <p v-if="success">
  22. {{ $t('password_reset.check_email') }}
  23. </p>
  24. <div class="form-group text-center">
  25. <router-link :to="{name: 'root'}">
  26. {{ $t('password_reset.return_home') }}
  27. </router-link>
  28. </div>
  29. </div>
  30. <div v-else>
  31. <p
  32. v-if="passwordResetRequested"
  33. class="alert password-reset-required error"
  34. >
  35. {{ $t('password_reset.password_reset_required') }}
  36. </p>
  37. <p>
  38. {{ $t('password_reset.instruction') }}
  39. </p>
  40. <div class="form-group">
  41. <input
  42. ref="email"
  43. v-model="user.email"
  44. :disabled="isPending"
  45. :placeholder="$t('password_reset.placeholder')"
  46. class="input form-control"
  47. type="input"
  48. >
  49. </div>
  50. <div class="form-group">
  51. <button
  52. :disabled="isPending"
  53. type="submit"
  54. class="btn button-default btn-block"
  55. >
  56. {{ $t('settings.save') }}
  57. </button>
  58. </div>
  59. </div>
  60. <p
  61. v-if="error"
  62. class="alert error notice-dismissible"
  63. >
  64. <span>{{ error }}</span>
  65. <a
  66. class="fa-scale-110 fa-old-padding dismiss"
  67. @click.prevent="dismissError()"
  68. >
  69. <FAIcon icon="times" />
  70. </a>
  71. </p>
  72. </div>
  73. </form>
  74. </div>
  75. </div>
  76. </template>
  77. <script src="./password_reset.js"></script>
  78. <style lang="scss">
  79. .password-reset-form {
  80. display: flex;
  81. flex-direction: column;
  82. align-items: center;
  83. margin: 0.6em;
  84. .container {
  85. display: flex;
  86. flex: 1 0;
  87. flex-direction: column;
  88. margin-top: 0.6em;
  89. max-width: 18rem;
  90. > * {
  91. min-width: 0;
  92. }
  93. }
  94. .form-group {
  95. display: flex;
  96. flex-direction: column;
  97. margin-bottom: 1em;
  98. padding: 0.3em 0;
  99. line-height: 1.85em;
  100. }
  101. .error {
  102. text-align: center;
  103. animation-name: shakeError;
  104. animation-duration: 0.4s;
  105. animation-timing-function: ease-in-out;
  106. }
  107. .alert {
  108. padding: 0.5em;
  109. margin: 0.3em 0 1em;
  110. }
  111. .notice-dismissible {
  112. padding-right: 2rem;
  113. }
  114. .dismiss {
  115. cursor: pointer;
  116. }
  117. }
  118. </style>