Symbole für alle Hauptpunkte im automatischen Menü (0.40.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 8m25s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 8m46s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 11m36s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 11m31s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 11m34s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 12m12s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 12m14s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 11m18s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m15s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-27 18:02:11 +00:00
parent a704d12d2a
commit 8a9399b6a5
21 changed files with 102 additions and 29 deletions

View file

@ -56,7 +56,7 @@ class Plugin extends BasePlugin
public function register(): void
{
// Menüpunkt im Portal
$this->app->make(Navigation::class)->add('mein-plugin', 'Mein Bereich', '/mein-bereich', active: 'mein-plugin.*', sort: 40);
$this->app->make(Navigation::class)->add('mein-plugin', 'Mein Bereich', '/mein-bereich', active: 'mein-plugin.*', sort: 40, icon: 'sparkles');
// Rechte, die im Rollen-Formular erscheinen
$this->app->make(Abilities::class)->define('mein-plugin.manage', 'Mein Bereich verwalten', 'Mein Plugin');
@ -133,6 +133,7 @@ $this->app->make(Blocks::class)->add(BlockType::make('mein-plugin.liste', 'Meine
`app(Navigation::class)->source('typ', 'Bezeichnung', fn () => [id => 'Name'], fn (string $id, array $item, Request $request, ?User $user) => ['label' => …, 'href' => …, 'active' => …, 'children' => [...]] ?: null)`.
- Symbole: `App\Support\Icons` (alle Lucide-Symbole lokal; kuratierte Auswahl in `resources/icons/icons.json`, nach Änderungen `npm run icons`), im Portal `<AppIcon name="…" />` aus `@/components/AppIcon.vue`.
- Seitenköpfe im Portal: `@/components/PageHeader.vue` (Titel, Beschreibung, Pfad, Slot „actions“).
- Menü-Symbol: `add(…, icon: 'calendar-days')` – ein Lucide-Name; ohne Angabe ein neutrales Symbol. Dynamische Punkte können `'icon'` mitliefern.
- Dynamische Menüpunkte: `app(Navigation::class)->provider('mein-plugin', fn (Request $request, ?User $user) => [...])`;
feste Menüpunkte können mit `visible: fn (User $user) => …` je Person ausgeblendet werden.
- Benachrichtigungen (Glocke im Portal): `$user->notify(new App\Notifications\PortalNotification($titel, $text, $url))`.