logo

pleroma-fe

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

password_reset.vue (3155B)


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