Feste Profilfelder in Formularen, Geburtstage, anpassbare Startseite
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m18s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m21s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m34s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m8s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m6s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m43s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m1s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m18s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m21s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m34s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m8s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m6s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m43s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m1s
- Formulare: Felder fest aus dem Profil (nicht änderbar, Server setzt den Profilwert ein), Hinweis bei fehlender Profilangabe - Geburtstage (optionales Plugin, standardmäßig aus): Tag und Monat freiwillig im Profil, Kachel, Liste /geburtstage, Pagebuilder-Block, Glückwunsch am eigenen Geburtstag; Sichtbarkeit alle/Abteilung/Standort - Startseite: Kacheln je Bereich sortieren und ausblenden; eigene Kacheln (Bild mit Link, Text, Hinweis) mit Zeitraum und Zielgruppe - Kern: optionale mitgelieferte Plugins, Startseitenbereich „top“, Profilabschnitte für Plugins, Kachel-Bezeichnungen Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
435960725d
commit
ee8dde93c0
262 changed files with 2385 additions and 692 deletions
|
|
@ -23,6 +23,7 @@ import {
|
|||
Text,
|
||||
CalendarDays,
|
||||
ClipboardList,
|
||||
Cake,
|
||||
} from '@lucide/vue';
|
||||
|
||||
/**
|
||||
|
|
@ -53,6 +54,7 @@ const icons = {
|
|||
newspaper: Newspaper,
|
||||
'calendar-days': CalendarDays,
|
||||
'clipboard-list': ClipboardList,
|
||||
cake: Cake,
|
||||
};
|
||||
|
||||
export function blockIcon(name) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.m
|
|||
|
||||
<template>
|
||||
<AppLayout title="Startseite">
|
||||
<div v-if="desktop && inArea('top').length" class="mb-6 grid gap-6">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('top')" :key="widget.key" v-bind="widget.props" />
|
||||
</div>
|
||||
|
||||
<div v-if="desktop" class="grid grid-cols-12 gap-6">
|
||||
<div class="col-span-8 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-9 xl:grid-cols-3">
|
||||
<component :is="widgetComponent(hero.component)" v-if="hero" v-bind="hero.props" class="xl:col-span-2" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { defineAsyncComponent, ref } from 'vue';
|
||||
import { router, useForm } from '@inertiajs/vue3';
|
||||
import { Camera, LoaderCircle, Trash2 } from '@lucide/vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
|
|
@ -15,8 +15,16 @@ const props = defineProps({
|
|||
profile: { type: Object, required: true },
|
||||
managed: { type: Array, default: () => [] },
|
||||
customFields: { type: Array, default: () => [] },
|
||||
sections: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
// Abschnitte aus Plugins (App\Profile\ProfileSections): „<plugin>::Name“ aus plugins-core/<plugin>/resources/js/profile
|
||||
const sectionLoaders = import.meta.glob('../../../../plugins-core/*/resources/js/profile/*.vue');
|
||||
const sectionComponents = Object.fromEntries(Object.entries(sectionLoaders).map(([path, loader]) => [
|
||||
`${path.match(/plugins-core\/([^/]+)\//)[1]}::${path.split('/').pop().replace('.vue', '')}`,
|
||||
defineAsyncComponent(loader),
|
||||
]));
|
||||
|
||||
const isManaged = (field) => props.managed.includes(field);
|
||||
|
||||
// Stammdaten
|
||||
|
|
@ -204,6 +212,8 @@ function savePassword() {
|
|||
</form>
|
||||
</Panel>
|
||||
|
||||
<component :is="sectionComponents[section.component]" v-for="section in sections" :key="section.key" v-bind="section.props" />
|
||||
|
||||
<Panel v-if="profile.has_password" title="Passwort ändern">
|
||||
<form class="grid gap-5" @submit.prevent="savePassword">
|
||||
<FormField id="current_password" label="Aktuelles Passwort" :error="passwordForm.errors.current_password" class="sm:max-w-sm">
|
||||
|
|
|
|||
48
resources/js/widgets/CustomTile.vue
Normal file
48
resources/js/widgets/CustomTile.vue
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<script setup>
|
||||
import { CircleAlert, CircleCheck, Info, Megaphone, TriangleAlert } from '@lucide/vue';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
|
||||
/**
|
||||
* Eigene Kachel aus „Administration → Portal → Startseite“.
|
||||
*/
|
||||
defineProps({
|
||||
tile: { type: Object, required: true },
|
||||
});
|
||||
|
||||
const notice = {
|
||||
brand: { icon: Megaphone, class: 'border-brand bg-brand text-brand-foreground' },
|
||||
info: { icon: Info, class: 'border-sky-200 bg-sky-50 text-sky-950 dark:border-sky-900 dark:bg-sky-950/40 dark:text-sky-100' },
|
||||
success: { icon: CircleCheck, class: 'border-emerald-200 bg-emerald-50 text-emerald-950 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-100' },
|
||||
warning: { icon: TriangleAlert, class: 'border-red-200 bg-red-50 text-red-950 dark:border-red-900 dark:bg-red-950/40 dark:text-red-100' },
|
||||
neutral: { icon: CircleAlert, class: 'border-border bg-card text-foreground' },
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- Bild mit Link: randlos in Kachelbreite -->
|
||||
<component
|
||||
:is="tile.url ? 'a' : 'figure'"
|
||||
v-if="tile.type === 'image' && tile.image_url"
|
||||
:href="tile.url || undefined"
|
||||
:target="tile.url && tile.new_tab ? '_blank' : undefined"
|
||||
:rel="tile.url && tile.new_tab ? 'noopener' : undefined"
|
||||
class="group block overflow-hidden rounded-lg border bg-card"
|
||||
>
|
||||
<img :src="tile.image_url" :alt="tile.alt || tile.title || ''" loading="lazy" class="w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]" />
|
||||
<span v-if="tile.title" class="block px-4 py-3 text-sm font-semibold group-hover:underline">{{ tile.title }}</span>
|
||||
</component>
|
||||
|
||||
<section v-else-if="tile.type === 'notice'" class="pb-box flex gap-3 rounded-lg border p-4 sm:p-5" :class="notice[tile.variant]?.class ?? notice.brand.class">
|
||||
<component :is="notice[tile.variant]?.icon ?? Megaphone" class="mt-0.5 size-5 shrink-0" />
|
||||
<div class="min-w-0 flex-1">
|
||||
<p v-if="tile.title" class="font-semibold">{{ tile.title }}</p>
|
||||
<div v-if="tile.html" class="prose prose-sm max-w-none [&_a]:underline" :class="tile.title ? 'mt-1' : ''" v-html="tile.html" />
|
||||
<a v-if="tile.url" :href="tile.url" :target="tile.new_tab ? '_blank' : undefined" class="mt-2 inline-block text-sm font-medium underline">Mehr erfahren</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<Panel v-else :title="tile.title || ''">
|
||||
<div class="prose prose-sm prose-neutral max-w-none prose-img:rounded-md" v-html="tile.html" />
|
||||
<a v-if="tile.url" :href="tile.url" :target="tile.new_tab ? '_blank' : undefined" class="mt-3 inline-block text-[13px] font-medium text-brand-text hover:underline">Mehr erfahren</a>
|
||||
</Panel>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue