summaryrefslogtreecommitdiff
path: root/packages/client/src/pages/reset-password.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/pages/reset-password.vue')
-rw-r--r--packages/client/src/pages/reset-password.vue43
1 files changed, 24 insertions, 19 deletions
diff --git a/packages/client/src/pages/reset-password.vue b/packages/client/src/pages/reset-password.vue
index b3e2ca8d6f..39a1191caf 100644
--- a/packages/client/src/pages/reset-password.vue
+++ b/packages/client/src/pages/reset-password.vue
@@ -1,14 +1,17 @@
<template>
-<MkSpacer v-if="token" :content-max="700" :margin-min="16" :margin-max="32">
- <div class="_formRoot">
- <FormInput v-model="password" type="password" class="_formBlock">
- <template #prefix><i class="fas fa-lock"></i></template>
- <template #label>{{ i18n.ts.newPassword }}</template>
- </FormInput>
+<MkStickyContainer>
+ <template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
+ <MkSpacer v-if="token" :content-max="700" :margin-min="16" :margin-max="32">
+ <div class="_formRoot">
+ <FormInput v-model="password" type="password" class="_formBlock">
+ <template #prefix><i class="fas fa-lock"></i></template>
+ <template #label>{{ i18n.ts.newPassword }}</template>
+ </FormInput>
- <FormButton primary class="_formBlock" @click="save">{{ i18n.ts.save }}</FormButton>
- </div>
-</MkSpacer>
+ <FormButton primary class="_formBlock" @click="save">{{ i18n.ts.save }}</FormButton>
+ </div>
+ </MkSpacer>
+</MkStickyContainer>
</template>
<script lang="ts" setup>
@@ -16,9 +19,9 @@ import { defineAsyncComponent, onMounted } from 'vue';
import FormInput from '@/components/form/input.vue';
import FormButton from '@/components/ui/button.vue';
import * as os from '@/os';
-import * as symbols from '@/symbols';
import { i18n } from '@/i18n';
-import { router } from '@/router';
+import { mainRouter } from '@/router';
+import { definePageMetadata } from '@/scripts/page-metadata';
const props = defineProps<{
token?: string;
@@ -31,22 +34,24 @@ async function save() {
token: props.token,
password: password,
});
- router.push('/');
+ mainRouter.push('/');
}
onMounted(() => {
if (props.token == null) {
os.popup(defineAsyncComponent(() => import('@/components/forgot-password.vue')), {}, {}, 'closed');
- router.push('/');
+ mainRouter.push('/');
}
});
-defineExpose({
- [symbols.PAGE_INFO]: {
- title: i18n.ts.resetPassword,
- icon: 'fas fa-lock',
- bg: 'var(--bg)',
- },
+const headerActions = $computed(() => []);
+
+const headerTabs = $computed(() => []);
+
+definePageMetadata({
+ title: i18n.ts.resetPassword,
+ icon: 'fas fa-lock',
+ bg: 'var(--bg)',
});
</script>