chore: migrate frontend assets to OSS and same-origin APIs
This commit is contained in:
+5
-2
@@ -28,6 +28,7 @@ import {
|
||||
SERVER_SESSION_REPLACED_EVENT,
|
||||
SERVER_SESSION_EXPIRED_EVENT,
|
||||
checkServerHealth,
|
||||
clearAllUserStorage,
|
||||
getErrorMessage,
|
||||
type ServerSessionReplacedDetail,
|
||||
} from "./api/serverConnection";
|
||||
@@ -143,7 +144,9 @@ function normalizeViewKey(rawView: string): WebViewKey {
|
||||
}
|
||||
|
||||
function readViewFromHash(): WebViewKey {
|
||||
return normalizeViewKey(window.location.hash.replace(/^#\/?/, ""));
|
||||
const raw = window.location.hash.replace(/^#\/?/, "");
|
||||
if (!raw) return "home";
|
||||
return normalizeViewKey(raw);
|
||||
}
|
||||
|
||||
function isWorkspaceView(view: WebViewKey): boolean {
|
||||
@@ -375,7 +378,7 @@ function App() {
|
||||
}, [setView, setWorkspaceExpanded]);
|
||||
|
||||
const clearAuthenticatedState = useCallback((options?: { resetView?: boolean }) => {
|
||||
keyServerClient.clearSession();
|
||||
clearAllUserStorage();
|
||||
clearSessionState();
|
||||
setProjects([]);
|
||||
setProjectsLoaded(true);
|
||||
|
||||
Reference in New Issue
Block a user