Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 6m55s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m3s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m20s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m44s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m13s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m12s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 9m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m0s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 43s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Bleibendes Inertia-Layout (PortalFrame) mit festem Seitenkopf-Bereich; PageHeader teleportiert dorthin, AppLayout meldet Titel und Seitenvorlage (default/medium/narrow/app). Seiten ohne Kopf bekommen einen vom Rahmen. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
52 lines
2.1 KiB
Vue
52 lines
2.1 KiB
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import { router, useForm, usePage } from '@inertiajs/vue3';
|
|
import { LoaderCircle, Smartphone } from '@lucide/vue';
|
|
import { Button } from '@/components/ui/button';
|
|
import GuestLayout from '@/layouts/GuestLayout.vue';
|
|
|
|
// Ohne Portalrahmen: eigenes Layout bzw. Vollbild (lib/withFrame.js)
|
|
defineOptions({ frame: false });
|
|
|
|
/**
|
|
* Bestätigung „App verbinden“: Die Inhaus-App hat diese Seite im Browser geöffnet.
|
|
*/
|
|
const props = defineProps({
|
|
deviceName: { type: String, required: true },
|
|
query: { type: Object, required: true },
|
|
});
|
|
|
|
const user = computed(() => usePage().props.auth?.user);
|
|
const form = useForm({ ...props.query });
|
|
|
|
function confirm() {
|
|
form.post('/app/verbinden');
|
|
}
|
|
|
|
function logout() {
|
|
router.post('/logout');
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<GuestLayout title="App verbinden" description="Die Inhaus-App möchte sich mit Ihrem Konto anmelden.">
|
|
<div class="grid gap-5">
|
|
<div class="flex items-center gap-3 rounded-lg border bg-muted/40 p-4">
|
|
<span class="grid size-10 shrink-0 place-items-center rounded-md bg-brand-soft text-brand-text"><Smartphone class="size-5" /></span>
|
|
<div class="min-w-0 text-sm">
|
|
<p class="font-semibold">{{ deviceName }}</p>
|
|
<p v-if="user" class="text-muted-foreground">Angemeldet als {{ user.name }}</p>
|
|
</div>
|
|
</div>
|
|
<p class="text-sm text-muted-foreground">
|
|
Die App kann danach Neuigkeiten, Termine und Benachrichtigungen in Ihrem Namen abrufen. Den Zugang können Sie jederzeit unter
|
|
„Profil bearbeiten → Benachrichtigungen & Apps“ wieder entziehen.
|
|
</p>
|
|
<Button class="h-10" :disabled="form.processing" @click="confirm">
|
|
<LoaderCircle v-if="form.processing" class="animate-spin" />
|
|
Verbinden und zurück zur App
|
|
</Button>
|
|
<button type="button" class="text-sm text-muted-foreground hover:text-foreground hover:underline" @click="logout">Nicht Sie? Abmelden</button>
|
|
</div>
|
|
</GuestLayout>
|
|
</template>
|