fix: add host issue, screen flickering issue, 2fa issue, open terminal session icon missing issue

This commit is contained in:
LukeGus
2026-01-26 00:28:40 -06:00
parent 1c9d4560c7
commit 98b760ce64
7 changed files with 88 additions and 139 deletions
-4
View File
@@ -255,10 +255,6 @@ function AppContent({
setTimeout(async () => {
try {
await logoutUser();
if (isElectron()) {
localStorage.removeItem("jwt");
}
} catch (error) {
console.error("Logout failed:", error);
}
+1 -3
View File
@@ -309,7 +309,7 @@ export function Auth({
"*",
);
setWebviewAuthSuccess(true);
setTimeout(() => window.location.reload(), 100);
return;
} catch (e) {
console.error("Error posting auth success message:", e);
}
@@ -518,7 +518,6 @@ export function Auth({
"*",
);
setWebviewAuthSuccess(true);
setTimeout(() => window.location.reload(), 100);
setTotpLoading(false);
return;
} catch (e) {
@@ -655,7 +654,6 @@ export function Auth({
"*",
);
setWebviewAuthSuccess(true);
setTimeout(() => window.location.reload(), 100);
setOidcLoading(false);
return;
} catch (e) {
+24 -2
View File
@@ -1029,7 +1029,7 @@ export async function createSSHHost(hostData: SSHHostData): Promise<SSHHost> {
return response.data;
}
} catch (error) {
handleApiError(error, "create SSH host");
throw handleApiError(error, "create SSH host");
}
}
@@ -1107,7 +1107,7 @@ export async function updateSSHHost(
return response.data;
}
} catch (error) {
handleApiError(error, "update SSH host");
throw handleApiError(error, "update SSH host");
}
}
@@ -2381,8 +2381,30 @@ export async function logoutUser(): Promise<{
}> {
try {
const response = await authApi.post("/users/logout");
if (isElectron()) {
localStorage.removeItem("jwt");
electronSettingsCache.delete("jwt");
} else {
const isSecure = window.location.protocol === "https:";
const cookieString = isSecure
? "jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; Secure; SameSite=Strict"
: "jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Strict";
document.cookie = cookieString;
}
return response.data;
} catch (error) {
if (isElectron()) {
localStorage.removeItem("jwt");
electronSettingsCache.delete("jwt");
} else {
const isSecure = window.location.protocol === "https:";
const cookieString = isSecure
? "jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; Secure; SameSite=Strict"
: "jwt=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Strict";
document.cookie = cookieString;
}
handleApiError(error, "logout user");
}
}