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
|
|
@ -54,9 +54,9 @@ class MenuTest extends TestCase
|
|||
|
||||
app(Settings::class)->set(Navigation::MENU_SETTING, [
|
||||
['id' => 'a', 'type' => 'module', 'module' => 'home'],
|
||||
['id' => 'b', 'type' => 'page', 'target' => (string) $mav->id, 'subpages' => true],
|
||||
['id' => 'b', 'type' => 'page', 'target' => (string) $mav->id, 'subpages' => true, 'icon' => 'heart-handshake'],
|
||||
['id' => 'c', 'type' => 'group', 'label' => 'Service', 'children' => [
|
||||
['id' => 'c1', 'type' => 'module', 'module' => 'news', 'label' => 'Aktuelles'],
|
||||
['id' => 'c1', 'type' => 'module', 'module' => 'news', 'label' => 'Aktuelles', 'icon' => 'gibt-es-nicht'],
|
||||
['id' => 'c2', 'type' => 'link', 'url' => 'https://kantine.example.org', 'label' => 'Speiseplan', 'new_tab' => true],
|
||||
['id' => 'c3', 'type' => 'link', 'url' => 'javascript:alert(1)', 'label' => 'Böse'],
|
||||
]],
|
||||
|
|
@ -75,6 +75,8 @@ class MenuTest extends TestCase
|
|||
$this->assertTrue($menu[1]['children'][1]['active']);
|
||||
$this->assertSame(['Aktuelles', 'Speiseplan'], array_column($menu[2]['children'], 'label'), 'Unsichere Links fallen weg');
|
||||
$this->assertTrue($menu[2]['children'][1]['new_tab']);
|
||||
$this->assertSame('heart-handshake', $menu[1]['icon']);
|
||||
$this->assertNull($menu[2]['children'][0]['icon'], 'Unbekannte Symbole fallen weg');
|
||||
$this->assertNull($menu[2]['href']);
|
||||
|
||||
$withRole = User::factory()->withRoles([$hr])->create();
|
||||
|
|
@ -100,13 +102,14 @@ class MenuTest extends TestCase
|
|||
$this->assertSame('home', collect($items)->first()['module']);
|
||||
|
||||
$component->set('data.items', [
|
||||
'x' => ['id' => 'x', 'type' => 'module', 'module' => 'news', 'label' => 'News', 'roles' => [], 'children' => [
|
||||
'x' => ['id' => 'x', 'type' => 'module', 'module' => 'news', 'label' => 'News', 'icon' => 'newspaper', 'roles' => [], 'children' => [
|
||||
'y' => ['id' => 'y', 'type' => 'link', 'url' => '/termine', 'label' => 'Termine', 'roles' => []],
|
||||
]],
|
||||
])->call('save')->assertHasNoErrors();
|
||||
|
||||
$saved = app(Settings::class)->get(Navigation::MENU_SETTING);
|
||||
$this->assertSame('News', $saved[0]['label']);
|
||||
$this->assertSame('newspaper', $saved[0]['icon']);
|
||||
$this->assertSame('/termine', $saved[0]['children'][0]['url']);
|
||||
|
||||
$component->set('data.items.x.children.y.url', 'ftp://nope')->call('save')->assertHasErrors(['data.items.x.children.y.url']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue