앱 버전표시
This commit is contained in:
@@ -37,6 +37,7 @@ export interface DesktopBridge {
|
||||
onProgress?: (progress: DesktopUpdateProgress) => void,
|
||||
) => Promise<DesktopUpdateResult>;
|
||||
getAppVersion: () => Promise<string>;
|
||||
syncMainWindowTitle: () => Promise<string>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
@@ -85,3 +86,13 @@ export async function getDesktopAppVersion(): Promise<string | null> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function syncDesktopMainWindowTitle(): Promise<string | null> {
|
||||
const bridge = getDesktopBridge();
|
||||
if (!bridge?.syncMainWindowTitle) return null;
|
||||
try {
|
||||
return await bridge.syncMainWindowTitle();
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user