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

This commit is contained in:
Adorian Doran 2025-09-06 19:31:45 +03:00
parent c729731c7e
commit 25698f5d9b

View File

@ -250,7 +250,6 @@ function Performance() {
const [ motionEnabled, setMotionEnabled ] = useTriliumOptionBool("motionEnabled"); const [ motionEnabled, setMotionEnabled ] = useTriliumOptionBool("motionEnabled");
const [ shadowsEnabled, setShadowsEnabled ] = useTriliumOptionBool("shadowsEnabled"); const [ shadowsEnabled, setShadowsEnabled ] = useTriliumOptionBool("shadowsEnabled");
const [ backdropEffectsEnabled, setBackdropEffectsEnabled ] = useTriliumOptionBool("backdropEffectsEnabled"); const [ backdropEffectsEnabled, setBackdropEffectsEnabled ] = useTriliumOptionBool("backdropEffectsEnabled");
const [ smoothScrollEnabled, setSmoothScrollEnabled ] = useTriliumOptionBool("smoothScrollEnabled");
return <OptionsSection title={t("ui-performance.title")}> return <OptionsSection title={t("ui-performance.title")}>
<FormCheckbox <FormCheckbox
@ -268,13 +267,19 @@ function Performance() {
currentValue={backdropEffectsEnabled} onChange={setBackdropEffectsEnabled} currentValue={backdropEffectsEnabled} onChange={setBackdropEffectsEnabled}
/> />
<FormCheckbox {isElectron() && <SmoothScrollEnabledOption />}
label={`${t("ui-performance.enable-smooth-scroll")} ${t("ui-performance.app-restart-required")}`}
currentValue={smoothScrollEnabled} onChange={setSmoothScrollEnabled}
/>
</OptionsSection> </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() { function MaxContentWidth() {
const [ maxContentWidth, setMaxContentWidth ] = useTriliumOption("maxContentWidth"); const [ maxContentWidth, setMaxContentWidth ] = useTriliumOption("maxContentWidth");