feat: add option to disable/enable command palette
This commit is contained in:
1 parent
2cc8133e21
commit
16075f72f2
4 files changed
+16
-2
No files matched your search
@@ -36,11 +36,14 @@
|
||||
import { t } from '$lib/translations'
|
||||
import CommandsWrapper from './commands/CommandsWrapper.svelte'
|
||||
import { optimizeImageURL } from '$lib/components/lemmy/post/helpers'
|
||||
import { userSettings } from '$lib/settings'
|
||||
|
||||
let promptOpen: boolean = false
|
||||
</script>
|
||||
|
||||
<CommandsWrapper bind:open={promptOpen} />
|
||||
{#if $userSettings.dock.commands}
|
||||
<CommandsWrapper bind:open={promptOpen} />
|
||||
{/if}
|
||||
<nav
|
||||
class="flex flex-row gap-2 items-center w-full mx-auto z-50 box-border p-0.5
|
||||
duration-150 @container
|
||||
|
||||
@@ -666,6 +666,10 @@
|
||||
"pins": {
|
||||
"title": "Pins",
|
||||
"description": "Click a pin to send it to the top of the sidebar. Right click a pinned item to remove it."
|
||||
},
|
||||
"commands": {
|
||||
"title": "Command palette",
|
||||
"description": "Press slash or right click the photon logo to navigate around the app by searching."
|
||||
}
|
||||
},
|
||||
"app": {
|
||||
|
||||
+3
-1
@@ -87,6 +87,7 @@ interface Settings {
|
||||
noGap: boolean | null
|
||||
top: boolean | null
|
||||
pins: Link[]
|
||||
commands: boolean
|
||||
}
|
||||
posts: {
|
||||
deduplicateEmbed: boolean
|
||||
@@ -106,7 +107,7 @@ interface Settings {
|
||||
}
|
||||
|
||||
export const defaultSettings: Settings = {
|
||||
settingsVer: 2,
|
||||
settingsVer: 3,
|
||||
expandableImages: toBool(env.PUBLIC_EXPANDABLE_IMAGES) ?? true,
|
||||
markReadPosts: toBool(env.PUBLIC_MARK_READ_POSTS) ?? true,
|
||||
showInstances: {
|
||||
@@ -167,6 +168,7 @@ export const defaultSettings: Settings = {
|
||||
noGap: toBool(env.PUBLIC_DOCK_PANEL) ?? null,
|
||||
top: toBool(env.PUBLIC_DOCK_TOP) ?? null,
|
||||
pins: [],
|
||||
commands: true,
|
||||
},
|
||||
posts: {
|
||||
deduplicateEmbed: toBool(env.PUBLIC_DEDUPLICATE_EMBED) ?? true,
|
||||
|
||||
Reference in new issue
Block a user