Plugin-System; Neuigkeiten und Termine als mitgelieferte Plugins
- Plugins nach WordPress-Prinzip: plugin.json-Manifest mit Versions- und Abhängigkeitsprüfung, eigenes PSR-4-Autoloading, register()/boot(), activate()/deactivate()/uninstall(), Migrationen, Routen und Views je Plugin - plugins-core/ (mitgeliefert, aktiv bis zur Deaktivierung) und plugins/ (Kunden-Plugins, geschützt vor Updates, inaktiv bis zur Aktivierung) - Zustand in storage/app/plugins.json – Laden ohne Datenbankabfrage - Wiederherstellungsmodus: Ausnahmen und Fatal Errors beim Laden deaktivieren das Plugin, das Portal bleibt erreichbar - Hooks (Actions/Filter mit Prioritäten) und Registries für Navigation, Startseiten-Kacheln, Rechte und Admin-Seiten (Filament-Discovery) - Admin-Seite „Plugins“: aktivieren, deaktivieren, per ZIP installieren (ZIP-Slip-Schutz), löschen mit oder ohne Daten; abschaltbar per INHAUS_DISALLOW_FILE_MODS - Startseite komplett aus Kacheln; Plugin-Seiten als „slug::Seite“ - Version 0.3.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc0020458f
commit
28ef1e4a20
155 changed files with 2762 additions and 573 deletions
|
|
@ -11,8 +11,13 @@ createInertiaApp({
|
|||
return title ? `${title} – ${portalName}` : portalName;
|
||||
},
|
||||
resolve: (name) => {
|
||||
const pages = import.meta.glob('./pages/**/*.vue');
|
||||
const page = pages[`./pages/${name}.vue`];
|
||||
// „news::Index“ → Seite aus einem mitgelieferten Plugin (plugins-core/news/resources/js/pages/Index.vue)
|
||||
const pages = {
|
||||
...import.meta.glob('./pages/**/*.vue'),
|
||||
...import.meta.glob('../../plugins-core/*/resources/js/pages/**/*.vue'),
|
||||
};
|
||||
const [plugin, pageName] = name.includes('::') ? name.split('::') : [null, name];
|
||||
const page = plugin ? pages[`../../plugins-core/${plugin}/resources/js/pages/${pageName}.vue`] : pages[`./pages/${name}.vue`];
|
||||
|
||||
if (!page) {
|
||||
throw new Error(`Seite nicht gefunden: ${name}`);
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
<script setup>
|
||||
defineProps({
|
||||
category: { type: Object, default: null },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-if="category" class="text-[11px] font-semibold tracking-wide text-brand-text uppercase">{{ category.name }}</span>
|
||||
</template>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { dateBlock } from '@/lib/format';
|
||||
|
||||
const props = defineProps({
|
||||
date: { type: String, required: true },
|
||||
});
|
||||
|
||||
const block = computed(() => dateBlock(props.date));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="grid w-12 shrink-0 place-items-center rounded-md bg-muted py-1.5 leading-none">
|
||||
<span class="text-xl font-semibold">{{ block.day }}</span>
|
||||
<span class="mt-1 text-[10px] font-semibold tracking-wide text-muted-foreground">{{ block.month }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import EventDateBlock from '@/components/EventDateBlock.vue';
|
||||
import { formatEventRange } from '@/lib/format';
|
||||
|
||||
defineProps({
|
||||
event: { type: Object, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Link :href="`/termine/${event.id}`" class="group flex items-start gap-3.5 py-3">
|
||||
<EventDateBlock :date="event.starts_at" />
|
||||
<div class="min-w-0 pt-0.5">
|
||||
<h3 class="line-clamp-2 text-sm leading-snug font-semibold group-hover:underline">{{ event.title }}</h3>
|
||||
<p class="mt-0.5 text-xs text-muted-foreground">{{ formatEventRange(event) }}</p>
|
||||
<p v-if="event.location" class="truncate text-xs text-muted-foreground">{{ event.location }}</p>
|
||||
</div>
|
||||
</Link>
|
||||
</template>
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
<script setup>
|
||||
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ArrowRight, ChevronLeft, ChevronRight, Pause, Play } from '@lucide/vue';
|
||||
|
||||
const props = defineProps({
|
||||
posts: { type: Array, required: true },
|
||||
});
|
||||
|
||||
const index = ref(0);
|
||||
const paused = ref(false);
|
||||
const current = computed(() => props.posts[index.value]);
|
||||
let timer = null;
|
||||
|
||||
function go(to) {
|
||||
index.value = (to + props.posts.length) % props.posts.length;
|
||||
}
|
||||
|
||||
function start() {
|
||||
stop();
|
||||
|
||||
if (props.posts.length > 1 && !paused.value && !window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
||||
timer = setInterval(() => go(index.value + 1), 7000);
|
||||
}
|
||||
}
|
||||
|
||||
function stop() {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
function togglePause() {
|
||||
paused.value = !paused.value;
|
||||
start();
|
||||
}
|
||||
|
||||
onMounted(start);
|
||||
onBeforeUnmount(stop);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section
|
||||
class="relative isolate aspect-[16/10] overflow-hidden rounded-lg bg-brand-950 text-white sm:aspect-[16/9] lg:aspect-auto lg:h-full lg:min-h-[400px]"
|
||||
aria-roledescription="Karussell"
|
||||
aria-label="Hervorgehobene Neuigkeiten"
|
||||
@mouseenter="stop"
|
||||
@mouseleave="start"
|
||||
@focusin="stop"
|
||||
@focusout="start"
|
||||
>
|
||||
<TransitionGroup
|
||||
enter-active-class="transition-opacity duration-700"
|
||||
leave-active-class="transition-opacity duration-700 absolute inset-0"
|
||||
enter-from-class="opacity-0"
|
||||
leave-to-class="opacity-0"
|
||||
>
|
||||
<img
|
||||
v-for="(post, i) in posts"
|
||||
v-show="i === index"
|
||||
:key="post.id"
|
||||
:src="post.cover_url"
|
||||
alt=""
|
||||
class="absolute inset-0 -z-10 size-full object-cover"
|
||||
/>
|
||||
</TransitionGroup>
|
||||
<div class="absolute inset-0 -z-10 bg-gradient-to-t from-black/80 via-black/35 to-black/5 sm:bg-gradient-to-r sm:from-black/75 sm:via-black/40 sm:to-transparent" />
|
||||
|
||||
<div class="flex h-full flex-col justify-end p-6 sm:max-w-[65%] sm:justify-center sm:p-10" aria-live="polite">
|
||||
<span v-if="current.category" class="mb-3 w-fit rounded-sm bg-brand px-2 py-0.5 text-[11px] font-semibold tracking-wide text-brand-foreground uppercase">
|
||||
{{ current.category.name }}
|
||||
</span>
|
||||
<h2 class="text-2xl leading-tight font-semibold tracking-tight sm:text-[32px]">{{ current.title }}</h2>
|
||||
<p v-if="current.teaser" class="mt-3 line-clamp-3 hidden text-[15px] text-white/85 sm:block">{{ current.teaser }}</p>
|
||||
<Link
|
||||
:href="`/neuigkeiten/${current.slug}`"
|
||||
class="mt-5 inline-flex w-fit items-center gap-2 rounded-md bg-brand px-4 py-2.5 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand-700"
|
||||
>
|
||||
Mehr erfahren
|
||||
<ArrowRight class="size-4" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div v-if="posts.length > 1" class="absolute right-4 bottom-4 flex items-center gap-2 sm:right-6 sm:bottom-6">
|
||||
<button type="button" class="grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55" aria-label="Vorheriger Beitrag" @click="go(index - 1)">
|
||||
<ChevronLeft class="size-5" />
|
||||
</button>
|
||||
<div class="flex items-center gap-1.5 px-1">
|
||||
<button
|
||||
v-for="(post, i) in posts"
|
||||
:key="post.id"
|
||||
type="button"
|
||||
class="h-1.5 rounded-full transition-all"
|
||||
:class="i === index ? 'w-6 bg-white' : 'w-1.5 bg-white/50 hover:bg-white/80'"
|
||||
:aria-label="`Beitrag ${i + 1} von ${posts.length}`"
|
||||
:aria-current="i === index"
|
||||
@click="go(i)"
|
||||
/>
|
||||
</div>
|
||||
<button type="button" class="grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55" aria-label="Nächster Beitrag" @click="go(index + 1)">
|
||||
<ChevronRight class="size-5" />
|
||||
</button>
|
||||
<button type="button" class="grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55" :aria-label="paused ? 'Automatisch weiterblättern' : 'Anhalten'" @click="togglePause">
|
||||
<Play v-if="paused" class="size-4" />
|
||||
<Pause v-else class="size-4" />
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import CategoryLabel from '@/components/CategoryLabel.vue';
|
||||
import NewsImage from '@/components/NewsImage.vue';
|
||||
import { formatShortDate } from '@/lib/format';
|
||||
|
||||
defineProps({
|
||||
post: { type: Object, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Link :href="`/neuigkeiten/${post.slug}`" class="group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-md">
|
||||
<NewsImage :src="post.thumb_url" :alt="post.title" />
|
||||
<div class="flex flex-1 flex-col p-4">
|
||||
<CategoryLabel :category="post.category" />
|
||||
<h3 class="mt-1 line-clamp-2 text-[15px] leading-snug font-semibold group-hover:underline">{{ post.title }}</h3>
|
||||
<p v-if="post.teaser" class="mt-1.5 line-clamp-2 text-[13px] text-muted-foreground">{{ post.teaser }}</p>
|
||||
<p class="mt-auto pt-3 text-xs text-muted-foreground">{{ formatShortDate(post.published_at) }} · {{ post.reading_minutes }} Min.</p>
|
||||
</div>
|
||||
</Link>
|
||||
</template>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<script setup>
|
||||
import { Newspaper } from '@lucide/vue';
|
||||
|
||||
defineProps({
|
||||
src: { type: String, default: null },
|
||||
alt: { type: String, default: '' },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="relative aspect-video overflow-hidden bg-muted">
|
||||
<img v-if="src" :src="src" :alt="alt" loading="lazy" class="size-full object-cover" />
|
||||
<div v-else class="grid size-full place-items-center bg-brand-soft">
|
||||
<Newspaper class="size-1/4 max-h-10 max-w-10 text-brand-text opacity-60" :stroke-width="1.5" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import CategoryLabel from '@/components/CategoryLabel.vue';
|
||||
import NewsImage from '@/components/NewsImage.vue';
|
||||
import { formatRelative } from '@/lib/format';
|
||||
|
||||
defineProps({
|
||||
post: { type: Object, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Link :href="`/neuigkeiten/${post.slug}`" class="group flex gap-4 py-3">
|
||||
<NewsImage :src="post.thumb_url" :alt="post.title" class="w-28 shrink-0 rounded-md sm:w-32" />
|
||||
<div class="min-w-0">
|
||||
<CategoryLabel :category="post.category" />
|
||||
<h3 class="mt-0.5 line-clamp-2 text-sm leading-snug font-semibold group-hover:underline">{{ post.title }}</h3>
|
||||
<p class="mt-1 text-xs text-muted-foreground">{{ formatRelative(post.published_at) }}</p>
|
||||
</div>
|
||||
</Link>
|
||||
</template>
|
||||
23
resources/js/lib/widgets.js
Normal file
23
resources/js/lib/widgets.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { defineAsyncComponent } from 'vue';
|
||||
|
||||
/**
|
||||
* Vue-Komponenten der Startseiten-Kacheln: „core::Name“ aus resources/js/widgets,
|
||||
* „<plugin>::Name“ aus plugins-core/<plugin>/resources/js/widgets.
|
||||
*/
|
||||
const core = import.meta.glob('../widgets/*.vue');
|
||||
const plugins = import.meta.glob('../../../plugins-core/*/resources/js/widgets/*.vue');
|
||||
|
||||
const registry = {};
|
||||
|
||||
for (const [path, loader] of Object.entries(core)) {
|
||||
registry[`core::${path.split('/').pop().replace('.vue', '')}`] = defineAsyncComponent(loader);
|
||||
}
|
||||
|
||||
for (const [path, loader] of Object.entries(plugins)) {
|
||||
const [, slug] = path.match(/plugins-core\/([^/]+)\//);
|
||||
registry[`${slug}::${path.split('/').pop().replace('.vue', '')}`] = defineAsyncComponent(loader);
|
||||
}
|
||||
|
||||
export function widgetComponent(name) {
|
||||
return registry[name] ?? null;
|
||||
}
|
||||
|
|
@ -1,138 +1,48 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { Link, usePage } from '@inertiajs/vue3';
|
||||
import { ArrowRight, CalendarDays, Newspaper, Search, UserRoundPen } from '@lucide/vue';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import EventListItem from '@/components/EventListItem.vue';
|
||||
import GreetingCard from '@/components/GreetingCard.vue';
|
||||
import HeroSlider from '@/components/HeroSlider.vue';
|
||||
import NewsCard from '@/components/NewsCard.vue';
|
||||
import NewsListItem from '@/components/NewsListItem.vue';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import QuickLinksRow from '@/components/QuickLinksRow.vue';
|
||||
import { useMediaQuery } from '@vueuse/core';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { widgetComponent } from '@/lib/widgets';
|
||||
|
||||
/**
|
||||
* Startseite aus Kacheln (App\Dashboard\Widgets). Kern und Plugins liefern die
|
||||
* Kacheln; diese Seite ordnet sie nur nach Bereichen an.
|
||||
*/
|
||||
const props = defineProps({
|
||||
profile: { type: Object, required: true },
|
||||
quickLinks: { type: Array, required: true },
|
||||
featuredNews: { type: Object, required: true },
|
||||
latestNews: { type: Object, required: true },
|
||||
moreNews: { type: Object, required: true },
|
||||
upcomingEvents: { type: Object, required: true },
|
||||
newColleagues: { type: Object, required: true },
|
||||
peopleCount: { type: Number, required: true },
|
||||
widgets: { type: Array, required: true },
|
||||
});
|
||||
|
||||
const page = usePage();
|
||||
const user = computed(() => page.props.auth.user);
|
||||
const me = computed(() => ({ ...user.value, avatar_url: props.profile.avatar_url }));
|
||||
const hasHero = computed(() => props.featuredNews.data.length > 0);
|
||||
const desktop = useMediaQuery('(min-width: 1024px)');
|
||||
|
||||
const greeting = computed(() => {
|
||||
const hour = new Date().getHours();
|
||||
|
||||
if (hour < 11) return 'Guten Morgen';
|
||||
if (hour < 18) return 'Guten Tag';
|
||||
|
||||
return 'Guten Abend';
|
||||
});
|
||||
|
||||
const profileIncomplete = computed(() => !props.profile.avatar_url || !props.profile.job_title);
|
||||
const known = computed(() => props.widgets.filter((widget) => widgetComponent(widget.component)));
|
||||
const inArea = (area) => known.value.filter((widget) => widget.area === area);
|
||||
const hero = computed(() => inArea('hero')[0] ?? null);
|
||||
const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.mobileSort));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout title="Startseite">
|
||||
<div class="grid grid-cols-1 gap-6 lg:grid-cols-12">
|
||||
<div class="grid min-w-0 grid-cols-1 content-start gap-6 lg:col-span-8 xl:col-span-9 xl:grid-cols-3">
|
||||
<GreetingCard :user="me" :profile="profile" :greeting="greeting" class="lg:hidden" />
|
||||
|
||||
<HeroSlider v-if="hasHero" :posts="featuredNews.data" class="xl:col-span-2" />
|
||||
|
||||
<Panel
|
||||
title="Neuigkeiten"
|
||||
action-label="Alle anzeigen"
|
||||
action-href="/neuigkeiten"
|
||||
:class="hasHero ? 'xl:col-span-1' : 'xl:col-span-3'"
|
||||
>
|
||||
<div v-if="latestNews.data.length" class="-my-3 divide-y" :class="{ 'sm:grid sm:grid-cols-2 sm:gap-x-6 sm:divide-y-0': !hasHero }">
|
||||
<NewsListItem v-for="post in latestNews.data" :key="post.id" :post="post" />
|
||||
</div>
|
||||
<EmptyState v-else-if="!hasHero" :icon="Newspaper" title="Noch keine Neuigkeiten" text="Sobald Beiträge veröffentlicht sind, erscheinen sie hier.">
|
||||
<a v-if="user.is_admin" href="/admin/neuigkeiten/neu" class="mt-4 text-sm font-medium text-brand-text hover:underline">Ersten Beitrag schreiben</a>
|
||||
</EmptyState>
|
||||
<p v-else class="text-sm text-muted-foreground">Keine weiteren Beiträge.</p>
|
||||
</Panel>
|
||||
|
||||
<Panel title="Termine" class="lg:hidden" action-label="Alle Termine" action-href="/termine">
|
||||
<div v-if="upcomingEvents.data.length" class="-my-3 divide-y">
|
||||
<EventListItem v-for="event in upcomingEvents.data" :key="event.id" :event="event" />
|
||||
</div>
|
||||
<EmptyState v-else :icon="CalendarDays" title="Keine anstehenden Termine" class="py-6" />
|
||||
</Panel>
|
||||
|
||||
<QuickLinksRow :links="quickLinks" class="xl:col-span-3" />
|
||||
|
||||
<Panel v-if="moreNews.data.length" title="Aktuelles aus den Bereichen" action-label="Alle" action-href="/neuigkeiten" class="xl:col-span-3">
|
||||
<!-- Mobil wischbar, ab sm als Raster -->
|
||||
<div class="-mx-5 flex snap-x scroll-px-5 gap-4 overflow-x-auto px-5 pb-1 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 sm:pb-0 xl:grid-cols-4 [&::-webkit-scrollbar]:hidden">
|
||||
<NewsCard v-for="post in moreNews.data" :key="post.id" :post="post" class="w-[78%] shrink-0 snap-start sm:w-auto" />
|
||||
</div>
|
||||
</Panel>
|
||||
|
||||
<Panel v-if="newColleagues.data.length" title="Neu im Team" action-label="Alle Personen" action-href="/personen" class="xl:col-span-3">
|
||||
<ul class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
|
||||
<li v-for="person in newColleagues.data" :key="person.id">
|
||||
<Link :href="`/personen/${person.id}`" class="flex items-center gap-3 rounded-lg border p-3 transition-colors hover:bg-accent">
|
||||
<PersonAvatar :person="person" class="size-11" />
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-sm font-semibold">{{ person.name }}</div>
|
||||
<div class="truncate text-[13px] text-muted-foreground">{{ person.job_title || person.department }}</div>
|
||||
</div>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</Panel>
|
||||
<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" />
|
||||
<component
|
||||
:is="widgetComponent(widget.component)"
|
||||
v-for="widget in inArea('feed')"
|
||||
:key="widget.key"
|
||||
v-bind="widget.props"
|
||||
:wide="!hero"
|
||||
:class="hero ? 'xl:col-span-1' : 'xl:col-span-3'"
|
||||
/>
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('main')" :key="widget.key" v-bind="widget.props" class="xl:col-span-3" />
|
||||
</div>
|
||||
|
||||
<aside class="grid min-w-0 grid-cols-1 content-start gap-6 lg:col-span-4 xl:col-span-3">
|
||||
<GreetingCard :user="me" :profile="profile" :greeting="greeting" class="hidden lg:block" />
|
||||
|
||||
<Panel title="Termine" class="hidden lg:block" action-label="Alle Termine" action-href="/termine">
|
||||
<div v-if="upcomingEvents.data.length" class="-my-3 divide-y">
|
||||
<EventListItem v-for="event in upcomingEvents.data" :key="event.id" :event="event" />
|
||||
</div>
|
||||
<EmptyState v-else :icon="CalendarDays" title="Keine anstehenden Termine" class="py-6" />
|
||||
</Panel>
|
||||
|
||||
<Link
|
||||
v-if="profileIncomplete"
|
||||
href="/profil/bearbeiten"
|
||||
class="flex items-start gap-3 rounded-lg border border-dashed border-brand-300 bg-card p-4 transition-colors hover:bg-brand-soft"
|
||||
>
|
||||
<UserRoundPen class="mt-0.5 size-5 shrink-0 text-brand-text" />
|
||||
<div>
|
||||
<div class="text-sm font-semibold">Profil vervollständigen</div>
|
||||
<p class="mt-0.5 text-[13px] text-muted-foreground">Mit Foto und Funktion finden Kolleginnen und Kollegen Sie schneller.</p>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
<Panel title="Personen finden">
|
||||
<form action="/personen" method="get" class="relative" role="search">
|
||||
<Search class="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<input
|
||||
name="q"
|
||||
type="search"
|
||||
placeholder="Name, Funktion, Abteilung …"
|
||||
class="h-10 w-full rounded-md border border-input bg-background pr-3 pl-9 text-sm placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none"
|
||||
/>
|
||||
</form>
|
||||
<Link href="/personen" class="mt-4 flex items-center justify-between text-[13px] text-muted-foreground hover:text-foreground">
|
||||
{{ peopleCount === 1 ? '1 Person' : `${peopleCount.toLocaleString('de-DE')} Personen` }} im Verzeichnis
|
||||
<ArrowRight class="size-4" />
|
||||
</Link>
|
||||
</Panel>
|
||||
<aside class="col-span-4 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-3">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('aside')" :key="widget.key" v-bind="widget.props" />
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<div v-else class="grid min-w-0 grid-cols-1 gap-6">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in mobile" :key="widget.key" v-bind="widget.props" />
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { CalendarDays, MapPin, Video } from '@lucide/vue';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import EventDateBlock from '@/components/EventDateBlock.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { formatEventRange, formatMonthYear } from '@/lib/format';
|
||||
|
||||
const props = defineProps({
|
||||
events: { type: Object, required: true },
|
||||
});
|
||||
|
||||
// Nach Monaten gruppieren – laufende Termine erscheinen im aktuellen Monat.
|
||||
const groups = computed(() => {
|
||||
const result = [];
|
||||
|
||||
for (const event of props.events.data) {
|
||||
const start = new Date(event.starts_at);
|
||||
const shown = start < new Date() ? new Date() : start;
|
||||
const label = formatMonthYear(shown.toISOString());
|
||||
const last = result[result.length - 1];
|
||||
|
||||
if (last?.label === label) {
|
||||
last.events.push(event);
|
||||
} else {
|
||||
result.push({ label, events: [event] });
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout title="Termine">
|
||||
<div class="mb-6">
|
||||
<h1 class="text-2xl font-semibold tracking-tight">Termine</h1>
|
||||
<p class="mt-1 text-sm text-muted-foreground">Veranstaltungen, Fortbildungen und Treffen.</p>
|
||||
</div>
|
||||
|
||||
<div v-if="groups.length" class="grid max-w-4xl gap-8">
|
||||
<section v-for="group in groups" :key="group.label">
|
||||
<h2 class="mb-3 text-sm font-semibold text-muted-foreground">{{ group.label }}</h2>
|
||||
<ul class="divide-y rounded-lg border bg-card">
|
||||
<li v-for="event in group.events" :key="event.id">
|
||||
<Link :href="`/termine/${event.id}`" class="group flex items-center gap-4 p-4 transition-colors hover:bg-accent/60">
|
||||
<EventDateBlock :date="event.starts_at" class="w-14" />
|
||||
<div class="min-w-0 flex-1">
|
||||
<h3 class="text-[15px] font-semibold group-hover:underline">{{ event.title }}</h3>
|
||||
<p class="mt-0.5 text-[13px] text-muted-foreground">{{ formatEventRange(event) }}</p>
|
||||
<p v-if="event.location || event.online_url" class="mt-0.5 flex items-center gap-1.5 text-[13px] text-muted-foreground">
|
||||
<MapPin v-if="event.location" class="size-3.5" />
|
||||
<Video v-else class="size-3.5" />
|
||||
{{ event.location || 'Online' }}
|
||||
</p>
|
||||
</div>
|
||||
<img v-if="event.thumb_url" :src="event.thumb_url" alt="" loading="lazy" class="hidden h-16 w-28 shrink-0 rounded-md object-cover sm:block" />
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<div v-else class="max-w-4xl rounded-lg border border-dashed bg-card">
|
||||
<EmptyState :icon="CalendarDays" title="Keine anstehenden Termine" text="Neue Termine erscheinen hier, sobald sie eingetragen sind." />
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ArrowLeft, CalendarPlus, Clock, MapPin, Video } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EventDateBlock from '@/components/EventDateBlock.vue';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { formatEventRange } from '@/lib/format';
|
||||
|
||||
defineProps({
|
||||
event: { type: Object, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :title="event.title">
|
||||
<div class="mx-auto max-w-4xl">
|
||||
<Link href="/termine" class="mb-6 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground">
|
||||
<ArrowLeft class="size-4" /> Alle Termine
|
||||
</Link>
|
||||
|
||||
<div class="flex items-start gap-4">
|
||||
<EventDateBlock :date="event.starts_at" class="w-16 py-2" />
|
||||
<h1 class="pt-1 text-2xl leading-tight font-semibold tracking-tight sm:text-3xl">{{ event.title }}</h1>
|
||||
</div>
|
||||
|
||||
<img v-if="event.image_url" :src="event.image_url" :alt="event.title" class="mt-6 aspect-video w-full rounded-lg object-cover" />
|
||||
|
||||
<div class="mt-6 grid gap-6 lg:grid-cols-3">
|
||||
<Panel title="Beschreibung" class="lg:col-span-2">
|
||||
<div v-if="event.description_html" class="prose prose-neutral max-w-none text-[15px]" v-html="event.description_html" />
|
||||
<p v-else class="text-sm text-muted-foreground">Keine weiteren Informationen.</p>
|
||||
</Panel>
|
||||
|
||||
<Panel title="Details" class="content-start">
|
||||
<dl class="grid gap-4 text-sm">
|
||||
<div class="flex gap-3">
|
||||
<Clock class="mt-0.5 size-4 shrink-0 text-muted-foreground" />
|
||||
<div>
|
||||
<dt class="text-xs text-muted-foreground">Wann</dt>
|
||||
<dd>{{ formatEventRange(event) }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="event.location" class="flex gap-3">
|
||||
<MapPin class="mt-0.5 size-4 shrink-0 text-muted-foreground" />
|
||||
<div>
|
||||
<dt class="text-xs text-muted-foreground">Ort</dt>
|
||||
<dd>{{ event.location }}</dd>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="event.online_url" class="flex gap-3">
|
||||
<Video class="mt-0.5 size-4 shrink-0 text-muted-foreground" />
|
||||
<div class="min-w-0">
|
||||
<dt class="text-xs text-muted-foreground">Online</dt>
|
||||
<dd class="truncate"><a :href="event.online_url" target="_blank" rel="noopener" class="text-brand-text hover:underline">Zur Teilnahme</a></dd>
|
||||
</div>
|
||||
</div>
|
||||
</dl>
|
||||
<Button variant="outline" class="mt-5 w-full" as-child>
|
||||
<a :href="`/termine/${event.id}/kalender.ics`"><CalendarPlus /> In meinen Kalender</a>
|
||||
</Button>
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<script setup>
|
||||
import { Link, router } from '@inertiajs/vue3';
|
||||
import { ChevronLeft, ChevronRight, Newspaper } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import NewsCard from '@/components/NewsCard.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
|
||||
defineProps({
|
||||
posts: { type: Object, required: true },
|
||||
categories: { type: Array, required: true },
|
||||
activeCategory: { type: String, default: null },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout title="Neuigkeiten">
|
||||
<div class="mb-6">
|
||||
<h1 class="text-2xl font-semibold tracking-tight">Neuigkeiten</h1>
|
||||
<p class="mt-1 text-sm text-muted-foreground">Aktuelles aus dem Unternehmen und den Bereichen.</p>
|
||||
</div>
|
||||
|
||||
<nav v-if="categories.length" class="mb-6 flex flex-wrap gap-2" aria-label="Kategorien">
|
||||
<Link
|
||||
href="/neuigkeiten"
|
||||
class="rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors"
|
||||
:class="!activeCategory ? 'border-brand bg-brand text-brand-foreground' : 'bg-card hover:bg-accent'"
|
||||
preserve-scroll
|
||||
>
|
||||
Alle
|
||||
</Link>
|
||||
<Link
|
||||
v-for="category in categories"
|
||||
:key="category.slug"
|
||||
:href="`/neuigkeiten?kategorie=${category.slug}`"
|
||||
class="rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors"
|
||||
:class="activeCategory === category.slug ? 'border-brand bg-brand text-brand-foreground' : 'bg-card hover:bg-accent'"
|
||||
preserve-scroll
|
||||
>
|
||||
{{ category.name }}
|
||||
</Link>
|
||||
</nav>
|
||||
|
||||
<div v-if="posts.data.length" class="grid gap-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4">
|
||||
<NewsCard v-for="post in posts.data" :key="post.id" :post="post" />
|
||||
</div>
|
||||
<div v-else class="rounded-lg border border-dashed bg-card">
|
||||
<EmptyState :icon="Newspaper" title="Keine Beiträge" text="In dieser Kategorie ist noch nichts veröffentlicht." />
|
||||
</div>
|
||||
|
||||
<nav v-if="posts.meta.last_page > 1" class="mt-8 flex items-center justify-between" aria-label="Seiten">
|
||||
<p class="text-sm text-muted-foreground">Seite {{ posts.meta.current_page }} von {{ posts.meta.last_page }}</p>
|
||||
<div class="flex gap-2">
|
||||
<Button variant="outline" size="sm" :disabled="!posts.links.prev" @click="router.get(posts.links.prev)"><ChevronLeft /> Neuere</Button>
|
||||
<Button variant="outline" size="sm" :disabled="!posts.links.next" @click="router.get(posts.links.next)">Ältere <ChevronRight /></Button>
|
||||
</div>
|
||||
</nav>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ArrowLeft, Clock } from '@lucide/vue';
|
||||
import CategoryLabel from '@/components/CategoryLabel.vue';
|
||||
import NewsCard from '@/components/NewsCard.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { formatDate } from '@/lib/format';
|
||||
|
||||
defineProps({
|
||||
post: { type: Object, required: true },
|
||||
related: { type: Object, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :title="post.title">
|
||||
<article class="mx-auto max-w-3xl">
|
||||
<Link href="/neuigkeiten" class="mb-6 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground">
|
||||
<ArrowLeft class="size-4" /> Alle Neuigkeiten
|
||||
</Link>
|
||||
|
||||
<header>
|
||||
<CategoryLabel :category="post.category" />
|
||||
<h1 class="mt-2 text-3xl leading-tight font-semibold tracking-tight sm:text-[34px]">{{ post.title }}</h1>
|
||||
<p v-if="post.teaser" class="mt-4 text-lg leading-relaxed text-muted-foreground">{{ post.teaser }}</p>
|
||||
|
||||
<div class="mt-6 flex flex-wrap items-center gap-x-6 gap-y-3 border-y py-4 text-sm">
|
||||
<Link v-if="post.author" :href="`/personen/${post.author.id}`" class="flex items-center gap-3 hover:underline">
|
||||
<PersonAvatar :person="post.author" class="size-9" />
|
||||
<span>
|
||||
<span class="block font-medium">{{ post.author.name }}</span>
|
||||
<span v-if="post.author.job_title" class="block text-xs text-muted-foreground">{{ post.author.job_title }}</span>
|
||||
</span>
|
||||
</Link>
|
||||
<span class="text-muted-foreground">{{ formatDate(post.published_at) }}</span>
|
||||
<span class="inline-flex items-center gap-1.5 text-muted-foreground"><Clock class="size-4" /> {{ post.reading_minutes }} Min. Lesezeit</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<img v-if="post.cover_url" :src="post.cover_url" :alt="post.title" class="mt-8 aspect-video w-full rounded-lg object-cover" />
|
||||
|
||||
<div class="prose prose-neutral mt-8 max-w-none prose-headings:tracking-tight prose-img:rounded-lg" v-html="post.body_html" />
|
||||
</article>
|
||||
|
||||
<section v-if="related.data.length" class="mx-auto mt-16 max-w-5xl">
|
||||
<h2 class="mb-4 text-lg font-semibold">Weitere Beiträge</h2>
|
||||
<div class="grid gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<NewsCard v-for="item in related.data" :key="item.id" :post="item" />
|
||||
</div>
|
||||
</section>
|
||||
</AppLayout>
|
||||
</template>
|
||||
25
resources/js/widgets/Greeting.vue
Normal file
25
resources/js/widgets/Greeting.vue
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { usePage } from '@inertiajs/vue3';
|
||||
import GreetingCard from '@/components/GreetingCard.vue';
|
||||
|
||||
const props = defineProps({
|
||||
profile: { type: Object, required: true },
|
||||
});
|
||||
|
||||
const page = usePage();
|
||||
const user = computed(() => ({ ...page.props.auth.user, avatar_url: props.profile.avatar_url }));
|
||||
|
||||
const greeting = computed(() => {
|
||||
const hour = new Date().getHours();
|
||||
|
||||
if (hour < 11) return 'Guten Morgen';
|
||||
if (hour < 18) return 'Guten Tag';
|
||||
|
||||
return 'Guten Abend';
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<GreetingCard :user="user" :profile="profile" :greeting="greeting" />
|
||||
</template>
|
||||
25
resources/js/widgets/NewColleagues.vue
Normal file
25
resources/js/widgets/NewColleagues.vue
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
import PersonAvatar from '@/components/PersonAvatar.vue';
|
||||
|
||||
defineProps({
|
||||
people: { type: Array, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Panel title="Neu im Team" action-label="Alle Personen" action-href="/personen">
|
||||
<ul class="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">
|
||||
<li v-for="person in people" :key="person.id">
|
||||
<Link :href="`/personen/${person.id}`" class="flex items-center gap-3 rounded-lg border p-3 transition-colors hover:bg-accent">
|
||||
<PersonAvatar :person="person" class="size-11" />
|
||||
<div class="min-w-0">
|
||||
<div class="truncate text-sm font-semibold">{{ person.name }}</div>
|
||||
<div class="truncate text-[13px] text-muted-foreground">{{ person.job_title || person.department }}</div>
|
||||
</div>
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</Panel>
|
||||
</template>
|
||||
27
resources/js/widgets/PeopleSearch.vue
Normal file
27
resources/js/widgets/PeopleSearch.vue
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { ArrowRight, Search } from '@lucide/vue';
|
||||
import Panel from '@/components/Panel.vue';
|
||||
|
||||
defineProps({
|
||||
count: { type: Number, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Panel title="Personen finden">
|
||||
<form action="/personen" method="get" class="relative" role="search">
|
||||
<Search class="pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
|
||||
<input
|
||||
name="q"
|
||||
type="search"
|
||||
placeholder="Name, Funktion, Abteilung …"
|
||||
class="h-10 w-full rounded-md border border-input bg-background pr-3 pl-9 text-sm placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none"
|
||||
/>
|
||||
</form>
|
||||
<Link href="/personen" class="mt-4 flex items-center justify-between text-[13px] text-muted-foreground hover:text-foreground">
|
||||
{{ count === 1 ? '1 Person' : `${count.toLocaleString('de-DE')} Personen` }} im Verzeichnis
|
||||
<ArrowRight class="size-4" />
|
||||
</Link>
|
||||
</Panel>
|
||||
</template>
|
||||
14
resources/js/widgets/ProfileIncomplete.vue
Normal file
14
resources/js/widgets/ProfileIncomplete.vue
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<script setup>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { UserRoundPen } from '@lucide/vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Link href="/profil/bearbeiten" class="flex items-start gap-3 rounded-lg border border-dashed border-brand-300 bg-card p-4 transition-colors hover:bg-brand-soft">
|
||||
<UserRoundPen class="mt-0.5 size-5 shrink-0 text-brand-text" />
|
||||
<div>
|
||||
<div class="text-sm font-semibold">Profil vervollständigen</div>
|
||||
<p class="mt-0.5 text-[13px] text-muted-foreground">Mit Foto und Funktion finden Kolleginnen und Kollegen Sie schneller.</p>
|
||||
</div>
|
||||
</Link>
|
||||
</template>
|
||||
11
resources/js/widgets/QuickLinks.vue
Normal file
11
resources/js/widgets/QuickLinks.vue
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<script setup>
|
||||
import QuickLinksRow from '@/components/QuickLinksRow.vue';
|
||||
|
||||
defineProps({
|
||||
links: { type: Array, required: true },
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QuickLinksRow :links="links" />
|
||||
</template>
|
||||
82
resources/views/filament/pages/plugins.blade.php
Normal file
82
resources/views/filament/pages/plugins.blade.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<x-filament-panels::page>
|
||||
<style>
|
||||
.ih-plugins { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
|
||||
.ih-plugin { display: flex; flex-direction: column; gap: .75rem; height: 100%; }
|
||||
.ih-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
|
||||
.ih-name { font-weight: 600; }
|
||||
.ih-meta { font-size: .8125rem; color: rgb(107 114 128); }
|
||||
.ih-desc { font-size: .875rem; flex: 1; }
|
||||
.ih-problem { font-size: .8125rem; color: rgb(185 28 28); }
|
||||
.ih-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
|
||||
.ih-hint { font-size: .875rem; color: rgb(107 114 128); }
|
||||
.ih-error { font-size: .8125rem; color: rgb(220 38 38); margin-top: .5rem; }
|
||||
.dark .ih-meta, .dark .ih-hint { color: rgb(156 163 175); }
|
||||
.dark .ih-problem { color: rgb(248 113 113); }
|
||||
</style>
|
||||
|
||||
<div class="ih-plugins">
|
||||
@foreach ($plugins as $plugin)
|
||||
@php($m = $plugin['manifest'])
|
||||
<x-filament::section>
|
||||
<div class="ih-plugin">
|
||||
<div class="ih-head">
|
||||
<div>
|
||||
<div class="ih-name">{{ $m->name }}</div>
|
||||
<div class="ih-meta">Version {{ $m->version }}@if ($m->author) · {{ $m->author }}@endif</div>
|
||||
</div>
|
||||
<div style="display: flex; gap: .375rem; flex-wrap: wrap; justify-content: flex-end">
|
||||
@if ($m->core)
|
||||
<x-filament::badge color="gray">mitgeliefert</x-filament::badge>
|
||||
@endif
|
||||
<x-filament::badge :color="$plugin['enabled'] ? 'success' : 'gray'">{{ $plugin['enabled'] ? 'aktiv' : 'inaktiv' }}</x-filament::badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ih-desc">{{ $m->description }}</div>
|
||||
|
||||
@if ($plugin['problem'])
|
||||
<div class="ih-problem">{{ $plugin['problem'] }}</div>
|
||||
@endif
|
||||
|
||||
<div class="ih-actions">
|
||||
@if ($plugin['enabled'])
|
||||
<x-filament::button size="sm" color="gray" wire:click="deactivate('{{ $m->slug }}')" :disabled="$plugin['dependents'] !== []"
|
||||
wire:confirm="„{{ $m->name }}“ deaktivieren? Menüpunkte, Seiten und Kacheln verschwinden, die Daten bleiben erhalten.">
|
||||
Deaktivieren
|
||||
</x-filament::button>
|
||||
@if ($plugin['dependents'])
|
||||
<span class="ih-meta">benötigt von {{ implode(', ', $plugin['dependents']) }}</span>
|
||||
@endif
|
||||
@else
|
||||
<x-filament::button size="sm" wire:click="activate('{{ $m->slug }}')">Aktivieren</x-filament::button>
|
||||
@endif
|
||||
|
||||
@if (! $m->core && $uploadsAllowed)
|
||||
<x-filament::button size="sm" color="danger" outlined wire:click="delete('{{ $m->slug }}', false)"
|
||||
wire:confirm="„{{ $m->name }}“ löschen? Die Daten des Plugins bleiben in der Datenbank.">
|
||||
Löschen
|
||||
</x-filament::button>
|
||||
<x-filament::button size="sm" color="danger" outlined wire:click="delete('{{ $m->slug }}', true)"
|
||||
wire:confirm="„{{ $m->name }}“ samt ALLEN Daten löschen? Das lässt sich nicht rückgängig machen.">
|
||||
Mit Daten löschen
|
||||
</x-filament::button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</x-filament::section>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<x-filament::section heading="Plugin installieren" description="ZIP-Archiv eines Plugins hochladen. Ein vorhandenes Plugin mit demselben Kürzel wird aktualisiert, seine Daten bleiben erhalten.">
|
||||
@if ($uploadsAllowed)
|
||||
<x-filament::callout color="warning" icon="heroicon-o-shield-exclamation" description="Plugins laufen mit vollen Rechten und haben Zugriff auf alle Daten des Portals. Installieren Sie nur Plugins aus vertrauenswürdiger Quelle." />
|
||||
<form wire:submit="upload" style="margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem">
|
||||
<input type="file" wire:model="archive" accept=".zip,application/zip" />
|
||||
<x-filament::button type="submit" icon="heroicon-o-arrow-up-tray" wire:loading.attr="disabled" wire:target="archive,upload">Hochladen und installieren</x-filament::button>
|
||||
</form>
|
||||
@error('archive') <div class="ih-error">{{ $message }}</div> @enderror
|
||||
@else
|
||||
<p class="ih-hint">Das Installieren von Plugins ist in dieser Installation abgeschaltet (INHAUS_DISALLOW_FILE_MODS).</p>
|
||||
@endif
|
||||
</x-filament::section>
|
||||
</x-filament-panels::page>
|
||||
Loading…
Add table
Add a link
Reference in a new issue