Neues Design: Tailwind + shadcn-vue statt Vuetify/Material 3
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 1m3s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 1m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 1m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m29s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m28s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m33s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 1m3s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m7s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 1m16s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 1m20s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m29s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m33s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m28s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m33s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
- Nüchterne, professionelle Optik: neutrale Flächen, Markenfarbe nur als Akzent, Inter-Schrift (lokal) - Zweizeiliger Header mit Suche, Hauptnavigation und Avatar-Menü - Startseite mit Begrüßungskarte, Schnellzugriffen und „Neu im Team“ - Personenverzeichnis mit Suche, Abteilungsfilter und Seitenaufteilung - Markenfarbe exakt übernommen, Abstufungen serverseitig in OKLCH (ColorPalette) – gemeinsam für Portal und Admin, keine Farbberechnung im Browser - Schnellzugriffe im Admin pflegbar - Filament-Avatare lokal statt über ui-avatars.com (DSGVO) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9c0f8de791
commit
5a3f1f34c7
141 changed files with 3873 additions and 974 deletions
39
app/Filament/AvatarProviders/InitialsAvatarProvider.php
Normal file
39
app/Filament/AvatarProviders/InitialsAvatarProvider.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\AvatarProviders;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Support\Branding;
|
||||
use Filament\AvatarProviders\Contracts\AvatarProvider;
|
||||
use Filament\Facades\Filament;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Initialen-Avatar als eingebettetes SVG. Ersetzt Filaments Standard, der die
|
||||
* Bilder von ui-avatars.com lädt – personenbezogene Daten gehen so nicht an Dritte.
|
||||
*/
|
||||
class InitialsAvatarProvider implements AvatarProvider
|
||||
{
|
||||
public function __construct(private readonly Branding $branding) {}
|
||||
|
||||
public function get(Model $record): string
|
||||
{
|
||||
$initials = $record instanceof User
|
||||
? $record->initials
|
||||
: mb_strtoupper(mb_substr(Filament::getNameForDefaultAvatar($record), 0, 1));
|
||||
|
||||
$palette = $this->branding->palette();
|
||||
$background = $palette[100];
|
||||
$foreground = $palette[800];
|
||||
|
||||
$svg = sprintf(
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" fill="%s"/>'
|
||||
.'<text x="50%%" y="50%%" dy=".35em" text-anchor="middle" font-family="Inter, system-ui, sans-serif" font-size="26" font-weight="600" fill="%s">%s</text></svg>',
|
||||
$background,
|
||||
$foreground,
|
||||
htmlspecialchars($initials, ENT_XML1),
|
||||
);
|
||||
|
||||
return 'data:image/svg+xml;base64,'.base64_encode($svg);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,11 +22,11 @@ use UnitEnum;
|
|||
*/
|
||||
class Appearance extends Page
|
||||
{
|
||||
protected string $view = 'filament.pages.appearance';
|
||||
protected string $view = 'filament.pages.settings-form';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedPaintBrush;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'System';
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Portal';
|
||||
|
||||
protected static ?string $navigationLabel = 'Erscheinungsbild';
|
||||
|
||||
|
|
|
|||
94
app/Filament/Pages/QuickLinksSettings.php
Normal file
94
app/Filament/Pages/QuickLinksSettings.php
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Support\QuickLinks;
|
||||
use App\Support\Settings;
|
||||
use BackedEnum;
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use UnitEnum;
|
||||
|
||||
class QuickLinksSettings extends Page
|
||||
{
|
||||
protected string $view = 'filament.pages.settings-form';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSquares2x2;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Portal';
|
||||
|
||||
protected static ?string $navigationLabel = 'Schnellzugriffe';
|
||||
|
||||
protected static ?string $title = 'Schnellzugriffe';
|
||||
|
||||
protected static ?string $slug = 'schnellzugriffe';
|
||||
|
||||
/** @var array<string, mixed>|null */
|
||||
public ?array $data = [];
|
||||
|
||||
public function mount(QuickLinks $quickLinks): void
|
||||
{
|
||||
$this->form->fill(['links' => $quickLinks->all()]);
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Section::make('Schnellzugriffe auf der Startseite')
|
||||
->description('Häufig genutzte Anwendungen und Seiten – z. B. Zeiterfassung, Urlaubsantrag oder IT-Support. Die Reihenfolge lässt sich per Ziehen ändern.')
|
||||
->schema([
|
||||
Repeater::make('links')
|
||||
->hiddenLabel()
|
||||
->columns(4)
|
||||
->reorderable()
|
||||
->collapsible()
|
||||
->itemLabel(fn (array $state) => $state['label'] ?? null)
|
||||
->addActionLabel('Schnellzugriff hinzufügen')
|
||||
->maxItems(24)
|
||||
->schema([
|
||||
TextInput::make('label')
|
||||
->label('Bezeichnung')
|
||||
->required()
|
||||
->maxLength(40),
|
||||
TextInput::make('url')
|
||||
->label('Adresse')
|
||||
->placeholder('https://… oder /personen')
|
||||
->required()
|
||||
->maxLength(500)
|
||||
->regex('#^(https?://|/)#i')
|
||||
->validationMessages(['regex' => 'Bitte eine Adresse angeben, die mit https://, http:// oder / beginnt.'])
|
||||
->columnSpan(2),
|
||||
Select::make('icon')
|
||||
->label('Symbol')
|
||||
->options(QuickLinks::ICONS)
|
||||
->default('link')
|
||||
->required(),
|
||||
Toggle::make('new_tab')
|
||||
->label('In neuem Tab öffnen')
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
]),
|
||||
])
|
||||
->statePath('data');
|
||||
}
|
||||
|
||||
public function save(Settings $settings): void
|
||||
{
|
||||
$links = array_values($this->form->getState()['links'] ?? []);
|
||||
|
||||
$settings->set('portal.quick_links', $links);
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
->title('Schnellzugriffe gespeichert')
|
||||
->send();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue