fix(style): password reset pages
This commit is contained in:
parent
acf518a51a
commit
b9f405e52d
|
@ -4,6 +4,9 @@ import type { BackendError } from '~/types'
|
||||||
import { computed, ref, onMounted } from 'vue'
|
import { computed, ref, onMounted } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
|
import Input from '~/components/ui/Input.vue'
|
||||||
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -46,18 +49,14 @@ onMounted(() => {
|
||||||
v-title="labels.confirm"
|
v-title="labels.confirm"
|
||||||
class="main"
|
class="main"
|
||||||
>
|
>
|
||||||
<section class="ui vertical stripe segment">
|
|
||||||
<div class="ui small text container">
|
|
||||||
<h2>{{ labels.confirm }}</h2>
|
<h2>{{ labels.confirm }}</h2>
|
||||||
<form
|
<form
|
||||||
v-if="!success"
|
v-if="!success"
|
||||||
class="ui form"
|
class="ui form"
|
||||||
@submit.prevent="submit()"
|
@submit.prevent="submit()"
|
||||||
>
|
>
|
||||||
<div
|
<Alert red
|
||||||
v-if="errors.length > 0"
|
v-if="errors.length > 0"
|
||||||
role="alert"
|
|
||||||
class="ui negative message"
|
|
||||||
>
|
>
|
||||||
<h4 class="header">
|
<h4 class="header">
|
||||||
{{ t('views.auth.EmailConfirm.header.failure') }}
|
{{ t('views.auth.EmailConfirm.header.failure') }}
|
||||||
|
@ -70,30 +69,29 @@ onMounted(() => {
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</Alert>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="confirmation-code">{{ t('views.auth.EmailConfirm.label.confirmationCode') }}</label>
|
<label for="confirmation-code">{{ t('views.auth.EmailConfirm.label.confirmationCode') }}</label>
|
||||||
<input
|
<Input
|
||||||
id="confirmation-code"
|
id="confirmation-code"
|
||||||
v-model="key"
|
v-model="key"
|
||||||
name="confirmation-code"
|
name="confirmation-code"
|
||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<router-link :to="{path: '/login'}">
|
<router-link :to="{path: '/login'}">
|
||||||
{{ t('views.auth.EmailConfirm.link.back') }}
|
{{ t('views.auth.EmailConfirm.link.back') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<button
|
<Button
|
||||||
:class="['ui', {'loading': isLoading}, 'right', 'floated', 'success', 'button']"
|
:class="['ui', {'loading': isLoading}, 'right', 'floated', 'success', 'button']"
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
{{ labels.confirm }}
|
{{ labels.confirm }}
|
||||||
</button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
<div
|
<Alert green
|
||||||
v-else
|
v-else
|
||||||
class="ui positive message"
|
|
||||||
>
|
>
|
||||||
<h4 class="header">
|
<h4 class="header">
|
||||||
{{ t('views.auth.EmailConfirm.header.success') }}
|
{{ t('views.auth.EmailConfirm.header.success') }}
|
||||||
|
@ -104,8 +102,6 @@ onMounted(() => {
|
||||||
<router-link :to="{name: 'login'}">
|
<router-link :to="{name: 'login'}">
|
||||||
{{ t('views.auth.EmailConfirm.link.login') }}
|
{{ t('views.auth.EmailConfirm.link.login') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</Alert>
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -5,6 +5,10 @@ import { computed, ref, onMounted } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
import Input from '~/components/ui/Input.vue'
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
import Spacer from '~/components/ui/layout/Spacer.vue'
|
||||||
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -48,14 +52,12 @@ onMounted(() => emailInput.value.focus())
|
||||||
v-title="labels.reset"
|
v-title="labels.reset"
|
||||||
class="main"
|
class="main"
|
||||||
>
|
>
|
||||||
<section class="ui vertical stripe segment">
|
|
||||||
<div class="ui small text container">
|
|
||||||
<h2>
|
<h2>
|
||||||
{{ t('views.auth.PasswordReset.header.reset') }}
|
{{ t('views.auth.PasswordReset.header.reset') }}
|
||||||
</h2>
|
</h2>
|
||||||
<form
|
<form
|
||||||
class="ui form"
|
|
||||||
@submit.prevent="submit()"
|
@submit.prevent="submit()"
|
||||||
|
style="max-width: 600px"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="errors.length > 0"
|
v-if="errors.length > 0"
|
||||||
|
@ -79,7 +81,7 @@ onMounted(() => emailInput.value.focus())
|
||||||
</p>
|
</p>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="account-email">{{ t('views.auth.PasswordReset.label.email') }}</label>
|
<label for="account-email">{{ t('views.auth.PasswordReset.label.email') }}</label>
|
||||||
<input
|
<Input
|
||||||
id="account-email"
|
id="account-email"
|
||||||
ref="emailInput"
|
ref="emailInput"
|
||||||
v-model="email"
|
v-model="email"
|
||||||
|
@ -88,19 +90,24 @@ onMounted(() => emailInput.value.focus())
|
||||||
name="email"
|
name="email"
|
||||||
autofocus
|
autofocus
|
||||||
:placeholder="labels.placeholder"
|
:placeholder="labels.placeholder"
|
||||||
>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<router-link :to="{path: '/login'}">
|
<Spacer />
|
||||||
{{ t('views.auth.PasswordReset.link.back') }}
|
<Button
|
||||||
</router-link>
|
:class="['ui', {'loading': isLoading}, 'success', 'button']"
|
||||||
<button
|
|
||||||
:class="['ui', {'loading': isLoading}, 'right', 'floated', 'success', 'button']"
|
|
||||||
type="submit"
|
type="submit"
|
||||||
|
primary
|
||||||
|
auto
|
||||||
>
|
>
|
||||||
{{ t('views.auth.PasswordReset.button.requestReset') }}
|
{{ t('views.auth.PasswordReset.button.requestReset') }}
|
||||||
</button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
:to="{path: '/login'}"
|
||||||
|
ghost
|
||||||
|
auto
|
||||||
|
>
|
||||||
|
{{ t('views.auth.PasswordReset.link.back') }}
|
||||||
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -7,6 +7,8 @@ import { computed, ref } from 'vue'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import PasswordInput from '~/components/forms/PasswordInput.vue'
|
import PasswordInput from '~/components/forms/PasswordInput.vue'
|
||||||
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
defaultToken: string
|
defaultToken: string
|
||||||
|
@ -54,15 +56,13 @@ const submit = async () => {
|
||||||
v-title="labels.changePassword"
|
v-title="labels.changePassword"
|
||||||
class="main"
|
class="main"
|
||||||
>
|
>
|
||||||
<section class="ui vertical stripe segment">
|
|
||||||
<div class="ui small text container">
|
|
||||||
<h2>{{ labels.changePassword }}</h2>
|
<h2>{{ labels.changePassword }}</h2>
|
||||||
<form
|
<form
|
||||||
v-if="!success"
|
v-if="!success"
|
||||||
class="ui form"
|
class="ui form"
|
||||||
@submit.prevent="submit()"
|
@submit.prevent="submit()"
|
||||||
>
|
>
|
||||||
<div
|
<Alert
|
||||||
v-if="errors.length > 0"
|
v-if="errors.length > 0"
|
||||||
role="alert"
|
role="alert"
|
||||||
class="ui negative message"
|
class="ui negative message"
|
||||||
|
@ -78,7 +78,7 @@ const submit = async () => {
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</Alert>
|
||||||
<template v-if="token && uid">
|
<template v-if="token && uid">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="password-field">{{ t('views.auth.PasswordResetConfirm.label.newPassword') }}</label>
|
<label for="password-field">{{ t('views.auth.PasswordResetConfirm.label.newPassword') }}</label>
|
||||||
|
@ -90,12 +90,13 @@ const submit = async () => {
|
||||||
<router-link :to="{path: '/login'}">
|
<router-link :to="{path: '/login'}">
|
||||||
{{ t('views.auth.PasswordResetConfirm.link.back') }}
|
{{ t('views.auth.PasswordResetConfirm.link.back') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
<button
|
<Button
|
||||||
:class="['ui', {'loading': isLoading}, 'right', 'floated', 'success', 'button']"
|
:class="['ui', {'loading': isLoading}, 'right', 'floated', 'success', 'button']"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
auto
|
||||||
>
|
>
|
||||||
{{ t('views.auth.PasswordResetConfirm.button.update') }}
|
{{ t('views.auth.PasswordResetConfirm.button.update') }}
|
||||||
</button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<p>
|
<p>
|
||||||
|
@ -103,9 +104,8 @@ const submit = async () => {
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
</form>
|
</form>
|
||||||
<div
|
<Alert green
|
||||||
v-else
|
v-else
|
||||||
class="ui positive message"
|
|
||||||
>
|
>
|
||||||
<h4 class="header">
|
<h4 class="header">
|
||||||
{{ t('views.auth.PasswordResetConfirm.header.success') }}
|
{{ t('views.auth.PasswordResetConfirm.header.success') }}
|
||||||
|
@ -116,8 +116,6 @@ const submit = async () => {
|
||||||
<router-link :to="{name: 'login'}">
|
<router-link :to="{name: 'login'}">
|
||||||
{{ t('views.auth.PasswordResetConfirm.link.login') }}
|
{{ t('views.auth.PasswordResetConfirm.link.login') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</Alert>
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue