mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Add clarity to conditional restart
This commit is contained in:
@@ -30,11 +30,14 @@ export const WindowSettings = () => {
|
|||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
if (!e) return;
|
if (!e) return;
|
||||||
|
|
||||||
// warn that a restart is required
|
// Platform.LINUX is used as the native frame option regardless of the actual platform
|
||||||
if (
|
const hasFrame = localSettings?.get('window_has_frame') as boolean | undefined;
|
||||||
(localSettings?.get('window_has_frame') && e !== Platform.LINUX) ||
|
const isSwitchingToFrame = !hasFrame && e === Platform.LINUX;
|
||||||
(!localSettings?.get('window_has_frame') && e === Platform.LINUX)
|
const isSwitchingToNoFrame = hasFrame && e !== Platform.LINUX;
|
||||||
) {
|
|
||||||
|
const requireRestart = isSwitchingToFrame || isSwitchingToNoFrame;
|
||||||
|
|
||||||
|
if (requireRestart) {
|
||||||
toast.info({
|
toast.info({
|
||||||
autoClose: false,
|
autoClose: false,
|
||||||
id: 'restart-toast',
|
id: 'restart-toast',
|
||||||
|
|||||||
Reference in New Issue
Block a user