mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
[Remote] Full PWA support, misc bugfixes (#280)
- Fix setting remote port properly - Add web worker support (so it can be installed as an "app") - build fixes/removing stray console.log
This commit is contained in:
parent
fe298d3232
commit
9964f95d5d
11 changed files with 314 additions and 194 deletions
|
|
@ -28,24 +28,27 @@ export const RemoteSettings = () => {
|
|||
title: enabled ? 'Error enabling remote' : 'Error disabling remote',
|
||||
});
|
||||
}
|
||||
}, 100);
|
||||
}, 50);
|
||||
|
||||
const debouncedChangeRemotePort = debounce(async (port: number) => {
|
||||
const errorMsg = await remote!.setRemotePort(port);
|
||||
if (errorMsg === null) {
|
||||
if (!errorMsg) {
|
||||
setSettings({
|
||||
remote: {
|
||||
...settings,
|
||||
port,
|
||||
},
|
||||
});
|
||||
toast.warn({
|
||||
message: 'To have your port change take effect, stop and restart the server',
|
||||
});
|
||||
} else {
|
||||
toast.error({
|
||||
message: errorMsg,
|
||||
title: 'Error setting port',
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
|
||||
const isHidden = !isElectron();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue