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>
37 lines
1.1 KiB
Vue
37 lines
1.1 KiB
Vue
<script setup>
|
||
import { computed, watchEffect } from 'vue';
|
||
import { icons } from '@/lib/icons';
|
||
import { iconMarkup, loadIconSet } from '@/lib/iconSet';
|
||
|
||
/**
|
||
* Ein Symbol nach Namen. Kuratierte Symbole sind sofort da, alle anderen kommen
|
||
* aus dem nachgeladenen Symbolsatz – der Platz bleibt so lange reserviert.
|
||
*/
|
||
const props = defineProps({
|
||
name: { type: String, default: null },
|
||
strokeWidth: { type: [Number, String], default: 2 },
|
||
});
|
||
|
||
const component = computed(() => (props.name ? icons[props.name] : null));
|
||
const markup = computed(() => (component.value ? null : iconMarkup(props.name)));
|
||
|
||
watchEffect(() => {
|
||
if (props.name && !component.value) loadIconSet();
|
||
});
|
||
</script>
|
||
|
||
<template>
|
||
<component :is="component" v-if="component" :stroke-width="strokeWidth" aria-hidden="true" />
|
||
<svg
|
||
v-else-if="name"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
viewBox="0 0 24 24"
|
||
fill="none"
|
||
stroke="currentColor"
|
||
:stroke-width="strokeWidth"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
aria-hidden="true"
|
||
v-html="markup ?? ''"
|
||
/>
|
||
</template>
|