Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions components/cmd/CommandMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const notificationsStore = useNotificationsStore()
const appConfig = useAppConfig()

const theme = useCookie("theme", { default: () => "dark" })
const showPromoBackground = useCookie("showPromoBackground", { default: () => true })

const route = useRoute()
const router = useRouter()
Expand Down Expand Up @@ -766,23 +767,6 @@ const rawDeveloperActions = [
})
},
},
{
type: "callback",
icon: "settings",
title: "Toggle Search Scoring",
subtitle: "Command",
runText: "Reset",
callback: () => {
notificationsStore.create({
notification: {
type: "info",
icon: "info",
title: `Search scoring is not available`,
autoDestroy: true,
},
})
},
},
{
type: "callback",
icon: "stars",
Expand Down Expand Up @@ -817,6 +801,25 @@ const developerGroup = computed(() => {
})

const rawOtherActions = [
{
type: "callback",
icon: "settings",
title: "Toggle Promo Background",
subtitle: "Command",
runText: "Toggle",
callback: () => {
showPromoBackground.value = !showPromoBackground.value

notificationsStore.create({
notification: {
type: "info",
icon: "info",
title: `Promo background ${appStore.showPromoBackground ? "enabled" : "disabled"}`,
autoDestroy: true,
},
})
},
},
{
type: "callback",
icon: "terminal",
Expand Down
4 changes: 3 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import AdvBanner from "@/components/shared/AdvBanner.vue"

/** Services */
import { getNetworkName } from "@/services/utils/general"

const showPromoBackground = useCookie("showPromoBackground", { default: () => true })
</script>

<template>
<Flex direction="column">
<Flex justify="center" :class="$style.wrapper">
<img v-if="getNetworkName() === 'Mammoth'" src="/img/mammoth.jpeg" :class="$style.mammoth_bg" />
<img v-if="getNetworkName() === 'Mammoth' && showPromoBackground" src="/img/mammoth.jpeg" :class="$style.mammoth_bg" />

<LeftSidebar :class="$style.sidebar" />

Expand Down