chore: sync project updates

This commit is contained in:
2026-09-28 14:12:30 +03:30
parent bc64ff47b2
commit 1ac5095177
15 changed files with 17305 additions and 28 deletions
@@ -182,14 +182,24 @@ function applyProductsList(products: Product[]) {
productsPageLoading.value = false
}
function onTvBoard() {
if (typeof window === 'undefined') return false
const path = window.location.pathname.replace(/\/+$/, '') || '/'
return path === '/tv' || path.endsWith('/tv') || path === '/monitor' || path.endsWith('/monitor')
}
/** قیمت enrich شده فقط در HTTP کامل است؛ slim SSE برای پرچم‌هاست */
function scheduleCatalogRefreshFromStream() {
if (onTvBoard()) return
if (catalogStreamRefreshTimer) {
clearTimeout(catalogStreamRefreshTimer)
}
catalogStreamRefreshTimer = setTimeout(() => {
catalogStreamRefreshTimer = undefined
void refreshProductsPageData()
void import('@/utils/priceSocket').then(({ isTvStreamActive }) => {
if (isTvStreamActive()) return
void refreshProductsPageData()
})
}, 150)
}