mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-01 16:15:24 +00:00
feat: Version Number on offline servers (#1291)
https://github.com/Termix-SSH/Support/issues/1291
This commit is contained in:
1 parent
0b7e616419
commit
4052d63594
1 file changed
+15
@@ -830,7 +830,22 @@ export function UserProfilePanel({
|
|||||||
setVersionStatus(info.status ?? "unknown");
|
setVersionStatus(info.status ?? "unknown");
|
||||||
setReleaseUrl(releaseUrlFrom(info));
|
setReleaseUrl(releaseUrlFrom(info));
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// Backend/network unreachable (offline machine). The installer
|
||||||
|
// version is still known locally via Electron, so use that instead
|
||||||
|
// of leaving the version blank.
|
||||||
|
if (isElectron()) {
|
||||||
|
window.electronAPI
|
||||||
|
?.getAppVersion?.()
|
||||||
|
.then((appVersion) => {
|
||||||
|
if (appVersion) {
|
||||||
|
setVersion(appVersion);
|
||||||
|
setVersionStatus("unknown");
|
||||||
|
}
|
||||||
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
});
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|
||||||
// The rail can toggle these from its right-click menu while this panel is
|
// The rail can toggle these from its right-click menu while this panel is
|
||||||
|
|||||||
Reference in new issue
Block a user