Menü: Symbole je Menüpunkt, gemeinsame Symbolauswahl
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m47s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m33s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m41s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m41s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 3m44s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m18s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m9s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m0s
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m47s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m33s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m41s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m41s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 3m44s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m18s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m9s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m0s
- Optionales Symbol für jeden Menü- und Unterpunkt (Kopfzeile, Aufklappmenüs, „Mehr“, Handy-Menü) - Gemeinsame Liste resources/icons/icons.json (66 Lucide-Symbole) für Menü, Schnellzugriffe und Pagebuilder; `npm run icons` erzeugt Frontend-Zuordnung und SVGs für die Vorschau im Admin - Admin-Auswahl mit Symbolvorschau und Suche Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dda250aaad
commit
23c36d28b5
179 changed files with 872 additions and 684 deletions
|
|
@ -3,7 +3,7 @@ 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';
|
||||
import { icons } from '@/lib/icons';
|
||||
|
||||
defineProps({
|
||||
links: { type: Array, required: true },
|
||||
|
|
@ -66,7 +66,7 @@ useEventListener(track, 'scroll', update, { passive: true });
|
|||
: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" />
|
||||
<component :is="icons[link.icon] ?? icons.link" class="size-6 text-brand-text" :stroke-width="1.6" />
|
||||
<span class="text-xs leading-tight font-medium">{{ link.label }}</span>
|
||||
</component>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import BrandLogo from '@/components/BrandLogo.vue';
|
|||
import NotificationBell from '@/components/NotificationBell.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import NavLink from '@/components/nav/NavLink.vue';
|
||||
import { icons } from '@/lib/icons';
|
||||
import { useThemePreference } from '@/composables/useThemePreference';
|
||||
|
||||
defineProps({
|
||||
|
|
@ -119,11 +120,11 @@ const themeOptions = [
|
|||
<NavLink
|
||||
v-if="item.href"
|
||||
:item="item"
|
||||
class="rounded-md px-3 py-2.5 text-[15px] font-medium"
|
||||
class="flex items-center gap-2.5 rounded-md px-3 py-2.5 text-[15px] font-medium"
|
||||
:class="item.active && !item.children.some((c) => c.active) ? 'bg-brand-soft text-brand-soft-foreground' : 'text-foreground/80 hover:bg-accent'"
|
||||
@click="mobileNavOpen = false"
|
||||
>
|
||||
{{ item.label }}
|
||||
<component :is="icons[item.icon]" v-if="icons[item.icon]" class="size-[18px] opacity-80" />{{ item.label }}
|
||||
</NavLink>
|
||||
<p v-else class="px-3 pt-3 pb-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase">{{ item.label }}</p>
|
||||
<div v-if="item.children.length" class="mb-1 ml-3 grid gap-0.5 border-l pl-2">
|
||||
|
|
@ -131,11 +132,11 @@ const themeOptions = [
|
|||
v-for="child in item.children"
|
||||
:key="child.key"
|
||||
:item="child"
|
||||
class="rounded-md px-3 py-2 text-sm"
|
||||
class="flex items-center gap-2 rounded-md px-3 py-2 text-sm"
|
||||
:class="child.active ? 'bg-brand-soft font-medium text-brand-soft-foreground' : 'text-foreground/75 hover:bg-accent'"
|
||||
@click="mobileNavOpen = false"
|
||||
>
|
||||
{{ child.label }}
|
||||
<component :is="icons[child.icon]" v-if="icons[child.icon]" class="size-4 opacity-70" />{{ child.label }}
|
||||
</NavLink>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -150,18 +151,18 @@ const themeOptions = [
|
|||
<nav ref="navBox" class="relative hidden h-full min-w-0 flex-1 lg:block" aria-label="Hauptnavigation">
|
||||
<!-- Unsichtbare Kopie zum Messen der Breiten -->
|
||||
<ul ref="navMeasure" class="pointer-events-none invisible absolute flex gap-1" aria-hidden="true">
|
||||
<li v-for="item in navigation" :key="item.key" class="flex items-center gap-1 px-3 text-sm font-medium whitespace-nowrap">
|
||||
{{ item.label }}<ChevronDown v-if="item.children.length" class="size-4" />
|
||||
<li v-for="item in navigation" :key="item.key" class="flex items-center gap-1.5 px-3 text-sm font-medium whitespace-nowrap">
|
||||
<component :is="icons[item.icon]" v-if="icons[item.icon]" class="size-4" />{{ item.label }}<ChevronDown v-if="item.children.length" class="size-4" />
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="flex h-full items-stretch gap-1">
|
||||
<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 px-3 text-sm font-medium whitespace-nowrap transition-colors outline-none"
|
||||
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'"
|
||||
>
|
||||
{{ item.label }} <ChevronDown class="size-4 opacity-70" />
|
||||
<component :is="icons[item.icon]" v-if="icons[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" />
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start" class="min-w-56">
|
||||
|
|
@ -172,18 +173,20 @@ const themeOptions = [
|
|||
<DropdownMenuSeparator />
|
||||
</template>
|
||||
<DropdownMenuItem v-for="child in item.children" :key="child.key" as-child>
|
||||
<NavLink :item="child" :class="child.active ? 'font-semibold text-brand-text' : ''">{{ child.label }}</NavLink>
|
||||
<NavLink :item="child" :class="child.active ? 'font-semibold text-brand-text' : ''">
|
||||
<component :is="icons[child.icon]" v-if="icons[child.icon]" class="size-4 text-muted-foreground" />{{ child.label }}
|
||||
</NavLink>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
<NavLink
|
||||
v-else
|
||||
:item="item"
|
||||
class="relative flex items-center px-3 text-sm font-medium whitespace-nowrap transition-colors"
|
||||
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'"
|
||||
:aria-current="item.active ? 'page' : undefined"
|
||||
>
|
||||
{{ item.label }}
|
||||
<component :is="icons[item.icon]" v-if="icons[item.icon]" class="size-4 opacity-80" />{{ item.label }}
|
||||
<span v-if="item.active" class="nav-underline absolute inset-x-3 bottom-0 h-[3px] rounded-t-full bg-brand" />
|
||||
</NavLink>
|
||||
</li>
|
||||
|
|
@ -203,11 +206,15 @@ const themeOptions = [
|
|||
<DropdownMenuLabel class="text-xs text-muted-foreground">{{ item.label }}</DropdownMenuLabel>
|
||||
<DropdownMenuItem v-if="item.href" as-child><NavLink :item="item">Übersicht</NavLink></DropdownMenuItem>
|
||||
<DropdownMenuItem v-for="child in item.children" :key="child.key" as-child>
|
||||
<NavLink :item="child" :class="child.active ? 'font-semibold text-brand-text' : ''">{{ child.label }}</NavLink>
|
||||
<NavLink :item="child" :class="child.active ? 'font-semibold text-brand-text' : ''">
|
||||
<component :is="icons[child.icon]" v-if="icons[child.icon]" class="size-4 text-muted-foreground" />{{ child.label }}
|
||||
</NavLink>
|
||||
</DropdownMenuItem>
|
||||
</template>
|
||||
<DropdownMenuItem v-else as-child>
|
||||
<NavLink :item="item" :class="item.active ? 'font-semibold text-brand-text' : ''">{{ item.label }}</NavLink>
|
||||
<NavLink :item="item" :class="item.active ? 'font-semibold text-brand-text' : ''">
|
||||
<component :is="icons[item.icon]" v-if="icons[item.icon]" class="size-4 text-muted-foreground" />{{ item.label }}
|
||||
</NavLink>
|
||||
</DropdownMenuItem>
|
||||
</template>
|
||||
</DropdownMenuContent>
|
||||
|
|
|
|||
|
|
@ -1,56 +1,139 @@
|
|||
// Erzeugt von scripts/generate-icons.mjs aus resources/icons/icons.json – nicht von Hand ändern.
|
||||
import {
|
||||
Accessibility,
|
||||
Baby,
|
||||
Bell,
|
||||
Bike,
|
||||
BookOpen,
|
||||
Briefcase,
|
||||
Building2,
|
||||
BuildingComplex,
|
||||
Bus,
|
||||
Cake,
|
||||
CalendarDays,
|
||||
Car,
|
||||
ChartColumn,
|
||||
Church,
|
||||
CircleQuestionMark,
|
||||
ClipboardList,
|
||||
Clock,
|
||||
Coffee,
|
||||
Euro,
|
||||
FileDown,
|
||||
FileText,
|
||||
Folder,
|
||||
FolderOpen,
|
||||
Globe,
|
||||
GraduationCap,
|
||||
Hammer,
|
||||
Handshake,
|
||||
Headset,
|
||||
Heart,
|
||||
HeartHandshake,
|
||||
House,
|
||||
Image,
|
||||
Info,
|
||||
KeyRound,
|
||||
Landmark,
|
||||
Laptop,
|
||||
LayoutGrid,
|
||||
Leaf,
|
||||
Lightbulb,
|
||||
Link,
|
||||
ListChecks,
|
||||
Mail,
|
||||
MapPin,
|
||||
Megaphone,
|
||||
MessageSquare,
|
||||
Monitor,
|
||||
Network,
|
||||
Newspaper,
|
||||
Phone,
|
||||
Plane,
|
||||
Printer,
|
||||
Receipt,
|
||||
Scale,
|
||||
Settings,
|
||||
ShieldCheck,
|
||||
ShoppingCart,
|
||||
Sparkles,
|
||||
Star,
|
||||
Stethoscope,
|
||||
Trophy,
|
||||
Truck,
|
||||
UserPlus,
|
||||
UserRound,
|
||||
Users,
|
||||
Utensils,
|
||||
Video,
|
||||
Wrench,
|
||||
} from '@lucide/vue';
|
||||
|
||||
/**
|
||||
* Symbole für Schnellzugriffe – muss zu App\Support\QuickLinks::ICONS passen.
|
||||
*/
|
||||
export const quickLinkIcons = {
|
||||
link: Link,
|
||||
clock: Clock,
|
||||
/** Kuratierte Symbole für Menü, Schnellzugriffe und Pagebuilder – passt zu App\Support\Icons. */
|
||||
export const icons = {
|
||||
'house': House,
|
||||
'newspaper': Newspaper,
|
||||
'calendar-days': CalendarDays,
|
||||
plane: Plane,
|
||||
receipt: Receipt,
|
||||
'graduation-cap': GraduationCap,
|
||||
headset: Headset,
|
||||
utensils: Utensils,
|
||||
car: Car,
|
||||
'folder': Folder,
|
||||
'folder-open': FolderOpen,
|
||||
'file-text': FileText,
|
||||
'file-down': FileDown,
|
||||
'clipboard-list': ClipboardList,
|
||||
'users': Users,
|
||||
'network': Network,
|
||||
'user-round': UserRound,
|
||||
'user-plus': UserPlus,
|
||||
'cake': Cake,
|
||||
'layout-grid': LayoutGrid,
|
||||
'info': Info,
|
||||
'circle-help': CircleQuestionMark,
|
||||
'settings': Settings,
|
||||
'star': Star,
|
||||
'bell': Bell,
|
||||
'megaphone': Megaphone,
|
||||
'clock': Clock,
|
||||
'plane': Plane,
|
||||
'receipt': Receipt,
|
||||
'graduation-cap': GraduationCap,
|
||||
'briefcase': Briefcase,
|
||||
'list-checks': ListChecks,
|
||||
'book-open': BookOpen,
|
||||
users: Users,
|
||||
mail: Mail,
|
||||
'scale': Scale,
|
||||
'euro': Euro,
|
||||
'chart-column': ChartColumn,
|
||||
'landmark': Landmark,
|
||||
'building-2': BuildingComplex,
|
||||
'map-pin': MapPin,
|
||||
'key-round': KeyRound,
|
||||
'shopping-cart': ShoppingCart,
|
||||
'truck': Truck,
|
||||
'monitor': Monitor,
|
||||
'laptop': Laptop,
|
||||
'headset': Headset,
|
||||
'printer': Printer,
|
||||
'globe': Globe,
|
||||
'mail': Mail,
|
||||
'phone': Phone,
|
||||
'message-square': MessageSquare,
|
||||
lightbulb: Lightbulb,
|
||||
'shield-check': ShieldCheck,
|
||||
'link': Link,
|
||||
'image': Image,
|
||||
'video': Video,
|
||||
'heart-handshake': HeartHandshake,
|
||||
'building-2': Building2,
|
||||
wrench: Wrench,
|
||||
monitor: Monitor,
|
||||
folder: Folder,
|
||||
phone: Phone,
|
||||
megaphone: Megaphone,
|
||||
briefcase: Briefcase,
|
||||
'handshake': Handshake,
|
||||
'heart': Heart,
|
||||
'stethoscope': Stethoscope,
|
||||
'baby': Baby,
|
||||
'church': Church,
|
||||
'accessibility': Accessibility,
|
||||
'shield-check': ShieldCheck,
|
||||
'lightbulb': Lightbulb,
|
||||
'sparkles': Sparkles,
|
||||
'trophy': Trophy,
|
||||
'leaf': Leaf,
|
||||
'utensils': Utensils,
|
||||
'coffee': Coffee,
|
||||
'car': Car,
|
||||
'bus': Bus,
|
||||
'bike': Bike,
|
||||
'wrench': Wrench,
|
||||
'hammer': Hammer,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import { Link as LinkIcon } from '@lucide/vue';
|
||||
import { quickLinkIcons } from '@/lib/icons';
|
||||
import { icons } from '@/lib/icons';
|
||||
|
||||
defineProps({ block: { type: Object, required: true } });
|
||||
</script>
|
||||
|
|
@ -15,7 +15,7 @@ defineProps({ block: { type: Object, required: true } });
|
|||
:class="[block.data.layout === 'grid' ? 'h-full rounded-lg border bg-card p-4' : '', item.url ? 'group' : '']"
|
||||
>
|
||||
<span class="grid size-10 shrink-0 place-items-center rounded-lg bg-brand-soft text-brand-text">
|
||||
<component :is="quickLinkIcons[item.icon] ?? LinkIcon" class="size-5" />
|
||||
<component :is="icons[item.icon] ?? LinkIcon" class="size-5" />
|
||||
</span>
|
||||
<span class="min-w-0">
|
||||
<span class="block font-medium" :class="{ 'group-hover:underline': item.url }">{{ item.title }}</span>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { Switch } from '@/components/ui/switch';
|
|||
import NativeSelect from '@/components/NativeSelect.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import RichTextEditor from '@/components/RichTextEditor.vue';
|
||||
import { quickLinkIcons } from '@/lib/icons';
|
||||
import { icons } from '@/lib/icons';
|
||||
import { http } from '@/lib/http';
|
||||
|
||||
/**
|
||||
|
|
@ -150,7 +150,7 @@ const availableFiles = computed(() => editor.files.value.filter((file) => !(mode
|
|||
|
||||
const formatSize = (bytes) => (bytes > 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1).replace('.', ',')} MB` : `${Math.max(1, Math.round(bytes / 1024))} KB`);
|
||||
|
||||
const iconOptions = computed(() => (props.field.choices ?? []).map((choice) => ({ ...choice, icon: quickLinkIcons[choice.value] })));
|
||||
const iconOptions = computed(() => (props.field.choices ?? []).map((choice) => ({ ...choice, icon: icons[choice.value] })));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue