Backend: eigenes kompaktes Theme, Übersicht, Cluster mit Unterseiten, Plugin-Liste
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m29s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m31s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m56s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m2s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m22s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m42s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m41s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m18s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 20:50:17 +00:00
parent ff4a26ecb4
commit c495dfa1cb
144 changed files with 1601 additions and 813 deletions

View file

@ -0,0 +1,138 @@
/*
* Eigenes Backend-Theme: Filament-Basis, kompakter und in der Schrift des Portals.
* Tailwind-Klassen in eigenen Admin-Ansichten funktionieren dadurch ebenfalls.
*/
@import '../../../../vendor/filament/filament/resources/css/theme.css';
@import '../../fonts.css';
@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/filament/**/*';
@source '../../../../plugins-core/*/src/Filament/**/*';
@source '../../../../plugins-core/*/resources/views/**/*';
@theme {
--font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
}
:root {
--sidebar-width: 15.5rem;
}
html {
font-feature-settings: 'cv11', 'ss01';
}
/* ——— Seitenleiste: dichter, Gruppen als kleine Überschriften ——— */
.fi-sidebar-nav {
@apply gap-y-5 px-4 py-5;
}
.fi-sidebar-nav-groups {
@apply gap-y-5;
}
.fi-sidebar-group-btn {
@apply px-2 py-1;
}
.fi-sidebar-group-label {
@apply text-[11px] font-semibold tracking-wider uppercase;
}
.fi-sidebar-group-items,
.fi-sidebar-group {
@apply gap-y-0.5;
}
.fi-sidebar-item-btn {
@apply gap-x-2.5 px-2 py-1.5;
& > .fi-icon {
@apply size-[18px];
}
}
.fi-sidebar-item-label {
@apply text-[13px];
}
/* ——— Kopf der Seiten ——— */
.fi-header-heading {
@apply text-xl font-semibold tracking-tight sm:text-2xl;
}
.fi-header-subheading {
@apply text-sm;
}
.fi-page-header-main-ctn {
@apply gap-y-5 py-6;
}
/* ——— Abschnitte und Formulare: weniger Luft ——— */
.fi-section-header {
@apply px-5 py-3.5;
}
.fi-section-content {
@apply p-5;
}
.fi-section-header-heading {
@apply text-[15px];
}
.fi-section-header-description {
@apply text-[13px];
}
.fi-sc-form,
.fi-sc {
@apply gap-5;
}
.fi-fo-field-label-content {
@apply text-[13px];
}
.fi-fo-field-wrp-helper-text,
.fi-sc-text {
@apply text-xs;
}
/* ——— Tabellen: dichter ——— */
.fi-ta-header-cell {
@apply py-2.5 text-[13px];
}
.fi-ta-text:not(.fi-inline),
.fi-ta-icon:not(.fi-inline),
.fi-ta-color:not(.fi-inline),
.fi-ta-image:not(.fi-inline),
.fi-ta-toggle:not(.fi-inline) {
@apply py-2.5;
}
.fi-ta-cell:has(.fi-ta-actions),
.fi-ta-cell:has(.fi-ta-record-checkbox) {
@apply py-2.5;
}
.fi-ta-text-item,
.fi-ta-text {
@apply text-[13px];
}
/* ——— Oberleiste ——— */
.fi-topbar {
@apply h-14;
}
/* Nur-Lesen-Felder, die wie Text aussehen sollen (z. B. Namen in Tabellen-Repeatern) */
.ih-plain .fi-input-wrp {
@apply bg-transparent shadow-none ring-0;
}
.ih-plain .fi-input {
@apply cursor-default ps-0 font-medium;
}

View file

@ -0,0 +1,83 @@
<x-filament-panels::page>
<div class="grid gap-6">
{{-- Kennzahlen --}}
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4">
@foreach ($stats as $stat)
<{{ $stat['url'] ? 'a' : 'div' }} @if ($stat['url']) href="{{ $stat['url'] }}" @endif
class="group flex items-start gap-3 rounded-xl bg-white p-4 shadow-xs ring-1 ring-gray-950/5 transition hover:ring-primary-500/40 dark:bg-gray-900 dark:ring-white/10">
<span class="grid size-10 shrink-0 place-items-center rounded-lg bg-primary-50 text-primary-600 dark:bg-primary-500/10 dark:text-primary-400">
<x-filament::icon :icon="$stat['icon']" class="size-5" />
</span>
<span class="min-w-0">
<span class="block text-xs font-medium text-gray-500 dark:text-gray-400">{{ $stat['label'] }}</span>
<span class="block truncate text-2xl font-semibold tracking-tight text-gray-950 tabular-nums dark:text-white">{{ $stat['value'] }}</span>
<span class="block truncate text-xs text-gray-500">{{ $stat['hint'] }}</span>
</span>
</{{ $stat['url'] ? 'a' : 'div' }}>
@endforeach
</div>
<div class="grid grid-cols-1 gap-6 xl:grid-cols-3">
<div class="grid content-start gap-6 xl:col-span-2">
{{-- Wartet auf Sie --}}
<section class="rounded-xl bg-white shadow-xs ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
<h2 class="border-b border-gray-950/5 px-5 py-3 text-sm font-semibold text-gray-950 dark:border-white/10 dark:text-white">Wartet auf Sie</h2>
@forelse ($tasks as $task)
<a href="{{ $task['url'] }}" class="flex items-center gap-3 border-b border-gray-950/5 px-5 py-3 last:border-b-0 hover:bg-gray-50 dark:border-white/10 dark:hover:bg-white/5">
<span @class([
'size-2 shrink-0 rounded-full',
'bg-warning-500' => $task['tone'] === 'warning',
'bg-danger-500' => $task['tone'] === 'danger',
])></span>
<span class="min-w-0 flex-1">
<span class="block text-sm font-medium text-gray-950 dark:text-white">{{ $task['label'] }}</span>
<span class="block text-xs text-gray-500">{{ $task['detail'] }}</span>
</span>
<x-filament::icon icon="heroicon-m-chevron-right" class="size-4 text-gray-400" />
</a>
@empty
<p class="flex items-center gap-2 px-5 py-4 text-sm text-gray-500">
<x-filament::icon icon="heroicon-o-check-circle" class="size-5 text-success-500" />
Alles erledigt – nichts wartet auf Sie.
</p>
@endforelse
</section>
{{-- Letzte Änderungen --}}
@if ($activity)
<section class="rounded-xl bg-white shadow-xs ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
<h2 class="border-b border-gray-950/5 px-5 py-3 text-sm font-semibold text-gray-950 dark:border-white/10 dark:text-white">Letzte Änderungen</h2>
<ol class="divide-y divide-gray-950/5 dark:divide-white/10">
@foreach ($activity as $entry)
<li class="flex items-baseline gap-3 px-5 py-2.5 text-sm">
<span class="min-w-0 flex-1 truncate">
<span class="font-medium text-gray-950 dark:text-white">{{ $entry['label'] }}</span>
@if ($entry['detail'])<span class="text-gray-500"> · {{ $entry['detail'] }}</span>@endif
</span>
<span class="shrink-0 text-xs text-gray-500" title="{{ $entry['when'] }}">{{ $entry['who'] ? $entry['who'].', ' : '' }}{{ $entry['ago'] }}</span>
</li>
@endforeach
</ol>
</section>
@endif
</div>
{{-- Schnellzugriffe --}}
<section class="content-start rounded-xl bg-white shadow-xs ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
<h2 class="border-b border-gray-950/5 px-5 py-3 text-sm font-semibold text-gray-950 dark:border-white/10 dark:text-white">Schnellzugriffe</h2>
<div class="grid grid-cols-2 gap-2 p-3">
@foreach ($shortcuts as $shortcut)
<a href="{{ $shortcut['url'] }}" class="flex flex-col items-center gap-2 rounded-lg bg-gray-50 px-2 py-3.5 text-center text-xs font-medium text-gray-700 hover:bg-primary-50 hover:text-primary-700 dark:bg-white/5 dark:text-gray-300 dark:hover:bg-primary-500/10">
<x-filament::icon :icon="$shortcut['icon']" class="size-5 text-primary-600 dark:text-primary-400" />
{{ $shortcut['label'] }}
</a>
@endforeach
<a href="/" class="flex flex-col items-center gap-2 rounded-lg bg-gray-50 px-2 py-3.5 text-center text-xs font-medium text-gray-700 hover:bg-primary-50 hover:text-primary-700 dark:bg-white/5 dark:text-gray-300 dark:hover:bg-primary-500/10">
<x-filament::icon icon="heroicon-o-arrow-top-right-on-square" class="size-5 text-primary-600 dark:text-primary-400" />
Zum Portal
</a>
</div>
</section>
</div>
</div>
</x-filament-panels::page>

View file

@ -1,5 +1,5 @@
<x-filament-panels::page>
{{-- Eigene Anordnung mit Inline-Stilen: Filament liefert fertig kompiliertes CSS ohne freie Tailwind-Klassen. --}}
{{-- Eigene Anordnung: Formular links, Vorschau rechts (klebt beim Scrollen). --}}
<style>
.appearance-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1280px) { .appearance-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } .appearance-preview { position: sticky; top: 5rem; align-self: start; } }
@ -25,9 +25,10 @@
>
<form wire:submit="save" style="display: grid; gap: 1.5rem; align-content: start;">
@if ($this->hasDraft())
<x-filament::section compact>
<span style="color: #b45309; font-weight: 500;">Es gibt einen gespeicherten Entwurf, der noch nicht veröffentlicht ist.</span>
</x-filament::section>
<p class="flex items-center gap-2 rounded-lg bg-warning-50 px-3 py-2 text-[13px] font-medium text-warning-800 ring-1 ring-warning-600/20 dark:bg-warning-400/10 dark:text-warning-300">
<x-filament::icon icon="heroicon-o-pencil-square" class="size-4" />
Gespeicherter Entwurf – noch nicht veröffentlicht.
</p>
@endif
{{ $this->form }}

View file

@ -1,90 +1,130 @@
<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>
@php
$groups = [
'core' => ['Mitgeliefert', 'Teil von Inhaus – werden mit jeder Aktualisierung mitgeliefert.', $plugins->filter(fn ($p) => $p['manifest']->core)],
'custom' => ['Zusätzlich installiert', 'Eigene oder von Dritten bereitgestellte Plugins. Aktualisierungen von Inhaus lassen sie unverändert.', $plugins->reject(fn ($p) => $p['manifest']->core)],
];
@endphp
<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 class="grid gap-8">
@foreach ($groups as $key => [$title, $hint, $items])
<section class="grid gap-3">
<header>
<h2 class="text-base font-semibold text-gray-950 dark:text-white">
{{ $title }}
<span class="ms-1 text-sm font-normal text-gray-500">{{ $items->where('enabled', true)->count() }} von {{ $items->count() }} aktiv</span>
</h2>
<p class="text-[13px] text-gray-500 dark:text-gray-400">{{ $hint }}</p>
</header>
<div class="overflow-hidden rounded-xl bg-white shadow-xs ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
@forelse ($items as $plugin)
@php($m = $plugin['manifest'])
<div @class([
'flex flex-wrap items-center gap-x-4 gap-y-2 px-4 py-3 sm:flex-nowrap',
'border-t border-gray-950/5 dark:border-white/10' => ! $loop->first,
])>
<div @class([
'grid size-9 shrink-0 place-items-center rounded-lg text-sm font-semibold',
'bg-primary-50 text-primary-700 dark:bg-primary-500/10 dark:text-primary-400' => $plugin['enabled'],
'bg-gray-100 text-gray-400 dark:bg-white/5' => ! $plugin['enabled'],
])>{{ mb_strtoupper(mb_substr($m->name, 0, 1)) }}</div>
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-baseline gap-x-2">
<span class="text-sm font-semibold text-gray-950 dark:text-white">{{ $m->name }}</span>
<span class="text-xs text-gray-500">{{ $m->version }}@if (! $m->core && $m->author) · {{ $m->author }}@endif</span>
</div>
<p class="line-clamp-1 text-[13px] text-gray-500 dark:text-gray-400" title="{{ $m->description }}">{{ $m->description }}</p>
@if ($plugin['problem'] || $plugin['excluded'] || ($plugin['dependents'] && $plugin['enabled']))
<div class="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs">
@if ($plugin['problem'])
<span class="text-danger-600 dark:text-danger-400">{{ $plugin['problem'] }}</span>
@endif
@if ($plugin['excluded'])
<span class="text-warning-700 dark:text-warning-400">Ausgeschlossen: {{ implode(', ', $plugin['excluded']) }}</span>
@endif
@if ($plugin['dependents'] && $plugin['enabled'])
<span class="text-gray-500">benötigt von {{ implode(', ', $plugin['dependents']) }}</span>
@endif
</div>
@endif
</div>
<div class="flex shrink-0 items-center gap-2">
@if ($plugin['accessible'] && $plugin['enabled'])
{{ ($this->accessAction)(['slug' => $m->slug]) }}
@endif
@if (! $m->core && $uploadsAllowed)
<x-filament::dropdown placement="bottom-end">
<x-slot name="trigger">
<x-filament::icon-button icon="heroicon-o-ellipsis-vertical" color="gray" label="Weitere Aktionen" />
</x-slot>
<x-filament::dropdown.list>
<x-filament::dropdown.list.item icon="heroicon-o-trash" color="danger" wire:click="delete('{{ $m->slug }}', false)"
wire:confirm="„{{ $m->name }}“ löschen? Die Daten des Plugins bleiben in der Datenbank.">
Löschen
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item icon="heroicon-o-trash" color="danger" 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::dropdown.list.item>
</x-filament::dropdown.list>
</x-filament::dropdown>
@endif
{{-- Schalter aktiv/inaktiv --}}
<button
type="button"
role="switch"
aria-checked="{{ $plugin['enabled'] ? 'true' : 'false' }}"
aria-label="{{ $m->name }} {{ $plugin['enabled'] ? 'deaktivieren' : 'aktivieren' }}"
title="{{ $plugin['enabled'] ? 'Aktiv – zum Deaktivieren klicken' : 'Inaktiv – zum Aktivieren klicken' }}"
@disabled($plugin['enabled'] && $plugin['dependents'])
@if ($plugin['enabled'])
wire:click="deactivate('{{ $m->slug }}')"
wire:confirm="„{{ $m->name }}“ deaktivieren? Menüpunkte, Seiten und Kacheln verschwinden, die Daten bleiben erhalten."
@else
wire:click="activate('{{ $m->slug }}')"
@endif
wire:loading.attr="disabled"
@class([
'relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
'bg-primary-600' => $plugin['enabled'],
'bg-gray-200 dark:bg-white/15' => ! $plugin['enabled'],
])
>
<span @class([
'pointer-events-none mt-0.5 inline-block size-5 rounded-full bg-white shadow-sm transition-transform duration-200',
'translate-x-5.5' => $plugin['enabled'],
'translate-x-0.5' => ! $plugin['enabled'],
])></span>
</button>
</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
@if ($plugin['excluded'])
<div class="ih-meta">Ausgeschlossen: {{ implode(', ', $plugin['excluded']) }}</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 ($plugin['accessible'])
{{ ($this->accessAction)(['slug' => $m->slug]) }}
@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>
@empty
<p class="px-4 py-6 text-center text-sm text-gray-500">Noch keine zusätzlichen Plugins installiert.</p>
@endforelse
</div>
</x-filament::section>
@if ($key === 'custom')
@if ($uploadsAllowed)
<form wire:submit="installArchive" class="flex flex-wrap items-center gap-3 rounded-xl border border-dashed border-gray-300 px-4 py-3 dark:border-white/15">
<x-filament::icon icon="heroicon-o-arrow-up-tray" class="size-5 text-gray-400" />
<div class="min-w-0 flex-1">
<p class="text-sm font-medium text-gray-950 dark:text-white">Plugin installieren</p>
<p class="text-xs text-gray-500">ZIP-Archiv hochladen. Ein vorhandenes Plugin mit demselben Kürzel wird aktualisiert, seine Daten bleiben erhalten. Plugins laufen mit vollen Rechten – nur aus vertrauenswürdiger Quelle installieren.</p>
</div>
<input type="file" wire:model="archive" accept=".zip,application/zip" class="text-sm file:me-3 file:rounded-md file:border-0 file:bg-gray-100 file:px-3 file:py-1.5 file:text-sm file:font-medium dark:file:bg-white/10" />
<x-filament::button type="submit" size="sm" icon="heroicon-o-arrow-up-tray" wire:loading.attr="disabled" wire:target="archive,installArchive">Hochladen und installieren</x-filament::button>
@error('archive') <p class="w-full text-[13px] text-danger-600">{{ $message }}</p> @enderror
</form>
@else
<p class="text-[13px] text-gray-500">Das Installieren von Plugins ist in dieser Installation abgeschaltet (INHAUS_DISALLOW_FILE_MODS).</p>
@endif
@endif
</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="installArchive" 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,installArchive">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>