Skip to content

Commit be13fec

Browse files
committed
fix(web): show the swipe navigation setting only in the desktop app
1 parent 1a6b0b3 commit be13fec

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,31 +1047,34 @@ export function GeneralSettingsPanel() {
10471047
</Select>
10481048
}
10491049
/>
1050-
<SettingsRow
1051-
{...searchableSetting("history-swipe-navigation")}
1052-
description="Swipe two fingers sideways to go back or forward."
1053-
resetAction={
1054-
settings.historySwipeNavigation !== DEFAULT_UNIFIED_SETTINGS.historySwipeNavigation ? (
1055-
<SettingResetButton
1056-
label="swipe to navigate"
1057-
onClick={() =>
1058-
updateSettings({
1059-
historySwipeNavigation: DEFAULT_UNIFIED_SETTINGS.historySwipeNavigation,
1060-
})
1050+
{isElectron ? (
1051+
<SettingsRow
1052+
{...searchableSetting("history-swipe-navigation")}
1053+
description="Swipe two fingers sideways to go back or forward."
1054+
resetAction={
1055+
settings.historySwipeNavigation !==
1056+
DEFAULT_UNIFIED_SETTINGS.historySwipeNavigation ? (
1057+
<SettingResetButton
1058+
label="swipe to navigate"
1059+
onClick={() =>
1060+
updateSettings({
1061+
historySwipeNavigation: DEFAULT_UNIFIED_SETTINGS.historySwipeNavigation,
1062+
})
1063+
}
1064+
/>
1065+
) : null
1066+
}
1067+
control={
1068+
<Switch
1069+
checked={settings.historySwipeNavigation}
1070+
onCheckedChange={(checked) =>
1071+
updateSettings({ historySwipeNavigation: Boolean(checked) })
10611072
}
1073+
aria-label="Swipe to navigate"
10621074
/>
1063-
) : null
1064-
}
1065-
control={
1066-
<Switch
1067-
checked={settings.historySwipeNavigation}
1068-
onCheckedChange={(checked) =>
1069-
updateSettings({ historySwipeNavigation: Boolean(checked) })
1070-
}
1071-
aria-label="Swipe to navigate"
1072-
/>
1073-
}
1074-
/>
1075+
}
1076+
/>
1077+
) : null}
10751078
</SettingsSection>
10761079
</SettingsPageContainer>
10771080
);

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ export const SETTINGS_SEARCH_ITEMS = [
681681
title: "Swipe to navigate",
682682
to: "/settings/general",
683683
searchTerms: ["trackpad two finger horizontal back forward history gesture desktop"],
684+
desktopOnly: true,
684685
},
685686
{
686687
id: "response-streaming",

0 commit comments

Comments
 (0)