위젯 추가 팝업 수정
This commit is contained in:
@@ -9,6 +9,11 @@ export type DesktopUpdatePhase =
|
||||
| 'relaunching'
|
||||
| 'error';
|
||||
|
||||
export interface DesktopUpdateOptions {
|
||||
/** 수동 업데이트·재시도 시 반복 실패 가드 무시 */
|
||||
bypassLoopGuard?: boolean;
|
||||
}
|
||||
|
||||
export interface DesktopUpdateProgress {
|
||||
phase: DesktopUpdatePhase;
|
||||
message: string;
|
||||
@@ -35,6 +40,7 @@ export interface DesktopBridge {
|
||||
checkForUpdates: () => Promise<{ available: boolean; version?: string; message?: string }>;
|
||||
runDesktopUpdate: (
|
||||
onProgress?: (progress: DesktopUpdateProgress) => void,
|
||||
options?: DesktopUpdateOptions,
|
||||
) => Promise<DesktopUpdateResult>;
|
||||
getAppVersion: () => Promise<string>;
|
||||
syncMainWindowTitle: () => Promise<string>;
|
||||
@@ -69,12 +75,13 @@ export async function checkDesktopUpdates(): Promise<{ available: boolean; versi
|
||||
|
||||
export async function runDesktopUpdate(
|
||||
onProgress?: (progress: DesktopUpdateProgress) => void,
|
||||
options?: DesktopUpdateOptions,
|
||||
): Promise<DesktopUpdateResult> {
|
||||
const bridge = getDesktopBridge();
|
||||
if (!bridge?.runDesktopUpdate) {
|
||||
return { ok: false, phase: 'error', message: '데스크톱 앱에서만 사용 가능합니다.' };
|
||||
}
|
||||
return bridge.runDesktopUpdate(onProgress);
|
||||
return bridge.runDesktopUpdate(onProgress, options);
|
||||
}
|
||||
|
||||
export async function getDesktopAppVersion(): Promise<string | null> {
|
||||
|
||||
Reference in New Issue
Block a user