Move SealShare onto Livewire Material

Replaces maryUI and daisyUI with nonameweb/livewire-material: the Vibrant
indigo scheme, a system/light/dark theme under sealshare-theme, one top
app bar with the account menu, the upload drop zone and link-ready
moments, M3 fields, dialogs instead of wire:confirm, snackbars instead of
flashed messages, a sortable admin table, and the starter-kit cleanup.
Docker builds assets after Composer; CI drops the Flux step.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
This commit is contained in:
Andreas Reinhold / reini
2026-09-13 10:49:38 +02:00
co-authored by Claude Opus 5
parent 6d7120e8e2
commit c4a17b65c8
70 changed files with 3043 additions and 1680 deletions
+17 -17
View File
@@ -14,37 +14,38 @@ class AdminDashboard extends Component
{
use WithPagination;
/** @var array<string, string> */
/**
* The columns the table can be sorted by.
*
* @var list<string>
*/
public const SORTABLE = ['token', 'files_count', 'total_size', 'download_count', 'expires_at', 'created_at'];
/** @var array{column: string, direction: string} */
public array $sortBy = ['column' => 'created_at', 'direction' => 'desc'];
/** The share the delete dialog is asking about, while it is open. */
public ?int $deletingShareId = null;
public function deleteShare(int $shareId, ShareService $shareService): void
{
$share = Share::query()->findOrFail($shareId);
$shareService->deleteShare($share);
}
/**
* @return array<string, array<string, string|bool>>
*/
public function headers(): array
{
return [
['key' => 'token', 'label' => __('Token')],
['key' => 'files_count', 'label' => __('Files')],
['key' => 'total_size', 'label' => __('Size')],
['key' => 'download_count', 'label' => __('Downloads')],
['key' => 'expires_at', 'label' => __('Expires')],
['key' => 'created_at', 'label' => __('Created')],
];
$this->deletingShareId = null;
}
public function render(): mixed
{
$shareService = app(ShareService::class);
// The sort comes from the browser: only a known column and direction reach the query.
$column = in_array($this->sortBy['column'] ?? null, self::SORTABLE, true) ? $this->sortBy['column'] : 'created_at';
$direction = ($this->sortBy['direction'] ?? null) === 'asc' ? 'asc' : 'desc';
$shares = Share::query()
->withCount('files')
->orderBy($this->sortBy['column'], $this->sortBy['direction'])
->orderBy($column, $direction)
->paginate(15);
return view('livewire.admin.admin-dashboard', [
@@ -56,7 +57,6 @@ class AdminDashboard extends Component
'totalFiles' => ShareFile::query()->count(),
'usedSpace' => $shareService->getTotalUsedSpace(),
'maxQuota' => $shareService->getMaxStorageQuota(),
'headers' => $this->headers(),
]);
}
}