From f94d8960348219632d499f402df7eae3002fad55 Mon Sep 17 00:00:00 2001 From: xdeq Date: Thu, 24 Apr 2025 16:48:28 +0300 Subject: [PATCH] fix(cmd): toggle promo bg only for mammoth net --- components/cmd/CommandMenu.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/components/cmd/CommandMenu.vue b/components/cmd/CommandMenu.vue index 735bd8cf..ee8c8c3d 100644 --- a/components/cmd/CommandMenu.vue +++ b/components/cmd/CommandMenu.vue @@ -18,7 +18,7 @@ import FeeCalculator from "./custom/FeeCalculator.vue" /** Services */ import amp from "@/services/amp" -import { isMac, isPrefersDarkScheme } from "@/services/utils/general" +import { isMac, isPrefersDarkScheme, getNetworkName } from "@/services/utils/general" import { capitilize } from "@/services/utils/strings" /** API */ @@ -808,13 +808,24 @@ const rawOtherActions = [ subtitle: "Command", runText: "Toggle", callback: () => { - showPromoBackground.value = !showPromoBackground.value + if (getNetworkName() !== "Mammoth") { + notificationsStore.create({ + notification: { + type: "info", + icon: "info", + title: `Available for the mammoth network only`, + autoDestroy: true, + }, + }) + return + } + showPromoBackground.value = !showPromoBackground.value notificationsStore.create({ notification: { type: "info", icon: "info", - title: `Promo background ${appStore.showPromoBackground ? "enabled" : "disabled"}`, + title: `Promo background ${showPromoBackground.value ? "enabled" : "disabled"}`, autoDestroy: true, }, })