mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
fix(control): add filter_file_selection_for_current_selected_displays after all display selects
This commit is contained in:
@@ -3,6 +3,7 @@ import type { Display, DisplayGroup, DisplayStatus } from "../types";
|
|||||||
import { is_selected, select, selected_display_ids } from "./select";
|
import { is_selected, select, selected_display_ids } from "./select";
|
||||||
import { get_uuid, image_content_hash } from "../utils";
|
import { get_uuid, image_content_hash } from "../utils";
|
||||||
import { get_screenshot } from "../api_handler";
|
import { get_screenshot } from "../api_handler";
|
||||||
|
import { filter_file_selection_for_current_selected_displays } from "./files";
|
||||||
|
|
||||||
export const displays: Writable<DisplayGroup[]> = writable<DisplayGroup[]>([{
|
export const displays: Writable<DisplayGroup[]> = writable<DisplayGroup[]>([{
|
||||||
id: get_uuid(),
|
id: get_uuid(),
|
||||||
@@ -33,6 +34,7 @@ export async function edit_display_data(display_id: string, ip: string, mac: str
|
|||||||
|
|
||||||
export function remove_display(display_id: string) {
|
export function remove_display(display_id: string) {
|
||||||
select(selected_display_ids, display_id, false);
|
select(selected_display_ids, display_id, false);
|
||||||
|
filter_file_selection_for_current_selected_displays();
|
||||||
displays.update((displays: DisplayGroup[]) => {
|
displays.update((displays: DisplayGroup[]) => {
|
||||||
displays = displays.map(display_group => ({
|
displays = displays.map(display_group => ({
|
||||||
...display_group,
|
...display_group,
|
||||||
@@ -58,6 +60,7 @@ export function select_all_of_group(display_group: DisplayGroup, new_value: bool
|
|||||||
for (const display of display_group.data) {
|
for (const display of display_group.data) {
|
||||||
select(selected_display_ids, display.id, new_value);
|
select(selected_display_ids, display.id, new_value);
|
||||||
}
|
}
|
||||||
|
filter_file_selection_for_current_selected_displays();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function set_new_display_group_data(display_group_id: string, new_data: Display[]) {
|
export function set_new_display_group_data(display_group_id: string, new_data: Display[]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user