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
|
|
@ -107,7 +107,7 @@ class Navigation
|
|||
/**
|
||||
* Menü für die Kopfzeile. Einträge können Unterpunkte (children) haben.
|
||||
*
|
||||
* @return list<array{key: string, label: string, href: string|null, active: bool, new_tab: bool, children: list<array<string, mixed>>}>
|
||||
* @return list<array{key: string, label: string, href: string|null, active: bool, icon: string|null, new_tab: bool, children: list<array<string, mixed>>}>
|
||||
*/
|
||||
public function items(Request $request, ?User $user = null): array
|
||||
{
|
||||
|
|
@ -144,7 +144,7 @@ class Navigation
|
|||
}
|
||||
|
||||
return $items->sortBy('sort')
|
||||
->map(fn (array $item) => ['key' => $item['key'], 'label' => $item['label'], 'href' => $item['href'], 'active' => (bool) $item['active'], 'new_tab' => false, 'children' => []])
|
||||
->map(fn (array $item) => ['key' => $item['key'], 'label' => $item['label'], 'href' => $item['href'], 'active' => (bool) $item['active'], 'icon' => null, 'new_tab' => false, 'children' => []])
|
||||
->values()
|
||||
->all();
|
||||
}
|
||||
|
|
@ -197,7 +197,7 @@ class Navigation
|
|||
}
|
||||
|
||||
foreach ((array) ($base['children'] ?? []) as $child) {
|
||||
$children[] = ['key' => ($item['id'] ?? $type).'-'.md5($child['href']), 'label' => $child['label'], 'href' => $child['href'], 'active' => (bool) $child['active'], 'new_tab' => false, 'children' => []];
|
||||
$children[] = ['key' => ($item['id'] ?? $type).'-'.md5($child['href']), 'label' => $child['label'], 'href' => $child['href'], 'active' => (bool) $child['active'], 'icon' => null, 'new_tab' => false, 'children' => []];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -212,6 +212,7 @@ class Navigation
|
|||
'label' => $label,
|
||||
'href' => $base['href'],
|
||||
'active' => $base['active'] || collect($children)->contains('active', true),
|
||||
'icon' => Icons::has($item['icon'] ?? null) ? $item['icon'] : null,
|
||||
'new_tab' => $type === 'link' && ! empty($item['new_tab']),
|
||||
'children' => $children,
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue