change condition of display banner

This commit is contained in:
2026-06-21 14:42:27 +02:00
parent 7545b77a25
commit 6dd2cc7d96
6 changed files with 18 additions and 3 deletions
@@ -12,6 +12,7 @@ import {
resolveAssetsRialValue,
} from '@/utils/productAssets'
import { useConfigStore } from '@/store/configStore'
import { useSettingsStore } from '@/store/settingsStore'
import { getTradeBuyPrice, lastPrice, stopLastPricePolling } from '@/utils/price'
import { getStoreClosedMessage, isStoreClosed } from '@/utils/storeHours'
import { message, Modal } from 'ant-design-vue'
@@ -30,6 +31,7 @@ import { resetProductsPageData } from '../../products/composables/useProductsPag
export interface HomePageContext {
homePageLoading: ReturnType<typeof useHomePageLoading>['homePageLoading']
isGaroosi: ReturnType<typeof computed<boolean>>
bannerEnabled: ReturnType<typeof computed<boolean>>
limitedPrice: ReturnType<typeof computed>
showClosedMessage: ReturnType<typeof computed<boolean>>
closedMessage: ReturnType<typeof computed>
@@ -57,6 +59,7 @@ export function useHomePage() {
const userStore = useUserStore()
const walletStore = useWalletStore()
const configStore = useConfigStore()
const settingsStore = useSettingsStore()
const { assetsSummary, clearWalletAssets } = useWalletAssets()
const showLogoutConfirm = ref(false)
@@ -77,6 +80,7 @@ export function useHomePage() {
const isBoursecuHomeLayout = computed(() => getHomeLayoutId() === 'boursecu')
const isGaroosi = computed(() => configStore.config?.name === 'garoosi')
const bannerEnabled = computed(() => settingsStore.isSettingTruthy('banner_enabled'))
const closedMessage = computed(() => userStore.getValueByKey('closed_message'))
const marketClosedText = computed(() => {
if (!isStoreClosed()) return ''
@@ -227,6 +231,7 @@ export function useHomePage() {
const context: HomePageContext = {
homePageLoading,
isGaroosi,
bannerEnabled,
limitedPrice,
showClosedMessage,
closedMessage: marketClosedText,