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 { t } from '$lib/translations'
|
||||||
import CommandsWrapper from './commands/CommandsWrapper.svelte'
|
import CommandsWrapper from './commands/CommandsWrapper.svelte'
|
||||||
import { optimizeImageURL } from '$lib/components/lemmy/post/helpers'
|
import { optimizeImageURL } from '$lib/components/lemmy/post/helpers'
|
||||||
|
import { userSettings } from '$lib/settings'
|
||||||
|
|
||||||
let promptOpen: boolean = false
|
let promptOpen: boolean = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<CommandsWrapper bind:open={promptOpen} />
|
{#if $userSettings.dock.commands}
|
||||||
|
<CommandsWrapper bind:open={promptOpen} />
|
||||||
|
{/if}
|
||||||
<nav
|
<nav
|
||||||
class="flex flex-row gap-2 items-center w-full mx-auto z-50 box-border p-0.5
|
class="flex flex-row gap-2 items-center w-full mx-auto z-50 box-border p-0.5
|
||||||
duration-150 @container
|
duration-150 @container
|
||||||
|
|||||||
@@ -666,6 +666,10 @@
|
|||||||
"pins": {
|
"pins": {
|
||||||
"title": "Pins",
|
"title": "Pins",
|
||||||
"description": "Click a pin to send it to the top of the sidebar. Right click a pinned item to remove it."
|
"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": {
|
"app": {
|
||||||
|
|||||||
+3
-1
@@ -87,6 +87,7 @@ interface Settings {
|
|||||||
noGap: boolean | null
|
noGap: boolean | null
|
||||||
top: boolean | null
|
top: boolean | null
|
||||||
pins: Link[]
|
pins: Link[]
|
||||||
|
commands: boolean
|
||||||
}
|
}
|
||||||
posts: {
|
posts: {
|
||||||
deduplicateEmbed: boolean
|
deduplicateEmbed: boolean
|
||||||
@@ -106,7 +107,7 @@ interface Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const defaultSettings: Settings = {
|
export const defaultSettings: Settings = {
|
||||||
settingsVer: 2,
|
settingsVer: 3,
|
||||||
expandableImages: toBool(env.PUBLIC_EXPANDABLE_IMAGES) ?? true,
|
expandableImages: toBool(env.PUBLIC_EXPANDABLE_IMAGES) ?? true,
|
||||||
markReadPosts: toBool(env.PUBLIC_MARK_READ_POSTS) ?? true,
|
markReadPosts: toBool(env.PUBLIC_MARK_READ_POSTS) ?? true,
|
||||||
showInstances: {
|
showInstances: {
|
||||||
@@ -167,6 +168,7 @@ export const defaultSettings: Settings = {
|
|||||||
noGap: toBool(env.PUBLIC_DOCK_PANEL) ?? null,
|
noGap: toBool(env.PUBLIC_DOCK_PANEL) ?? null,
|
||||||
top: toBool(env.PUBLIC_DOCK_TOP) ?? null,
|
top: toBool(env.PUBLIC_DOCK_TOP) ?? null,
|
||||||
pins: [],
|
pins: [],
|
||||||
|
commands: true,
|
||||||
},
|
},
|
||||||
posts: {
|
posts: {
|
||||||
deduplicateEmbed: toBool(env.PUBLIC_DEDUPLICATE_EMBED) ?? true,
|
deduplicateEmbed: toBool(env.PUBLIC_DEDUPLICATE_EMBED) ?? true,
|
||||||
|
|||||||
@@ -480,6 +480,11 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<ToggleSetting
|
||||||
|
title={$t('settings.navigation.commands.title')}
|
||||||
|
description={$t('settings.navigation.commands.description')}
|
||||||
|
bind:checked={$userSettings.dock.commands}
|
||||||
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section id="embeds" title={$t('settings.embeds.title')}>
|
<Section id="embeds" title={$t('settings.embeds.title')}>
|
||||||
|
|||||||
Reference in new issue
Block a user