2024-12-07 17:19:41 +01:00
|
|
|
<template>
|
2025-03-28 01:16:24 +01:00
|
|
|
<div class="md:px-8 px-4 py-2 max-w-7xl mx-auto relative">
|
|
|
|
|
<ProfileEditor ref="profileEditor" />
|
|
|
|
|
|
|
|
|
|
<Transition name="slide-down">
|
|
|
|
|
<Alert
|
|
|
|
|
v-if="profileEditor?.dirty"
|
2025-04-10 18:44:53 +02:00
|
|
|
layout="button"
|
|
|
|
|
class="mb-4 absolute top-4 inset-x-4 w-[calc(100%-2rem)]"
|
2025-03-28 01:16:24 +01:00
|
|
|
>
|
|
|
|
|
<Check class="size-4" />
|
|
|
|
|
<AlertTitle>Unsaved changes</AlertTitle>
|
2025-04-10 18:44:53 +02:00
|
|
|
<AlertDescription >
|
2025-03-28 01:16:24 +01:00
|
|
|
Click "apply" to save your changes.
|
|
|
|
|
</AlertDescription>
|
|
|
|
|
<!-- Add pl-4 because Alert is adding additional padding, which we don't want -->
|
|
|
|
|
<Button
|
|
|
|
|
variant="secondary"
|
|
|
|
|
@click="profileEditor?.submitForm"
|
2025-04-10 18:44:53 +02:00
|
|
|
class="w-full !pl-4"
|
2025-03-28 01:16:24 +01:00
|
|
|
>Apply</Button
|
|
|
|
|
>
|
|
|
|
|
</Alert>
|
|
|
|
|
</Transition>
|
2024-12-07 17:19:41 +01:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-03-28 01:16:24 +01:00
|
|
|
import { Check } from "lucide-vue-next";
|
2024-12-07 17:19:41 +01:00
|
|
|
// biome-ignore lint/style/useImportType: <explanation>
|
|
|
|
|
import ProfileEditor from "~/components/preferences/profile/editor.vue";
|
2025-03-28 01:16:24 +01:00
|
|
|
import { Alert, AlertDescription, AlertTitle } from "~/components/ui/alert";
|
2024-12-07 17:19:41 +01:00
|
|
|
import { Button } from "~/components/ui/button";
|
2024-12-07 22:17:22 +01:00
|
|
|
import * as m from "~/paraglide/messages.js";
|
2024-12-07 17:19:41 +01:00
|
|
|
|
|
|
|
|
useHead({
|
2024-12-07 22:17:22 +01:00
|
|
|
title: m.actual_mean_cow_dare(),
|
2024-12-07 17:19:41 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
definePageMeta({
|
|
|
|
|
layout: "app",
|
2024-12-07 23:05:26 +01:00
|
|
|
breadcrumbs: () => [
|
2024-12-07 17:19:41 +01:00
|
|
|
{
|
2024-12-07 22:17:22 +01:00
|
|
|
text: m.broad_whole_herring_reside(),
|
2024-12-07 17:19:41 +01:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
requiresAuth: true,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const profileEditor = ref<InstanceType<typeof ProfileEditor> | null>(null);
|
2025-03-28 01:16:24 +01:00
|
|
|
</script>
|