Skip to content

Build your personal knowledge base with Trilium Notes

electron app: display the smooth scrolling setting only on the Electron app

Adorian Doran25698f5d9b45
diff --git a/apps/client/src/widgets/type_widgets/options/appearance.tsx b/apps/client/src/widgets/type_widgets/options/appearance.tsx
index 12db58b690..5ff2ddddc1 100644
--- a/apps/client/src/widgets/type_widgets/options/appearance.tsx
+++ b/apps/client/src/widgets/type_widgets/options/appearance.tsx
@@ -250,7 +250,6 @@ function Performance() {
const [ motionEnabled, setMotionEnabled ] = useTriliumOptionBool("motionEnabled");
const [ shadowsEnabled, setShadowsEnabled ] = useTriliumOptionBool("shadowsEnabled");
const [ backdropEffectsEnabled, setBackdropEffectsEnabled ] = useTriliumOptionBool("backdropEffectsEnabled");
- const [ smoothScrollEnabled, setSmoothScrollEnabled ] = useTriliumOptionBool("smoothScrollEnabled");
return <OptionsSection title={t("ui-performance.title")}>
<FormCheckbox
@@ -268,13 +267,19 @@ function Performance() {
currentValue={backdropEffectsEnabled} onChange={setBackdropEffectsEnabled}
/>
- <FormCheckbox
- label={`${t("ui-performance.enable-smooth-scroll")} ${t("ui-performance.app-restart-required")}`}
- currentValue={smoothScrollEnabled} onChange={setSmoothScrollEnabled}
- />
+ {isElectron() && <SmoothScrollEnabledOption />}
+
</OptionsSection>
}
+function SmoothScrollEnabledOption() {
+ const [ smoothScrollEnabled, setSmoothScrollEnabled ] = useTriliumOptionBool("smoothScrollEnabled");
+
+ return <FormCheckbox
+ label={`${t("ui-performance.enable-smooth-scroll")} ${t("ui-performance.app-restart-required")}`}
+ currentValue={smoothScrollEnabled} onChange={setSmoothScrollEnabled}
+ />
+}
function MaxContentWidth() {
const [ maxContentWidth, setMaxContentWidth ] = useTriliumOption("maxContentWidth");