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
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:
parent
ff4a26ecb4
commit
c495dfa1cb
144 changed files with 1601 additions and 813 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue