Skip to content

Commit 83ba0fe

Browse files
authored
Merge pull request #129 from celenium-io/toggle-promo-bg
fix(cmd): toggle promo bg only for mammoth net
2 parents 1549cd2 + f94d896 commit 83ba0fe

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

components/cmd/CommandMenu.vue

Lines changed: 14 additions & 3 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 */
@@ -808,13 +808,24 @@ const rawOtherActions = [
808808
subtitle: "Command",
809809
runText: "Toggle",
810810
callback: () => {
811-
showPromoBackground.value = !showPromoBackground.value
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+
}
812822
823+
showPromoBackground.value = !showPromoBackground.value
813824
notificationsStore.create({
814825
notification: {
815826
type: "info",
816827
icon: "info",
817-
title: `Promo background ${appStore.showPromoBackground ? "enabled" : "disabled"}`,
828+
title: `Promo background ${showPromoBackground.value ? "enabled" : "disabled"}`,
818829
autoDestroy: true,
819830
},
820831
})

0 commit comments

Comments
 (0)