From 54750ed315f88e99675b3dd789f729d0da01b304 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 29 Dec 2023 16:45:40 +0700 Subject: [PATCH] fix: mac users should not see GPU settings (#1255) --- web/containers/Providers/index.tsx | 2 +- web/screens/Settings/Advanced/index.tsx | 51 +++++++++++++------------ 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/web/containers/Providers/index.tsx b/web/containers/Providers/index.tsx index c7e6e26a1c..82a855fce5 100644 --- a/web/containers/Providers/index.tsx +++ b/web/containers/Providers/index.tsx @@ -75,7 +75,7 @@ const Providers = (props: PropsWithChildren) => { {children} - + {!isMac && } diff --git a/web/screens/Settings/Advanced/index.tsx b/web/screens/Settings/Advanced/index.tsx index 122f3f8688..41e903cc8e 100644 --- a/web/screens/Settings/Advanced/index.tsx +++ b/web/screens/Settings/Advanced/index.tsx @@ -24,33 +24,34 @@ const Advanced = () => { return (
{/* CPU / GPU switching */} - -
-
-
-
NVidia GPU
+ {!isMac && ( +
+
+
+
NVidia GPU
+
+

+ Enable GPU acceleration for NVidia GPUs. +

-

- Enable GPU acceleration for NVidia GPUs. -

+ { + if (e === true) { + saveSettings({ runMode: 'gpu' }) + setGpuEnabled(true) + setShowNotification(false) + setTimeout(() => { + validateSettings() + }, 300) + } else { + saveSettings({ runMode: 'cpu' }) + setGpuEnabled(false) + } + }} + />
- { - if (e === true) { - saveSettings({ runMode: 'gpu' }) - setGpuEnabled(true) - setShowNotification(false) - setTimeout(() => { - validateSettings() - }, 300) - } else { - saveSettings({ runMode: 'cpu' }) - setGpuEnabled(false) - } - }} - /> -
+ )} {/* Experimental */}