Revert "feat: add customizable keyboard navigation"

This commit is contained in:
Xylight authored and GitHub committed 2025-08-15 06:31:23 -07:00
1 parent 4e7c37bd89
commit f9a6e775f3
17 files changed
+39 -306

No files matched your search

+1 -42
View File
@@ -7,10 +7,6 @@ console.log('Using the following default settings from the environment:')
console.log(env)
export type View = 'cozy' | 'compact'
type Keybind = {
key: string
ctrl: boolean
}
export const SSR_ENABLED = env.PUBLIC_SSR_ENABLED?.toLowerCase() == 'true'
@@ -109,29 +105,10 @@ interface Settings {
fullMarkdown: boolean
}
voteRatioBar: boolean
keybinds: {
lists: {
next: Keybind
previous: Keybind
}
posts: {
upvote: Keybind
downvote: Keybind
save: Keybind
expand: Keybind
}
comments: {
collapse: Keybind
}
commandPalette: {
open: Keybind
}
}
}
export const defaultSettings: Settings = {
settingsVer: 7,
settingsVer: 6,
expandableImages: toBool(env.PUBLIC_EXPANDABLE_IMAGES) ?? true,
markReadPosts: toBool(env.PUBLIC_MARK_READ_POSTS) ?? true,
showInstances: {
@@ -209,24 +186,6 @@ export const defaultSettings: Settings = {
fullMarkdown: toBool(env.PUBLIC_FULL_MARKDOWN) ?? false,
},
voteRatioBar: false,
keybinds: {
lists: {
next: { ctrl: false, key: 'k' },
previous: { ctrl: false, key: 'j' },
},
posts: {
upvote: { ctrl: false, key: 'n' },
downvote: { ctrl: false, key: 'm' },
save: { ctrl: true, key: 's' },
expand: { ctrl: false, key: 'h' },
},
comments: {
collapse: { ctrl: false, key: 'l' },
},
commandPalette: {
open: { ctrl: false, key: '/' },
},
},
}
function createSettingsState(initial: Settings): Settings {