Layout nach Intranet-Vorbild: einzeiliger Header, Begrüßungskarte, Schnellzugriff-Leiste
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 58s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m3s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m10s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m5s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m4s
CI / Build-Artefakte aktuell (pull_request) Failing after 41s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 58s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m4s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m3s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m10s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m5s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m4s
CI / Build-Artefakte aktuell (pull_request) Failing after 41s
- Header einzeilig mit Navigation neben dem Logo, Suche rechts, mobil als Menü (Sheet) - Begrüßungskarte mit Foto rechts und Aktionsleiste darunter - Schnellzugriffe als blätterbare Kachelreihe - Raster auf Mobilgeräten repariert (Spalten wuchsen mit breitem Inhalt mit) - Telefonnummern im Admin: übliche deutsche Schreibweisen wie „+49 (0) 30 …“ werden akzeptiert Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5a3f1f34c7
commit
f813a0fff3
48 changed files with 518 additions and 165 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { Building2, MapPin } from '@lucide/vue';
|
||||
import { LogOut, Settings, UserRound, UserRoundPen } from '@lucide/vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
|
||||
defineProps({
|
||||
|
|
@ -11,22 +11,34 @@ defineProps({
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<section class="overflow-hidden rounded-lg bg-brand text-brand-foreground">
|
||||
<div class="flex items-center gap-4 p-5">
|
||||
<PersonAvatar :person="user" class="size-[72px] ring-2 ring-white/40" />
|
||||
<section class="overflow-hidden rounded-lg border bg-card">
|
||||
<div class="flex items-center justify-between gap-4 bg-brand px-6 py-6 text-brand-foreground">
|
||||
<div class="min-w-0">
|
||||
<div class="text-[13px] opacity-80">{{ greeting }},</div>
|
||||
<div class="truncate text-lg font-semibold">{{ user.name }}</div>
|
||||
<div v-if="profile.job_title" class="truncate text-[13px] opacity-85">{{ profile.job_title }}</div>
|
||||
<div class="text-sm opacity-85">{{ greeting }},</div>
|
||||
<div class="mt-0.5 truncate text-[22px] leading-tight font-semibold tracking-tight">{{ user.name }}</div>
|
||||
<div class="mt-1.5 truncate text-[13px] opacity-85">
|
||||
{{ profile.job_title || 'Schön, dass Sie da sind!' }}
|
||||
</div>
|
||||
</div>
|
||||
<PersonAvatar :person="user" class="size-20 shrink-0 text-xl ring-4 ring-white/25" />
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-5 gap-y-1 px-5 pb-4 text-[13px] opacity-85">
|
||||
<span v-if="profile.department" class="inline-flex items-center gap-1.5"><Building2 class="size-3.5" />{{ profile.department }}</span>
|
||||
<span v-if="profile.location" class="inline-flex items-center gap-1.5"><MapPin class="size-3.5" />{{ profile.location }}</span>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 border-t border-white/15 text-[13px] font-medium">
|
||||
<Link :href="`/personen/${user.id}`" class="px-5 py-3 hover:bg-white/10">Mein Profil</Link>
|
||||
<Link href="/profil/bearbeiten" class="border-l border-white/15 px-5 py-3 hover:bg-white/10">Profil bearbeiten</Link>
|
||||
</div>
|
||||
<nav class="grid grid-cols-3 divide-x" aria-label="Mein Bereich">
|
||||
<Link :href="`/personen/${user.id}`" class="flex flex-col items-center gap-2 px-2 py-4 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-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>
|
||||
<a v-if="user.is_admin" href="/admin" class="flex flex-col items-center gap-2 px-2 py-4 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-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>
|
||||
</nav>
|
||||
</section>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ defineProps({
|
|||
<template>
|
||||
<section class="rounded-lg border bg-card text-card-foreground">
|
||||
<header v-if="title || $slots.actions" class="flex items-center justify-between gap-4 px-5 pt-4 pb-3">
|
||||
<h2 class="text-[15px] font-semibold">{{ title }}</h2>
|
||||
<h2 class="text-base font-semibold">{{ title }}</h2>
|
||||
<slot name="actions">
|
||||
<Link v-if="actionHref" :href="actionHref" class="inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline">
|
||||
{{ actionLabel }}
|
||||
|
|
|
|||
74
resources/js/components/QuickLinksRow.vue
Normal file
74
resources/js/components/QuickLinksRow.vue
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { useEventListener, useResizeObserver } from '@vueuse/core';
|
||||
import { ChevronLeft, ChevronRight } from '@lucide/vue';
|
||||
import { quickLinkIcons } from '@/lib/icons';
|
||||
|
||||
defineProps({
|
||||
links: { type: Array, required: true },
|
||||
});
|
||||
|
||||
const track = ref(null);
|
||||
const canScrollLeft = ref(false);
|
||||
const canScrollRight = ref(false);
|
||||
|
||||
function update() {
|
||||
const el = track.value;
|
||||
|
||||
if (!el) return;
|
||||
|
||||
canScrollLeft.value = el.scrollLeft > 4;
|
||||
canScrollRight.value = el.scrollLeft + el.clientWidth < el.scrollWidth - 4;
|
||||
}
|
||||
|
||||
function scroll(direction) {
|
||||
track.value?.scrollBy({ left: direction * track.value.clientWidth * 0.8, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
onMounted(update);
|
||||
useResizeObserver(track, update);
|
||||
useEventListener(track, 'scroll', update, { passive: true });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="rounded-lg border bg-card">
|
||||
<header class="flex items-center justify-between px-5 pt-4 pb-3">
|
||||
<h2 class="text-base font-semibold">Schnellzugriff</h2>
|
||||
<div v-if="canScrollLeft || canScrollRight" class="flex gap-1.5">
|
||||
<button
|
||||
type="button"
|
||||
class="grid size-7 place-items-center rounded-md border text-foreground/70 hover:bg-accent disabled:opacity-40"
|
||||
:disabled="!canScrollLeft"
|
||||
aria-label="Zurück"
|
||||
@click="scroll(-1)"
|
||||
>
|
||||
<ChevronLeft class="size-4" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="grid size-7 place-items-center rounded-md border text-foreground/70 hover:bg-accent disabled:opacity-40"
|
||||
:disabled="!canScrollRight"
|
||||
aria-label="Weiter"
|
||||
@click="scroll(1)"
|
||||
>
|
||||
<ChevronRight class="size-4" />
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<div ref="track" class="flex snap-x scroll-px-5 gap-3 overflow-x-auto px-5 pb-5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
|
||||
<component
|
||||
:is="link.url.startsWith('/') && !link.new_tab ? 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="flex w-[116px] shrink-0 snap-start flex-col items-center gap-2.5 rounded-md bg-muted px-2 py-4 text-center transition-colors hover:bg-brand-soft"
|
||||
>
|
||||
<component :is="quickLinkIcons[link.icon] ?? quickLinkIcons.link" class="size-6 text-brand-text" :stroke-width="1.6" />
|
||||
<span class="text-xs leading-tight font-medium">{{ link.label }}</span>
|
||||
</component>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
19
resources/js/components/ui/sheet/Sheet.vue
Normal file
19
resources/js/components/ui/sheet/Sheet.vue
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogRootEmits, DialogRootProps } from "reka-ui"
|
||||
import { DialogRoot, useForwardPropsEmits } from "reka-ui"
|
||||
|
||||
const props = defineProps<DialogRootProps>()
|
||||
const emits = defineEmits<DialogRootEmits>()
|
||||
|
||||
const forwarded = useForwardPropsEmits(props, emits)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogRoot
|
||||
v-slot="slotProps"
|
||||
data-slot="sheet"
|
||||
v-bind="forwarded"
|
||||
>
|
||||
<slot v-bind="slotProps" />
|
||||
</DialogRoot>
|
||||
</template>
|
||||
15
resources/js/components/ui/sheet/SheetClose.vue
Normal file
15
resources/js/components/ui/sheet/SheetClose.vue
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogCloseProps } from "reka-ui"
|
||||
import { DialogClose } from "reka-ui"
|
||||
|
||||
const props = defineProps<DialogCloseProps>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogClose
|
||||
data-slot="sheet-close"
|
||||
v-bind="props"
|
||||
>
|
||||
<slot />
|
||||
</DialogClose>
|
||||
</template>
|
||||
62
resources/js/components/ui/sheet/SheetContent.vue
Normal file
62
resources/js/components/ui/sheet/SheetContent.vue
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogContentEmits, DialogContentProps } from "reka-ui"
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { X } from "@lucide/vue"
|
||||
import { reactiveOmit } from "@vueuse/core"
|
||||
import {
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogPortal,
|
||||
useForwardPropsEmits,
|
||||
} from "reka-ui"
|
||||
import { cn } from "@/lib/utils"
|
||||
import SheetOverlay from "./SheetOverlay.vue"
|
||||
|
||||
interface SheetContentProps extends DialogContentProps {
|
||||
class?: HTMLAttributes["class"]
|
||||
side?: "top" | "right" | "bottom" | "left"
|
||||
}
|
||||
|
||||
defineOptions({
|
||||
inheritAttrs: false,
|
||||
})
|
||||
|
||||
const props = withDefaults(defineProps<SheetContentProps>(), {
|
||||
side: "right",
|
||||
})
|
||||
const emits = defineEmits<DialogContentEmits>()
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class", "side")
|
||||
|
||||
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogPortal>
|
||||
<SheetOverlay />
|
||||
<DialogContent
|
||||
data-slot="sheet-content"
|
||||
:class="cn(
|
||||
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
|
||||
side === 'right'
|
||||
&& 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
||||
side === 'left'
|
||||
&& 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
||||
side === 'top'
|
||||
&& 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
|
||||
side === 'bottom'
|
||||
&& 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',
|
||||
props.class)"
|
||||
v-bind="{ ...$attrs, ...forwarded }"
|
||||
>
|
||||
<slot />
|
||||
|
||||
<DialogClose
|
||||
class="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"
|
||||
>
|
||||
<X class="size-4" />
|
||||
<span class="sr-only">Close</span>
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogPortal>
|
||||
</template>
|
||||
21
resources/js/components/ui/sheet/SheetDescription.vue
Normal file
21
resources/js/components/ui/sheet/SheetDescription.vue
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogDescriptionProps } from "reka-ui"
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { reactiveOmit } from "@vueuse/core"
|
||||
import { DialogDescription } from "reka-ui"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes["class"] }>()
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class")
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogDescription
|
||||
data-slot="sheet-description"
|
||||
:class="cn('text-muted-foreground text-sm', props.class)"
|
||||
v-bind="delegatedProps"
|
||||
>
|
||||
<slot />
|
||||
</DialogDescription>
|
||||
</template>
|
||||
16
resources/js/components/ui/sheet/SheetFooter.vue
Normal file
16
resources/js/components/ui/sheet/SheetFooter.vue
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<{ class?: HTMLAttributes["class"] }>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
data-slot="sheet-footer"
|
||||
:class="cn('mt-auto flex flex-col gap-2 p-4', props.class)
|
||||
"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
15
resources/js/components/ui/sheet/SheetHeader.vue
Normal file
15
resources/js/components/ui/sheet/SheetHeader.vue
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<{ class?: HTMLAttributes["class"] }>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
data-slot="sheet-header"
|
||||
:class="cn('flex flex-col gap-1.5 p-4', props.class)"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
21
resources/js/components/ui/sheet/SheetOverlay.vue
Normal file
21
resources/js/components/ui/sheet/SheetOverlay.vue
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogOverlayProps } from "reka-ui"
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { reactiveOmit } from "@vueuse/core"
|
||||
import { DialogOverlay } from "reka-ui"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<DialogOverlayProps & { class?: HTMLAttributes["class"] }>()
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class")
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogOverlay
|
||||
data-slot="sheet-overlay"
|
||||
:class="cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', props.class)"
|
||||
v-bind="delegatedProps"
|
||||
>
|
||||
<slot />
|
||||
</DialogOverlay>
|
||||
</template>
|
||||
21
resources/js/components/ui/sheet/SheetTitle.vue
Normal file
21
resources/js/components/ui/sheet/SheetTitle.vue
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogTitleProps } from "reka-ui"
|
||||
import type { HTMLAttributes } from "vue"
|
||||
import { reactiveOmit } from "@vueuse/core"
|
||||
import { DialogTitle } from "reka-ui"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<DialogTitleProps & { class?: HTMLAttributes["class"] }>()
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class")
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogTitle
|
||||
data-slot="sheet-title"
|
||||
:class="cn('text-foreground font-semibold', props.class)"
|
||||
v-bind="delegatedProps"
|
||||
>
|
||||
<slot />
|
||||
</DialogTitle>
|
||||
</template>
|
||||
15
resources/js/components/ui/sheet/SheetTrigger.vue
Normal file
15
resources/js/components/ui/sheet/SheetTrigger.vue
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
import type { DialogTriggerProps } from "reka-ui"
|
||||
import { DialogTrigger } from "reka-ui"
|
||||
|
||||
const props = defineProps<DialogTriggerProps>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DialogTrigger
|
||||
data-slot="sheet-trigger"
|
||||
v-bind="props"
|
||||
>
|
||||
<slot />
|
||||
</DialogTrigger>
|
||||
</template>
|
||||
8
resources/js/components/ui/sheet/index.ts
Normal file
8
resources/js/components/ui/sheet/index.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export { default as Sheet } from "./Sheet.vue"
|
||||
export { default as SheetClose } from "./SheetClose.vue"
|
||||
export { default as SheetContent } from "./SheetContent.vue"
|
||||
export { default as SheetDescription } from "./SheetDescription.vue"
|
||||
export { default as SheetFooter } from "./SheetFooter.vue"
|
||||
export { default as SheetHeader } from "./SheetHeader.vue"
|
||||
export { default as SheetTitle } from "./SheetTitle.vue"
|
||||
export { default as SheetTrigger } from "./SheetTrigger.vue"
|
||||
Loading…
Add table
Add a link
Reference in a new issue