refactor frontend

This commit is contained in:
Julian Freeman
2026-04-16 16:26:21 -04:00
parent 6cc694754f
commit dabd8789f4
14 changed files with 1574 additions and 1357 deletions

73
src/types/browser.ts Normal file
View File

@@ -0,0 +1,73 @@
export type BrowserStats = {
profileCount: number;
extensionCount: number;
bookmarkCount: number;
};
export type ProfileSummary = {
id: string;
name: string;
email: string | null;
avatarDataUrl: string | null;
avatarLabel: string;
path: string;
};
export type ExtensionSummary = {
id: string;
name: string;
version: string | null;
iconDataUrl: string | null;
profileIds: string[];
};
export type BookmarkSummary = {
url: string;
title: string;
profileIds: string[];
};
export type ProfileSortKey = "name" | "email" | "id";
export type ExtensionSortKey = "name" | "id";
export type BookmarkSortKey = "title" | "url";
export type ActiveSection = "profiles" | "extensions" | "bookmarks";
export type AppPage = "browserData" | "configuration";
export type BrowserConfigSource = "default" | "custom";
export type BrowserConfigEntry = {
id: string;
source: BrowserConfigSource;
browserFamilyId: string | null;
iconKey: string | null;
name: string;
executablePath: string;
userDataPath: string;
deletable: boolean;
};
export type BrowserConfigListResponse = {
configs: BrowserConfigEntry[];
};
export type CreateCustomBrowserConfigInput = {
name: string;
iconKey: string | null;
executablePath: string;
userDataPath: string;
};
export type BrowserView = {
browserId: string;
browserFamilyId: string | null;
browserName: string;
iconKey: string | null;
dataRoot: string;
profiles: ProfileSummary[];
extensions: ExtensionSummary[];
bookmarks: BookmarkSummary[];
stats: BrowserStats;
};
export type ScanResponse = {
browsers: BrowserView[];
};