Files
Multi-Debrid-Downloader/src/renderer/shell/shell-model.ts
T
Sucukdeluxe 069babfd54 feat: deliver the redesigned desktop workspace
Rebuild downloads, link collection, settings, history, and statistics around a responsive desktop shell with compact account and queue tables, contextual navigation, persistent update affordances, unified overlays, and accessible keyboard interactions.

Add safe history-folder reveal IPC, responsive 2560/1920/1366/1120 coverage, deterministic visual fixtures, focused component regressions, and release-tree exclusions for internal working files. Bump the public application version to 2.0.13.
2026-08-10 14:15:57 +02:00

40 lines
1.1 KiB
TypeScript

import type { IconName } from "../ui/Icon";
export type MainView = "downloads" | "collector" | "settings" | "history" | "statistics";
export type ResponsiveShellMode = "full" | "compact" | "minimum";
export interface NavigationItem {
id: MainView;
label: string;
icon: IconName;
active: boolean;
}
const MAIN_NAVIGATION = [
{ id: "downloads", label: "Downloads", icon: "download" },
{ id: "collector", label: "Linksammler", icon: "collector" },
{ id: "settings", label: "Einstellungen", icon: "settings" },
{ id: "history", label: "Verlauf", icon: "history" },
{ id: "statistics", label: "Statistiken", icon: "statistics" }
] as const;
export function buildMainNavigation(active: MainView): NavigationItem[] {
return MAIN_NAVIGATION.map((item) => ({ ...item, active: item.id === active }));
}
export function getMainViewLabel(view: MainView): string {
return MAIN_NAVIGATION.find((item) => item.id === view)?.label ?? view;
}
export function getResponsiveShellMode(width: number): ResponsiveShellMode {
if (width <= 1120) {
return "minimum";
}
if (width <= 1366) {
return "compact";
}
return "full";
}