Skip to content

Commit 78f4819

Browse files
committed
enable promo only on website not on dashboard
1 parent 6628726 commit 78f4819

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

webui/.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
VITE_USE_DEMO=true
2-
VITE_DASHBOARD=true
2+
VITE_DASHBOARD=true
3+
VITE_PROMO=true

webui/.env.dashboard

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
VITE_WEBSITE=false
22
VITE_USE_DEMO=false
3-
VITE_DASHBOARD=true
3+
VITE_DASHBOARD=true
4+
VITE_PROMO=false

webui/src/components/Header.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { usePromo } from '@/composables/promo';
1212
1313
const isDashboard = import.meta.env.VITE_DASHBOARD === 'true'
1414
const useDemo = import.meta.env.VITE_USE_DEMO === 'true'
15+
const isPromoEnabled = import.meta.env.VITE_PROMO === 'true'
1516
const promo = usePromo()
1617
let appInfo: AppInfoResponse | null = null
1718
const query = ref('')
@@ -199,7 +200,7 @@ function navigateAndClose(params: Record<string, string>) {
199200
<template>
200201
<header>
201202
<!-- Promotion banner -->
202-
<div class="promo-banner" v-if="promo.activePromotion.value">
203+
<div class="promo-banner" v-if="isPromoEnabled && promo.activePromotion.value">
203204
<strong>Shop discount!</strong>
204205
Get <strong>{{ promo.activePromotion.value.discount }}% off</strong> Mokapi Gear —
205206
<span class="d-none d-md-inline">

0 commit comments

Comments
 (0)