adding duplication and syncing of workspaces, a settings dialog and variable listing and editing

This commit is contained in:
xyroscar
2025-11-26 11:25:57 -08:00
parent e2a7761388
commit ce75694ffb
9 changed files with 1587 additions and 35 deletions

View File

@@ -0,0 +1,33 @@
import type { AppSettings } from "$lib/types/workspace";
let settings: AppSettings = {
theme: "system",
defaultTimeout: 30000,
followRedirects: true,
validateSSL: true,
maxHistoryItems: 100,
autoSaveRequests: true,
};
export async function get_settings(): Promise<AppSettings> {
return { ...settings };
}
export async function update_settings(
updates: Partial<AppSettings>
): Promise<AppSettings> {
settings = { ...settings, ...updates };
return { ...settings };
}
export async function reset_settings(): Promise<AppSettings> {
settings = {
theme: "system",
defaultTimeout: 30000,
followRedirects: true,
validateSSL: true,
maxHistoryItems: 100,
autoSaveRequests: true,
};
return { ...settings };
}