High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
fix: remove backend settings API calls, use localStorage only
Bosch73aca9800e6f
diff --git a/dashboard/src/pages/SettingsPage.tsx b/dashboard/src/pages/SettingsPage.tsxindex 8f9a1b4b..0975e402 100644--- a/dashboard/src/pages/SettingsPage.tsx+++ b/dashboard/src/pages/SettingsPage.tsx@@ -7,37 +7,24 @@ import type { Settings } from "../types";export default function SettingsPage() {const { settings, serverInfo, setSettings, setServerInfo } = useAppStore();const [local, setLocal] = useState<Settings>(settings);- const [saving, setSaving] = useState(false);- // Load settings on mount+ // Load server info on mount (settings come from localStorage via store)useEffect(() => {const load = async () => {try {- const [s, h] = await Promise.all([- api.fetchSettings(),- api.fetchHealth(),- ]);- setSettings(s);- setLocal(s);+ const h = await api.fetchHealth();setServerInfo(h);} catch (e) {- console.error("Failed to load settings", e);+ console.error("Failed to load server info", e);}};load();// eslint-disable-next-line react-hooks/exhaustive-deps}, []);- const handleSave = async () => {- setSaving(true);- try {- const updated = await api.updateSettings(local);- setSettings(updated);- } catch (e) {- console.error("Failed to save settings", e);- } finally {- setSaving(false);- }+ const handleSave = () => {+ // Settings are persisted to localStorage via setSettings+ setSettings(local);};const handleReset = () => setLocal(settings);@@ -48,8 +35,8 @@ export default function SettingsPage() {<Button variant="secondary" onClick={handleReset}>Reset</Button>- <Button variant="primary" onClick={handleSave} disabled={saving}>- {saving ? "Saving..." : "Apply Settings"}+ <Button variant="primary" onClick={handleSave}>+ Apply Settings</Button></div>diff --git a/dashboard/src/services/api.ts b/dashboard/src/services/api.tsindex afd6c10e..c8ef1533 100644--- a/dashboard/src/services/api.ts+++ b/dashboard/src/services/api.ts@@ -4,7 +4,6 @@ import type {InstanceTab,InstanceMetrics,Agent,- Settings,ServerInfo,CreateProfileRequest,CreateProfileResponse,@@ -81,19 +80,6 @@ export async function fetchAgents(): Promise<Agent[]> {return request<Agent[]>("/api/agents");}-// Settings — TODO: check if endpoint exists-export async function fetchSettings(): Promise<Settings> {- return request<Settings>("/api/settings");-}--export async function updateSettings(settings: Settings): Promise<Settings> {- return request<Settings>("/api/settings", {- method: "PUT",- headers: { "Content-Type": "application/json" },- body: JSON.stringify(settings),- });-}-// Healthexport async function fetchHealth(): Promise<ServerInfo> {return request<ServerInfo>("/health");