Skip to content

Commit 7e06171

Browse files
committed
Merge branch 'master' into ms-2-part-3
2 parents ee97324 + 36d6897 commit 7e06171

2 files changed

Lines changed: 35 additions & 19 deletions

File tree

components/cmd/CommandMenu.vue

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import FeeCalculator from "./custom/FeeCalculator.vue"
1818
1919
/** Services */
2020
import amp from "@/services/amp"
21-
import { isMac, isPrefersDarkScheme } from "@/services/utils/general"
21+
import { isMac, isPrefersDarkScheme, getNetworkName } from "@/services/utils/general"
2222
import { capitilize } from "@/services/utils/strings"
2323
2424
/** API */
@@ -39,6 +39,7 @@ const notificationsStore = useNotificationsStore()
3939
const appConfig = useAppConfig()
4040
4141
const theme = useCookie("theme", { default: () => "dark" })
42+
const showPromoBackground = useCookie("showPromoBackground", { default: () => true })
4243
4344
const route = useRoute()
4445
const router = useRouter()
@@ -766,23 +767,6 @@ const rawDeveloperActions = [
766767
})
767768
},
768769
},
769-
{
770-
type: "callback",
771-
icon: "settings",
772-
title: "Toggle Search Scoring",
773-
subtitle: "Command",
774-
runText: "Reset",
775-
callback: () => {
776-
notificationsStore.create({
777-
notification: {
778-
type: "info",
779-
icon: "info",
780-
title: `Search scoring is not available`,
781-
autoDestroy: true,
782-
},
783-
})
784-
},
785-
},
786770
{
787771
type: "callback",
788772
icon: "stars",
@@ -817,6 +801,36 @@ const developerGroup = computed(() => {
817801
})
818802
819803
const rawOtherActions = [
804+
{
805+
type: "callback",
806+
icon: "settings",
807+
title: "Toggle Promo Background",
808+
subtitle: "Command",
809+
runText: "Toggle",
810+
callback: () => {
811+
if (getNetworkName() !== "Mammoth") {
812+
notificationsStore.create({
813+
notification: {
814+
type: "info",
815+
icon: "info",
816+
title: `Available for the mammoth network only`,
817+
autoDestroy: true,
818+
},
819+
})
820+
return
821+
}
822+
823+
showPromoBackground.value = !showPromoBackground.value
824+
notificationsStore.create({
825+
notification: {
826+
type: "info",
827+
icon: "info",
828+
title: `Promo background ${showPromoBackground.value ? "enabled" : "disabled"}`,
829+
autoDestroy: true,
830+
},
831+
})
832+
},
833+
},
820834
{
821835
type: "callback",
822836
icon: "terminal",

layouts/default.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import AdvBanner from "@/components/shared/AdvBanner.vue"
44
55
/** Services */
66
import { getNetworkName } from "@/services/utils/general"
7+
8+
const showPromoBackground = useCookie("showPromoBackground", { default: () => true })
79
</script>
810

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

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

0 commit comments

Comments
 (0)