force launcher restart after update
This commit is contained in:
+15
-2
@@ -775,8 +775,21 @@ function createWindow(): void {
|
||||
await installDebPackage(debPath)
|
||||
|
||||
if (!is.dev) {
|
||||
app.relaunch()
|
||||
app.quit()
|
||||
for (const child of appProcesses.values()) {
|
||||
child.kill()
|
||||
}
|
||||
appProcesses.clear()
|
||||
|
||||
for (const win of appWindows.values()) {
|
||||
if (!win.isDestroyed()) win.close()
|
||||
}
|
||||
appWindows.clear()
|
||||
|
||||
setImmediate(() => {
|
||||
app.relaunch()
|
||||
app.quit()
|
||||
setTimeout(() => app.exit(0), 1000)
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -630,7 +630,7 @@ body,
|
||||
|
||||
.launcher-version-wrap {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
left: 24px;
|
||||
bottom: 16px;
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
@@ -638,6 +638,22 @@ body,
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.app-version-wrap {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
bottom: 16px;
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
max-width: min(360px, 42vw);
|
||||
}
|
||||
|
||||
.app-version-wrap .version-label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.launcher-update-text {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -107,6 +107,9 @@ function Dashboard({ authSession, onSessionUpdate, onLogout }: DashboardProps):
|
||||
: launcherStatus
|
||||
? '최신버전'
|
||||
: '업데이트 상태 확인중'
|
||||
const activeAppVersion = activeApp
|
||||
? activeLocalVersion ?? appStatus?.localVersion ?? appStatus?.latestVersion ?? null
|
||||
: null
|
||||
|
||||
const refreshSession = useCallback(async (): Promise<AuthSession | null> => {
|
||||
const response = await fetch(`${LAUNCHER_API_BASE_URL}/api/auth/refresh`, {
|
||||
@@ -737,19 +740,26 @@ function Dashboard({ authSession, onSessionUpdate, onLogout }: DashboardProps):
|
||||
)}
|
||||
|
||||
{!showManual && (
|
||||
<div className="launcher-version-wrap">
|
||||
{launcherUpdateAvailable && (
|
||||
<button
|
||||
type="button"
|
||||
className="launcher-update-text"
|
||||
onClick={() => handleUpdate('launcher', launcherStatus.latestVersion, launcherStatus.downloadUrl)}
|
||||
disabled={hasAnyUpdatingApp}
|
||||
>
|
||||
업데이트
|
||||
</button>
|
||||
<>
|
||||
<div className="launcher-version-wrap">
|
||||
{launcherUpdateAvailable && (
|
||||
<button
|
||||
type="button"
|
||||
className="launcher-update-text"
|
||||
onClick={() => handleUpdate('launcher', launcherStatus.latestVersion, launcherStatus.downloadUrl)}
|
||||
disabled={hasAnyUpdatingApp}
|
||||
>
|
||||
업데이트
|
||||
</button>
|
||||
)}
|
||||
<div className="version-label">Launcher v{localVersions.launcher ?? version}</div>
|
||||
</div>
|
||||
{activeAppVersion && (
|
||||
<div className="app-version-wrap">
|
||||
<div className="version-label">{appConfig?.displayName ?? activeApp} v{activeAppVersion}</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="version-label">v{localVersions.launcher ?? version}</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user