Symbole: alle Lucide-Symbole lokal verfügbar
All checks were successful
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m35s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m37s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m41s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m52s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m56s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 4m2s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 4m21s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 4m5s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s

- Vollständiger Satz (1.854 Symbole + Aliase älterer Namen) in
  resources/icons/svg.php (Admin) und resources/js/lib/icon-set.js
  (Portal, wird nur bei Bedarf geladen)
- Kuratierte 66 mit deutscher Bezeichnung bleiben im Hauptpaket und
  stehen in Auswahlfeldern vorne; die Suche findet alle
- AppIcon-Komponente für Menü, Schnellzugriffe und Pagebuilder;
  Symbolfeld im Pagebuilder mit Suche

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 14:50:13 +00:00
parent 23c36d28b5
commit c71131d054
151 changed files with 4621 additions and 512 deletions

View file

@ -1,6 +1,5 @@
<script setup>
import { Link as LinkIcon } from '@lucide/vue';
import { icons } from '@/lib/icons';
import AppIcon from '@/components/AppIcon.vue';
defineProps({ block: { type: Object, required: true } });
</script>
@ -15,7 +14,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="icons[item.icon] ?? LinkIcon" class="size-5" />
<AppIcon :name="item.icon || 'link'" class="size-5" />
</span>
<span class="min-w-0">
<span class="block font-medium" :class="{ 'group-hover:underline': item.url }">{{ item.title }}</span>

View file

@ -8,7 +8,8 @@ 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 { icons } from '@/lib/icons';
import AppIcon from '@/components/AppIcon.vue';
import { iconSet, loadIconSet } from '@/lib/iconSet';
import { http } from '@/lib/http';
/**
@ -150,7 +151,23 @@ 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: icons[choice.value] })));
// Symbole: kuratierte Auswahl, per Suche alle (englische Namen, Satz lädt bei Bedarf).
const iconQuery = ref('');
const iconOptions = computed(() => {
const query = iconQuery.value.trim().toLowerCase();
const curated = (props.field.choices ?? []).map((choice) => ({ value: choice.value, label: choice.label }));
if (!query) {
return model.value && !curated.some((c) => c.value === model.value) ? [{ value: model.value, label: model.value }, ...curated] : curated;
}
const found = curated.filter((c) => c.label.toLowerCase().includes(query) || c.value.includes(query));
const all = iconSet.value ? Object.keys(iconSet.value.icons).filter((name) => name.includes(query) && !found.some((f) => f.value === name)) : [];
return [...found, ...all.map((name) => ({ value: name, label: name }))].slice(0, 60);
});
watch(iconQuery, (query) => query.trim() && loadIconSet());
</script>
<template>
@ -169,7 +186,9 @@ const iconOptions = computed(() => (props.field.choices ?? []).map((choice) => (
<Switch :id="id" v-model="model" />
</label>
<div v-else-if="field.type === 'icon'" class="grid grid-cols-6 gap-1.5">
<div v-else-if="field.type === 'icon'" class="grid gap-2">
<Input v-model="iconQuery" type="search" placeholder="Alle Symbole durchsuchen (englisch, z. B. calendar)" class="h-8 text-[13px]" />
<div class="grid max-h-56 grid-cols-6 gap-1.5 overflow-y-auto">
<button
v-for="option in iconOptions"
:key="option.value"
@ -180,8 +199,10 @@ const iconOptions = computed(() => (props.field.choices ?? []).map((choice) => (
:aria-pressed="model === option.value"
@click="model = option.value"
>
<component :is="option.icon" class="size-4" />
<AppIcon :name="option.value" class="size-4" />
</button>
<p v-if="iconQuery && !iconOptions.length" class="col-span-6 py-2 text-center text-xs text-muted-foreground">Kein Symbol gefunden.</p>
</div>
</div>
<div v-else-if="field.type === 'image'" class="grid gap-2">