Spaces and pages: - Spaces inside workspaces, open or private, with admin/editor/commenter/viewer roles that cascade from the workspace role (rules in internal/access) - Page tree per space with fractional position keys, move with cycle checks, trash that hides whole subtrees, restore and permanent delete - OpenAPI, TypeScript client, and web app sidebar tree with drag-and-drop, page, space, trash and space settings views (EN + PL) Design system: - Tokens, type scale, radii and shadows from the design kit in @docwell/ui/theme.css; Inter, Source Serif 4 and JetBrains Mono bundled - Vue ports of Button, TextField, Badge, Callout, Icon, Breadcrumbs, SlashMenu and PageTreeItem, plus Logo; favicons and web manifest - Web app and admin panel restyled on the new tokens, in light and dark Also: fix the Vite dev server crashing on /config.json, and stop tracking the local Design/ and docs/ folders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.5 KiB
Vue
43 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
import { DwButton, DwCallout } from "@docwell/ui";
|
|
import { ref } from "vue";
|
|
import { useApi } from "../../api";
|
|
import AuthCard from "../../components/AuthCard.vue";
|
|
import FormField from "../../components/FormField.vue";
|
|
import { useFormErrors } from "../../composables/useFormErrors";
|
|
|
|
const api = useApi();
|
|
const errors = useFormErrors();
|
|
const email = ref("");
|
|
const sent = ref(false);
|
|
const busy = ref(false);
|
|
|
|
async function submit() {
|
|
busy.value = true;
|
|
errors.reset();
|
|
try {
|
|
await api.auth.requestPasswordReset(email.value);
|
|
sent.value = true;
|
|
} catch (e) {
|
|
errors.show(e);
|
|
} finally {
|
|
busy.value = false;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<AuthCard :title="$t('auth.forgot.title')">
|
|
<p v-if="sent" role="status" class="text-ui-md">{{ $t("auth.forgot.sent", { email }) }}</p>
|
|
<form v-else class="space-y-4" @submit.prevent="submit">
|
|
<p class="text-ui-md text-ink-muted">{{ $t("auth.forgot.hint") }}</p>
|
|
<FormField v-model="email" :label="$t('auth.email')" type="email" autocomplete="email" required :error="errors.fields.value.email" />
|
|
<DwCallout v-if="errors.message.value" tone="danger" size="ui">{{ errors.message.value }}</DwCallout>
|
|
<DwButton type="submit" variant="primary" class="w-full justify-center" :disabled="busy">{{ $t("auth.forgot.submit") }}</DwButton>
|
|
</form>
|
|
<template #footer>
|
|
<RouterLink to="/login" class="dw-link">{{ $t("auth.backToLogin") }}</RouterLink>
|
|
</template>
|
|
</AuthCard>
|
|
</template>
|