fix: Navigator folgt dem Unraid-Theme

Die Seite übernimmt das Display-Theme aus Unraid (black/gray dunkel,
white/azure hell) als data-theme; die Farben hängen nicht mehr nur an
prefers-color-scheme. Ohne bekanntes Theme wird der Seitenhintergrund
ausgewertet. Paket 2026.11.21.r004.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mikei386andClaude Opus 5.5 committed 2026-11-21 13:26:12 +01:00
1 parent 17cb65bd64
commit a7e8325853
7 files changed
+46 -5

No files matched your search

@@ -9,9 +9,12 @@ Tag="Navigator U-Navigator Unraid File Navigator files explorer"
<?PHP
$plugin = "u-navigator";
$version = "__VERSION__";
// Follow the Unraid display theme (Settings > Display Settings): black/gray are dark, white/azure light.
$unavUnraidTheme = (string)($display['theme'] ?? '');
$unavTheme = in_array($unavUnraidTheme, ['black', 'gray'], true) ? 'dark' : (in_array($unavUnraidTheme, ['white', 'azure'], true) ? 'light' : '');
?>
<link rel="stylesheet" href="/plugins/<?=$plugin?>/assets/styles.css?v=<?=$version?>">
<div class="u-nav app-shell">
<div class="u-nav app-shell"<?=$unavTheme ? ' data-theme="'.$unavTheme.'"' : ''?> data-unraid-theme="<?=htmlspecialchars($unavUnraidTheme)?>">
<header class="topbar">
<div>
<h1>U-Navigator</h1>