Restore isolated node logins as separate Synapsis windows and remove native and custom tab behavior

Hop-State: A_06FPHMM1PFMSCK40M0GEWBR
Hop-Proposal: R_06FPHMKH27FXXCWW817HVYR
Hop-Task: T_06FPHGD2KCWG1MGS7615MY8
Hop-Attempt: AT_06FPHGD2KE7PCEC2AXHKM18
This commit is contained in:
2026-07-15 19:47:34 -07:00
committed by Hop
parent 0de53279c0
commit ec3c8d58b0
2 changed files with 10 additions and 15 deletions
+7 -11
View File
@@ -345,14 +345,14 @@ fn new_window_button_script(accent_color: Option<&str>) -> String {
button.id = id; button.id = id;
button.type = "button"; button.type = "button";
button.innerHTML = '<svg viewBox="0 0 22 22" aria-hidden="true"><path d="M11 2.5V19.5M2.5 11H19.5" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"/></svg>'; button.innerHTML = '<svg viewBox="0 0 22 22" aria-hidden="true"><path d="M11 2.5V19.5M2.5 11H19.5" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round"/></svg>';
button.setAttribute("aria-label", "Open another Synapsis node tab"); button.setAttribute("aria-label", "Open another Synapsis node window");
button.title = "Open another node tab"; button.title = "Open another node";
button.addEventListener("click", async () => { button.addEventListener("click", async () => {
button.disabled = true; button.disabled = true;
try { try {
await window.__TAURI_INTERNALS__.invoke("open_login_window"); await window.__TAURI_INTERNALS__.invoke("open_login_window");
} catch (error) { } catch (error) {
console.error("Could not open another Synapsis node tab", error); console.error("Could not open another Synapsis window", error);
} finally { } finally {
button.disabled = false; button.disabled = false;
} }
@@ -384,7 +384,7 @@ async fn open_login_window(
) -> Result<(), String> { ) -> Result<(), String> {
let sequence = state.window_sequence.fetch_add(1, Ordering::Relaxed); let sequence = state.window_sequence.fetch_add(1, Ordering::Relaxed);
let label = format!("node-{sequence}"); let label = format!("node-{sequence}");
let builder = WebviewWindowBuilder::new( WebviewWindowBuilder::new(
&app, &app,
label, label,
WebviewUrl::App("index.html?newWindow=1".into()), WebviewUrl::App("index.html?newWindow=1".into()),
@@ -395,17 +395,13 @@ async fn open_login_window(
.inner_size(1280.0, 820.0) .inner_size(1280.0, 820.0)
.min_inner_size(720.0, 560.0) .min_inner_size(720.0, 560.0)
.center() .center()
.theme(Some(tauri::Theme::Dark))
.background_color(tauri::webview::Color(8, 9, 9, 255));
#[cfg(target_os = "macos")]
let builder = builder
.hidden_title(true) .hidden_title(true)
.title_bar_style(tauri::TitleBarStyle::Visible) .title_bar_style(tauri::TitleBarStyle::Visible)
.tabbing_identifier("synapsis-node-tabs"); .theme(Some(tauri::Theme::Dark))
builder .background_color(tauri::webview::Color(8, 9, 9, 255))
.build() .build()
.map(|_| ()) .map(|_| ())
.map_err(|error| format!("Couldnt open another Synapsis node tab: {error}")) .map_err(|error| format!("Couldnt open another Synapsis window: {error}"))
} }
#[tauri::command] #[tauri::command]
-1
View File
@@ -20,7 +20,6 @@
"center": true, "center": true,
"hiddenTitle": true, "hiddenTitle": true,
"titleBarStyle": "Visible", "titleBarStyle": "Visible",
"tabbingIdentifier": "synapsis-node-tabs",
"theme": "Dark", "theme": "Dark",
"backgroundColor": "#080909" "backgroundColor": "#080909"
} }