Oberfläche Mitarbeiter-App umschaltbar (0.52.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 14m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 14m13s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m56s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 11m44s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 56m9s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m6s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m30s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m13s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 14m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 14m13s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m56s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 11m44s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 56m9s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m6s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m30s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 9m13s
Einstellung interface (classic|app) im Erscheinungsbild; data-ui am Wurzelelement, warme Tokens, Karten mit Schatten, Menüpunkte als Pillen; Startseite dreispaltig. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d79c6284e1
commit
38f47f98e2
145 changed files with 656 additions and 379 deletions
|
|
@ -225,6 +225,89 @@ header[data-header="dark"] .nav-underline {
|
|||
background: currentColor;
|
||||
}
|
||||
|
||||
/*
|
||||
* Oberfläche „Mitarbeiter-App“ (Erscheinungsbild → Farben → Oberfläche): warme Flächen,
|
||||
* Karten mit weichem Schatten statt Rand, Menüpunkte als Pillen. Nur Tokens und wenige
|
||||
* Regeln – Seiten und Plugins ziehen dadurch von selbst mit.
|
||||
*/
|
||||
[data-ui="app"] {
|
||||
--background: #f7f4ef;
|
||||
--foreground: #1f1b17;
|
||||
--card-foreground: #1f1b17;
|
||||
--popover-foreground: #1f1b17;
|
||||
--muted: #f3efe9;
|
||||
--muted-foreground: #6d655c;
|
||||
--accent: #f1ece5;
|
||||
--accent-foreground: #1f1b17;
|
||||
--secondary: #f1ece5;
|
||||
--secondary-foreground: #1f1b17;
|
||||
--border: #ebe4da;
|
||||
--input: #ddd4c8;
|
||||
--card-shadow: 0 1px 2px rgb(60 40 20 / 0.05), 0 8px 24px rgb(60 40 20 / 0.045);
|
||||
}
|
||||
|
||||
[data-ui="app"].dark {
|
||||
--background: #13110f;
|
||||
--foreground: #ece7e1;
|
||||
--card: #1c1916;
|
||||
--card-foreground: #ece7e1;
|
||||
--popover: #221e1b;
|
||||
--popover-foreground: #ece7e1;
|
||||
--muted: #26221e;
|
||||
--muted-foreground: #a69d93;
|
||||
--accent: #2a2521;
|
||||
--accent-foreground: #ece7e1;
|
||||
--secondary: #2a2521;
|
||||
--secondary-foreground: #ece7e1;
|
||||
--border: #2f2a25;
|
||||
--input: #3a342e;
|
||||
--card-shadow: none;
|
||||
}
|
||||
|
||||
/* Karten: weicher Schatten statt Rand (hell); im Dunkeln trägt die Flächenfarbe */
|
||||
[data-ui="app"] .bg-card:where(.border) {
|
||||
border-color: transparent;
|
||||
box-shadow: var(--card-shadow);
|
||||
}
|
||||
|
||||
[data-ui="app"].dark .bg-card:where(.border) {
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
/* Kopfleiste: Menüpunkte als Pillen, Suche rund */
|
||||
[data-ui="app"] header .nav-item {
|
||||
margin-block: 14px;
|
||||
padding-inline: 14px;
|
||||
border-radius: var(--radius-pill);
|
||||
}
|
||||
|
||||
[data-ui="app"] header .nav-item:hover {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
[data-ui="app"] header .nav-item.is-active {
|
||||
background: var(--brand-soft);
|
||||
color: var(--brand-soft-foreground);
|
||||
}
|
||||
|
||||
[data-ui="app"] header[data-header="brand"] .nav-item.is-active,
|
||||
[data-ui="app"] header[data-header="dark"] .nav-item.is-active {
|
||||
background: color-mix(in oklab, var(--foreground) 16%, transparent);
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
[data-ui="app"] .nav-underline {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[data-ui="app"] header input[type="search"],
|
||||
[data-ui="app"] header input[role="combobox"] {
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--muted);
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Tabellen in Inhalten scrollen waagerecht statt die Seite zu verbreitern */
|
||||
.prose table {
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const columns = computed(() => ({ 3: 'grid-cols-3', 4: 'grid-cols-4', 5: 'grid-c
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<section class="overflow-hidden rounded-lg border bg-card">
|
||||
<section class="@container overflow-hidden rounded-lg border bg-card">
|
||||
<CoverBanner :image="user.cover_url" class="flex items-center justify-between gap-4 px-6 py-6 text-brand-foreground">
|
||||
<div class="min-w-0">
|
||||
<div class="text-sm opacity-85">{{ greeting }},</div>
|
||||
|
|
@ -29,12 +29,13 @@ const columns = computed(() => ({ 3: 'grid-cols-3', 4: 'grid-cols-4', 5: 'grid-c
|
|||
</div>
|
||||
<PersonAvatar :person="user" class="size-16 shrink-0 text-lg ring-4 ring-white/25 xl:size-20 xl:text-xl" />
|
||||
</CoverBanner>
|
||||
<nav class="grid divide-x" :class="columns" aria-label="Mein Bereich">
|
||||
<Link :href="`/personen/${user.id}`" class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<!-- In schmalen Spalten (Mitarbeiter-App) zwei Knöpfe je Zeile -->
|
||||
<nav class="grid divide-x @max-[22rem]:grid-cols-2! @max-[22rem]:gap-px @max-[22rem]:divide-x-0 @max-[22rem]:bg-border" :class="columns" aria-label="Mein Bereich">
|
||||
<Link :href="`/personen/${user.id}`" class="flex flex-col items-center gap-2 bg-card px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<UserRound class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
Mein Profil
|
||||
</Link>
|
||||
<Link href="/profil/bearbeiten" class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<Link href="/profil/bearbeiten" class="flex flex-col items-center gap-2 bg-card px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<UserRoundPen class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
Profil bearbeiten
|
||||
</Link>
|
||||
|
|
@ -42,16 +43,16 @@ const columns = computed(() => ({ 3: 'grid-cols-3', 4: 'grid-cols-4', 5: 'grid-c
|
|||
v-for="action in actions"
|
||||
:key="action.href"
|
||||
:href="action.href"
|
||||
class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground"
|
||||
class="flex flex-col items-center gap-2 bg-card px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground"
|
||||
>
|
||||
<AppIcon :name="action.icon || 'link'" class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
{{ action.label }}
|
||||
</Link>
|
||||
<a v-if="user.can_admin" href="/admin" class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<a v-if="user.can_admin" href="/admin" class="flex flex-col items-center gap-2 bg-card px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<Settings class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
Administration
|
||||
</a>
|
||||
<Link v-else href="/logout" method="post" as="button" class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<Link v-else href="/logout" method="post" as="button" class="flex flex-col items-center gap-2 bg-card px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<LogOut class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
Abmelden
|
||||
</Link>
|
||||
|
|
|
|||
43
resources/js/components/apps/QuickLinksList.vue
Normal file
43
resources/js/components/apps/QuickLinksList.vue
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ArrowUpRight, LayoutGrid } from '@lucide/vue';
|
||||
import AppMark from '@/components/apps/AppMark.vue';
|
||||
import { appsOpen } from '@/lib/apps';
|
||||
|
||||
/** Schnellzugriffe als ruhige Liste – für die Seitenspalte der Mitarbeiter-App */
|
||||
const props = defineProps({
|
||||
links: { type: Array, required: true },
|
||||
total: { type: Number, default: 0 },
|
||||
});
|
||||
|
||||
const more = () => Math.max(0, props.total - props.links.length);
|
||||
const isInternal = (link) => link.url.startsWith('/') && !link.new_tab;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="rounded-lg border bg-card p-3" aria-label="Anwendungen">
|
||||
<h2 class="px-2 pt-1 pb-2 text-xs font-semibold tracking-wide text-muted-foreground uppercase">Anwendungen</h2>
|
||||
<div class="grid gap-0.5">
|
||||
<component
|
||||
:is="isInternal(link) ? Link : 'a'"
|
||||
v-for="link in links"
|
||||
:key="link.label + link.url"
|
||||
:href="link.url"
|
||||
:target="link.new_tab ? '_blank' : undefined"
|
||||
:rel="link.new_tab ? 'noopener' : undefined"
|
||||
class="group flex items-center gap-3 rounded-md px-2 py-2 hover:bg-accent"
|
||||
>
|
||||
<AppMark :app="link" class="size-9" />
|
||||
<span class="grid min-w-0 flex-1 leading-tight">
|
||||
<span class="truncate text-sm font-semibold">{{ link.label }}</span>
|
||||
<span v-if="link.subtitle" class="truncate text-xs text-muted-foreground">{{ link.subtitle }}</span>
|
||||
</span>
|
||||
<ArrowUpRight v-if="link.new_tab" class="size-4 shrink-0 text-muted-foreground/70 group-hover:text-foreground" aria-label="öffnet in neuem Tab" />
|
||||
</component>
|
||||
<button v-if="more()" type="button" class="flex items-center gap-3 rounded-md px-2 py-2 text-left hover:bg-accent" @click.stop="appsOpen = true">
|
||||
<span class="grid size-9 place-items-center rounded-lg bg-muted text-foreground/70"><LayoutGrid class="size-4" /></span>
|
||||
<span class="text-sm font-medium">Alle Anwendungen <span class="text-muted-foreground">({{ total }})</span></span>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
@ -198,8 +198,8 @@ const themeOptions = [
|
|||
<li v-for="item in navVisible" :key="item.key" class="flex">
|
||||
<DropdownMenu v-if="item.children.length">
|
||||
<DropdownMenuTrigger
|
||||
class="relative flex items-center gap-1.5 px-3 text-sm font-medium whitespace-nowrap transition-colors outline-none"
|
||||
:class="item.active ? 'text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
class="nav-item relative flex items-center gap-1.5 px-3 text-sm font-medium whitespace-nowrap transition-colors outline-none"
|
||||
:class="item.active ? 'is-active text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
>
|
||||
<AppIcon v-if="item.icon" :name="item.icon" class="size-4 opacity-80" />{{ item.label }} <ChevronDown class="size-4 opacity-70" />
|
||||
<span v-if="item.active" class="nav-underline absolute inset-x-3 bottom-0 h-[3px] rounded-t-full bg-brand" />
|
||||
|
|
@ -221,8 +221,8 @@ const themeOptions = [
|
|||
<NavLink
|
||||
v-else
|
||||
:item="item"
|
||||
class="relative flex items-center gap-1.5 px-3 text-sm font-medium whitespace-nowrap transition-colors"
|
||||
:class="item.active ? 'text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
class="nav-item relative flex items-center gap-1.5 px-3 text-sm font-medium whitespace-nowrap transition-colors"
|
||||
:class="item.active ? 'is-active text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
:aria-current="item.active ? 'page' : undefined"
|
||||
>
|
||||
<AppIcon v-if="item.icon" :name="item.icon" class="size-4 opacity-80" />{{ item.label }}
|
||||
|
|
@ -232,8 +232,8 @@ const themeOptions = [
|
|||
<li v-if="navMore.length" class="flex">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger
|
||||
class="relative flex items-center gap-1 px-3 text-sm font-medium whitespace-nowrap transition-colors outline-none"
|
||||
:class="navMore.some((i) => i.active) ? 'text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
class="nav-item relative flex items-center gap-1 px-3 text-sm font-medium whitespace-nowrap transition-colors outline-none"
|
||||
:class="navMore.some((i) => i.active) ? 'is-active text-foreground' : 'text-foreground/70 hover:text-foreground'"
|
||||
>
|
||||
Mehr <ChevronDown class="size-4" />
|
||||
<span v-if="navMore.some((i) => i.active)" class="nav-underline absolute inset-x-3 bottom-0 h-[3px] rounded-t-full bg-brand" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { usePage } from '@inertiajs/vue3';
|
||||
import { useMediaQuery } from '@vueuse/core';
|
||||
import { Eye } from '@lucide/vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
|
|
@ -23,6 +24,15 @@ const known = computed(() => props.widgets.filter((widget) => widgetComponent(wi
|
|||
const inArea = (area) => known.value.filter((widget) => widget.area === area);
|
||||
const hero = computed(() => inArea('hero')[0] ?? null);
|
||||
const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.mobileSort));
|
||||
|
||||
// Oberfläche „Mitarbeiter-App“: drei Spalten – links ich (Begrüßung, Anwendungen, Gruppen),
|
||||
// in der Mitte das Geschehen (Neuigkeiten), rechts der Tag (Aufgaben, Termine, Feiern …)
|
||||
const page = usePage();
|
||||
const isApp = computed(() => page.props.branding?.interface === 'app');
|
||||
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));
|
||||
const appCenter = computed(() => known.value.filter((widget) => !LEFT.includes(widget.key) && ['top', 'hero', 'feed', 'main'].includes(widget.area)));
|
||||
const appRight = computed(() => known.value.filter((widget) => !LEFT.includes(widget.key) && widget.area === 'aside'));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -36,6 +46,29 @@ const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.m
|
|||
<PageContent :content="content" />
|
||||
</template>
|
||||
|
||||
<!-- 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">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in appLeft" :key="widget.key" v-bind="widget.props" variant="list" />
|
||||
</aside>
|
||||
<div class="grid min-w-0 content-start gap-5">
|
||||
<component
|
||||
:is="widgetComponent(widget.component)"
|
||||
v-for="widget in appCenter"
|
||||
:key="widget.key"
|
||||
v-bind="widget.props"
|
||||
:wide="widget.area === 'feed' ? true : undefined"
|
||||
/>
|
||||
<!-- Unter 1280 px rutscht die rechte Spalte unter die Mitte -->
|
||||
<div class="grid content-start gap-5 xl:hidden">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in appRight" :key="widget.key" v-bind="widget.props" />
|
||||
</div>
|
||||
</div>
|
||||
<aside class="hidden min-w-0 content-start gap-5 xl:grid">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in appRight" :key="widget.key" v-bind="widget.props" />
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<div v-if="desktop && inArea('top').length" class="mb-6 grid gap-6">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('top')" :key="widget.key" v-bind="widget.props" />
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
<script setup>
|
||||
import QuickLinksList from '@/components/apps/QuickLinksList.vue';
|
||||
import QuickLinksRow from '@/components/QuickLinksRow.vue';
|
||||
|
||||
defineProps({
|
||||
links: { type: Array, required: true },
|
||||
/** Alle, die die Person sehen darf – mehr als hier stehen: „Alle Anwendungen“ */
|
||||
total: { type: Number, default: 0 },
|
||||
/** list = senkrechte Liste (Seitenspalte der Mitarbeiter-App) */
|
||||
variant: { type: String, default: 'row' },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QuickLinksRow :links="links" :total="total" />
|
||||
<QuickLinksList v-if="variant === 'list'" :links="links" :total="total" />
|
||||
<QuickLinksRow v-else :links="links" :total="total" />
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
}
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" @class(['dark' => $theme === 'dark']) data-theme="{{ $theme }}">
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" @class(['dark' => $theme === 'dark']) data-theme="{{ $theme }}" data-ui="{{ $branding->interface() }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue