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

- 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:
Friederich Loheide 2026-09-26 14:14:52 +00:00
parent dda250aaad
commit 23c36d28b5
179 changed files with 872 additions and 684 deletions

View file

@ -2,7 +2,7 @@
namespace App\Pagebuilder;
use App\Support\QuickLinks;
use App\Support\Icons;
use App\Support\RichText;
use Closure;
@ -83,7 +83,7 @@ final class Field
/** Symbol aus dem Symbolsatz der Schnellzugriffe. */
public static function icon(string $name, string $label, string $default = 'link'): self
{
return new self($name, 'icon', $label, ['default' => $default, 'choices' => QuickLinks::ICONS]);
return new self($name, 'icon', $label, ['default' => $default, 'choices' => Icons::choices()]);
}
/** Liste gleichartiger Einträge, z. B. Schaltflächen oder Galeriebilder. */
@ -143,7 +143,7 @@ final class Field
'image' => is_string($value) && preg_match('#^pagebuilder/[A-Za-z0-9/_.-]+$#', $value) && ! str_contains($value, '..') ? $value : null,
'people', 'ids' => array_values(array_slice(array_unique(array_filter(array_map('intval', is_array($value) ? $value : []))), 0, $this->options['max'])),
'table' => $this->sanitizeTable($value),
'icon' => is_string($value) && array_key_exists($value, QuickLinks::ICONS) ? $value : $this->options['default'],
'icon' => Icons::has($value) ? $value : $this->options['default'],
'repeater' => $this->sanitizeRepeater($value),
default => null,
};