feat(react/settings): port electron integration

This commit is contained in:
Elian Doran
2025-08-14 21:42:48 +03:00
parent 0db556fac2
commit 81ac390eab
4 changed files with 43 additions and 83 deletions

View File

@@ -13,7 +13,7 @@ export function reloadFrontendApp(reason?: string) {
window.location.reload();
}
function restartDesktopApp() {
export function restartDesktopApp() {
if (!isElectron()) {
reloadFrontendApp();
return;
@@ -144,7 +144,7 @@ function now() {
/**
* Returns `true` if the client is currently running under Electron, or `false` if running in a web browser.
*/
function isElectron() {
export function isElectron() {
return !!(window && window.process && window.process.type);
}