diff --git a/apps/yaak-proxy/components/ProxyLayout.tsx b/apps/yaak-proxy/components/ProxyLayout.tsx
index 03e03994d..00d72a756 100644
--- a/apps/yaak-proxy/components/ProxyLayout.tsx
+++ b/apps/yaak-proxy/components/ProxyLayout.tsx
@@ -29,7 +29,7 @@ import { HelperDialog } from "./HelperDialog";
import { SaveDialog } from "./SaveDialog";
import { SavedSearchDialog } from "./SavedSearchDialog";
import { SearchBar } from "./SearchBar";
-import { SettingsWindow, useOpenSettings } from "./Settings";
+import { SettingsDialogFallback, useOpenSettings } from "./Settings";
import { Sidebar } from "./Sidebar";
import { TakeOverBanner } from "./TakeOverBanner";
@@ -175,7 +175,7 @@ export function ProxyLayout() {
-
+
);
diff --git a/apps/yaak-proxy/components/Settings.tsx b/apps/yaak-proxy/components/Settings.tsx
index 169b5359c..0904f0ffd 100644
--- a/apps/yaak-proxy/components/Settings.tsx
+++ b/apps/yaak-proxy/components/Settings.tsx
@@ -13,27 +13,38 @@ import {
SettingsGeneral,
SettingsInterface,
SettingsTheme,
+ type SettingsTitlebar,
+ Toasts,
} from "@yaakapp-internal/ui";
-import { atom, useAtom, useSetAtom } from "jotai";
-import { useEffect, useMemo, useState } from "react";
+import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
+import { useCallback, useEffect, useMemo, useState } from "react";
import { settingsValuesAtom } from "../lib/interfaceSettings";
import { openLink, revealPath } from "../lib/opener";
import { proxySettingsView } from "../lib/settings";
-import { getOsType } from "../lib/tauri";
+import { closeWindow, command, currentWindowLabel, getOsType, subscribe } from "../lib/tauri";
import { useShowToast } from "../lib/toast";
+import {
+ openSettingsVia,
+ requestedSettingsTab,
+ SETTINGS_TAB_EVENT,
+ windowKind,
+} from "../lib/windows";
+import { HelperDialog } from "./HelperDialog";
+import { useProxySetup } from "./ProxyStatus";
import { SettingsProxy } from "./SettingsProxy";
export const SETTINGS_TAB_PROXY = "proxy";
-/** The settings window is open, on a tab, or closed */
-export const settingsOpenAtom = atom(null);
+/** The settings dialog is open, on a tab, or closed, where Settings has no window of its own */
+const settingsDialogAtom = atom(null);
/**
* Yaak's settings, shared: its General, Theme, Interface and License tabs, plus the proxy's own
- * Proxy tab. The header's gear and `⌘,` open it.
+ * Proxy tab. The header's gear and `⌘,` open it in a window of its own, or, where the app has
+ * no second window to give, such as the browser harness, in this dialog.
*/
-export function SettingsWindow() {
- const [tab, setTab] = useAtom(settingsOpenAtom);
+export function SettingsDialogFallback() {
+ const [tab, setTab] = useAtom(settingsDialogAtom);
useSettingsHotkey();
return (