fix(control): use correct colors and include edge cases in select all displays button

This commit is contained in:
E44
2026-06-14 20:25:45 +02:00
parent 3174010e83
commit 87eaf90c12
+14 -2
View File
@@ -13,6 +13,7 @@
change_height, change_height,
current_height, current_height,
dnd_flip_duration_ms, dnd_flip_duration_ms,
get_selectable_color_classes,
is_display_drag, is_display_drag,
is_group_drag, is_group_drag,
next_height_step_size, next_height_step_size,
@@ -57,7 +58,7 @@
$effect(() => { $effect(() => {
const d = $display_groups; const d = $display_groups;
const sdi = $selected_display_ids; const sdi = $selected_display_ids;
all_groups_selected = liveQuery(() => all_selected(d || [], sdi)); all_groups_selected = liveQuery(() => d.length !== 0 && all_selected(d || [], sdi));
}); });
let last_pinned_pane_size: number = 45; let last_pinned_pane_size: number = 45;
@@ -217,11 +218,22 @@
</span> </span>
<div class="flex flex-row gap-1"> <div class="flex flex-row gap-1">
<button <button
class="min-w-40 px-4 rounded-xl cursor-pointer duration-200 transition-colors bg-stone-600" disabled={$display_groups?.length === 0}
class="min-w-40 px-4 rounded-xl duration-200 transition-colors {$display_groups?.length ===
0
? 'text-stone-500 cursor-not-allowed'
: 'cursor-pointer'} {get_selectable_color_classes($all_groups_selected || false, {
bg: true,
hover: $display_groups?.length !== 0,
active: $display_groups?.length !== 0,
text: true
})}"
onclick={async () => await toggle_all_selected_displays($display_groups)} onclick={async () => await toggle_all_selected_displays($display_groups)}
> >
<span>{$all_groups_selected || false ? 'Alle Abwählen' : 'Alle Auswählen'}</span> <span>{$all_groups_selected || false ? 'Alle Abwählen' : 'Alle Auswählen'}</span>
</button> </button>
<div class="flex flex-row"> <div class="flex flex-row">
<Button <Button
title="Bildschirme größer darstellen" title="Bildschirme größer darstellen"