refactor(app): restructure settings with modular section navigation

This commit is contained in:
Mohamed Boudra
2026-04-18 14:21:40 +07:00
parent 63a46acaf1
commit 5c3cc99d8c
41 changed files with 2526 additions and 2317 deletions
+14 -4
View File
@@ -15,8 +15,7 @@ async function loadDesktopDaemonServerId(): Promise<DesktopDaemonServerIdResult>
};
}
export function useIsLocalDaemon(serverId: string): boolean {
const normalizedServerId = serverId.trim();
export function useLocalDaemonServerId(): string | null {
const isDesktopApp = shouldUseDesktopDaemon();
const query = useQuery({
@@ -32,9 +31,20 @@ export function useIsLocalDaemon(serverId: string): boolean {
retry: false,
});
if (!isDesktopApp || normalizedServerId.length === 0) {
if (!isDesktopApp) {
return null;
}
return query.data?.serverId ?? null;
}
export function useIsLocalDaemon(serverId: string): boolean {
const normalizedServerId = serverId.trim();
const localServerId = useLocalDaemonServerId();
if (localServerId === null || normalizedServerId.length === 0) {
return false;
}
return query.data?.serverId === normalizedServerId;
return localServerId === normalizedServerId;
}