Startseite frei gestalten, Neuigkeiten-Block mit Kategorien-Filter (0.26.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 5m21s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m55s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m42s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m25s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m34s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 5m21s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m55s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m42s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m25s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m34s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6290e09074
commit
2c96fcce1c
151 changed files with 1515 additions and 317 deletions
22
resources/js/pagebuilder/blocks/WidgetBlock.vue
Normal file
22
resources/js/pagebuilder/blocks/WidgetBlock.vue
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<script setup>
|
||||
import { computed, inject } from 'vue';
|
||||
import { LayoutDashboard } from '@lucide/vue';
|
||||
import { widgetComponent } from '@/lib/widgets';
|
||||
|
||||
/**
|
||||
* Block „Kachel“ der frei gestalteten Startseite: zeigt eine Startseiten-Kachel
|
||||
* mit den Daten der angemeldeten Person.
|
||||
*/
|
||||
const props = defineProps({ block: { type: Object, required: true } });
|
||||
|
||||
const editing = inject('pagebuilder:editing', computed(() => false));
|
||||
const component = computed(() => (props.block.props?.component ? widgetComponent(props.block.props.component) : null));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<component :is="component" v-if="component" v-bind="block.props.props" class="min-w-0" :class="{ 'pointer-events-none select-none': editing }" />
|
||||
<div v-else-if="editing" class="flex items-center gap-2 rounded-md border border-dashed p-4 text-sm text-muted-foreground">
|
||||
<LayoutDashboard class="size-4 shrink-0" />
|
||||
{{ block.data.widget ? 'Diese Kachel ist für Sie gerade leer oder ausgeblendet – andere sehen sie womöglich.' : 'Bitte rechts eine Kachel auswählen.' }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -233,6 +233,19 @@ watch(iconQuery, (query) => query.trim() && loadIconSet());
|
|||
<Input v-else-if="field.type === 'number'" :id="id" v-model.number="model" type="number" :min="field.min" :max="field.max" />
|
||||
<NativeSelect v-else-if="field.type === 'select'" :id="id" v-model="model" :options="field.choices" />
|
||||
|
||||
<div v-else-if="field.type === 'multiselect'" :id="id" class="grid max-h-44 gap-0.5 overflow-y-auto rounded-md border p-1">
|
||||
<label v-for="choice in field.choices" :key="choice.value" class="flex items-center gap-2 rounded px-1.5 py-0.5 text-[13px] hover:bg-accent">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="size-4 accent-[var(--brand)]"
|
||||
:checked="(model ?? []).includes(choice.value)"
|
||||
@change="model = (model ?? []).includes(choice.value) ? model.filter((v) => v !== choice.value) : [...(model ?? []), choice.value]"
|
||||
/>
|
||||
{{ choice.label }}
|
||||
</label>
|
||||
<p v-if="!field.choices?.length" class="px-1.5 py-1 text-[13px] text-muted-foreground">Keine Einträge vorhanden.</p>
|
||||
</div>
|
||||
|
||||
<label v-else-if="field.type === 'toggle'" :for="id" class="flex items-center justify-between gap-3 py-0.5 text-[13px] font-medium">
|
||||
{{ field.label }}
|
||||
<Switch :id="id" v-model="model" />
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {
|
|||
ClipboardList,
|
||||
Cake,
|
||||
Component,
|
||||
LayoutDashboard,
|
||||
} from '@lucide/vue';
|
||||
|
||||
/**
|
||||
|
|
@ -57,6 +58,7 @@ const icons = {
|
|||
'clipboard-list': ClipboardList,
|
||||
cake: Cake,
|
||||
component: Component,
|
||||
'layout-dashboard': LayoutDashboard,
|
||||
};
|
||||
|
||||
export function blockIcon(name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue