Einfache Ansicht für Klienten (0.57.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 8m49s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 8m47s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 8m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 9m24s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 11m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 12m4s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m37s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 45s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m12s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 10m41s

Rollen-Schalter simple_ui: größere Schrift, Leichte Sprache automatisch,
Startseite mit großen Kacheln; Hinweis in „Was sieht wer?“.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-30 16:34:14 +00:00
parent cd5b23d166
commit b967c16b6d
147 changed files with 550 additions and 380 deletions

View file

@ -1,6 +1,6 @@
<script setup>
import { ref, watch } from 'vue';
import { router } from '@inertiajs/vue3';
import { onMounted, ref, watch } from 'vue';
import { router, usePage } from '@inertiajs/vue3';
import { BookOpenText, LoaderCircle, PencilLine, Sparkles, TriangleAlert } from '@lucide/vue';
import { toast } from 'vue-sonner';
import { Button } from '@/components/ui/button';
@ -24,6 +24,12 @@ const showEasy = defineModel({ type: Boolean, default: false });
const reader = ref(null);
watch(showEasy, () => reader.value?.stop());
// Einfache Ansicht (z. B. Klienten): Leichte Sprache von selbst, wo es sie gibt
const page = usePage();
onMounted(() => {
if (page.props.auth?.user?.simple && props.easy?.html) showEasy.value = true;
});
// Bearbeiten
const editing = ref(false);
const draft = ref('');

View file

@ -1,11 +1,12 @@
<script setup>
import { computed } from 'vue';
import { usePage } from '@inertiajs/vue3';
import { Link, usePage } from '@inertiajs/vue3';
import { useMediaQuery } from '@vueuse/core';
import { Eye } from '@lucide/vue';
import AppLayout from '@/layouts/AppLayout.vue';
import PageContent from '@/pagebuilder/PageContent.vue';
import { widgetComponent } from '@/lib/widgets';
import AppIcon from '@/components/AppIcon.vue';
import FeedList from '@/components/feed/FeedList.vue';
/**
@ -33,6 +34,11 @@ const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.m
// in der Mitte das Geschehen (Neuigkeiten), rechts der Tag (Aufgaben, Termine, Feiern …)
const page = usePage();
const isApp = computed(() => page.props.branding?.interface === 'app');
// Einfache Ansicht (z. B. Klienten): große Kacheln zu den Bereichen, darunter die Kacheln einspaltig bzw. zweispaltig
const isSimple = computed(() => !!page.props.auth?.user?.simple);
const simpleAreas = computed(() => (page.props.navigation ?? []).filter((item) => item.href && item.href !== '/').slice(0, 8));
const firstName = computed(() => (page.props.auth?.user?.name ?? '').split(' ')[0]);
const today = new Intl.DateTimeFormat('de-DE', { weekday: 'long', day: 'numeric', month: 'long' }).format(new Date());
const LEFT = ['core.greeting', 'core.quick-links', 'gruppen.feed', 'downloads.favorites', 'core.people-search'];
const appLeft = computed(() => LEFT.map((key) => known.value.find((widget) => widget.key === key)).filter(Boolean));
// Neuigkeiten und neue Kolleg:innen stehen im Feed – als Kacheln wären sie doppelt
@ -57,6 +63,28 @@ const appRight = computed(() => known.value.filter((widget) => !LEFT.includes(wi
<PageContent :content="content" />
</template>
<!-- Einfache Ansicht: groß und klar -->
<div v-else-if="isSimple" class="grid min-w-0 gap-8">
<div>
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl">Hallo {{ firstName }}!</h1>
<p class="mt-2 text-lg text-muted-foreground sm:text-xl">Heute ist {{ today }}.</p>
</div>
<nav v-if="simpleAreas.length" class="grid grid-cols-2 gap-4 md:grid-cols-4" aria-label="Bereiche">
<Link
v-for="area in simpleAreas"
:key="area.key"
:href="area.href"
class="flex min-w-0 flex-col items-center gap-3 rounded-lg border bg-card px-2 py-5 text-center text-base font-semibold break-words hyphens-auto hover:bg-accent sm:px-3 sm:py-6 sm:text-lg"
>
<span class="grid size-16 place-items-center rounded-full bg-brand-soft text-brand-text"><AppIcon :name="area.icon || 'layout-grid'" class="size-8" :stroke-width="1.75" /></span>
{{ area.label }}
</Link>
</nav>
<div class="grid min-w-0 grid-cols-1 items-start gap-6 lg:grid-cols-2">
<component :is="widgetComponent(widget.component)" v-for="widget in mobile.filter((w) => !['core.greeting', 'core.quick-links', 'core.people-search', 'core.profile-incomplete'].includes(w.key))" :key="widget.key" v-bind="widget.props" />
</div>
</div>
<!-- Mitarbeiter-App: drei Spalten -->
<div v-else-if="isApp && desktop" class="grid grid-cols-[17.5rem_minmax(0,1fr)] items-start gap-6 xl:grid-cols-[17.5rem_minmax(0,1fr)_21rem]">
<aside class="grid min-w-0 content-start gap-5">