Fix single TV news headline showing twice and keep empty news hidden.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -178,11 +178,7 @@ export function useTvMonitorPage() {
|
|||||||
|
|
||||||
const tvNewsItems = computed(() => {
|
const tvNewsItems = computed(() => {
|
||||||
void settingsStore.settingsRevision
|
void settingsStore.settingsRevision
|
||||||
const raw = settingsStore.getSettingByKey('tv_news') ?? getConfigApp('tv_news')
|
return parseTvNews(settingsStore.getSettingByKey('tv_news') ?? getConfigApp('tv_news'))
|
||||||
if (raw == null) {
|
|
||||||
return ['تا حالا از اپ کشکول طلای آنلاین خریدی؟']
|
|
||||||
}
|
|
||||||
return parseTvNews(raw)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const newsTickerTitle = computed(() => (tvNewsItems.value.length ? 'اخبار' : ''))
|
const newsTickerTitle = computed(() => (tvNewsItems.value.length ? 'اخبار' : ''))
|
||||||
|
|||||||
+17
-4
@@ -301,7 +301,7 @@ function loopTicker(items: Product[]) {
|
|||||||
|
|
||||||
function loopNews(items: string[]) {
|
function loopNews(items: string[]) {
|
||||||
if (!items.length) return []
|
if (!items.length) return []
|
||||||
const copies = items.length >= 1 && !prefersReducedMotion() ? [0, 1] : [0]
|
const copies = items.length >= 2 && !prefersReducedMotion() ? [0, 1] : [0]
|
||||||
return copies.flatMap((copy) => items.map((text, index) => ({ text, copy, index })))
|
return copies.flatMap((copy) => items.map((text, index) => ({ text, copy, index })))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,6 +350,7 @@ const coinColumns = computed(() => [
|
|||||||
linear-gradient(160deg, var(--tv-bg) 0%, var(--tv-bg-soft) 48%, var(--tv-bg) 100%);
|
linear-gradient(160deg, var(--tv-bg) 0%, var(--tv-bg-soft) 48%, var(--tv-bg) 100%);
|
||||||
color: var(--tv-text);
|
color: var(--tv-text);
|
||||||
font-family: iran-sans, sans-serif;
|
font-family: iran-sans, sans-serif;
|
||||||
|
font-feature-settings: 'ss01' on;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@@ -452,8 +453,9 @@ const coinColumns = computed(() => [
|
|||||||
display: block;
|
display: block;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
font-size: clamp(22px, 2.4vw, 38px);
|
font-size: clamp(22px, 2.4vw, 38px);
|
||||||
font-weight: 800;
|
font-weight: 700;
|
||||||
font-family: iran-sans, sans-serif;
|
font-family: iran-sans, sans-serif;
|
||||||
|
font-feature-settings: 'ss01' on;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
unicode-bidi: isolate;
|
unicode-bidi: isolate;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
@@ -816,8 +818,9 @@ const coinColumns = computed(() => [
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: clamp(18px, 22cqi, 34px);
|
font-size: clamp(18px, 22cqi, 34px);
|
||||||
font-weight: 800;
|
font-weight: 700;
|
||||||
font-family: iran-sans, sans-serif;
|
font-family: iran-sans, sans-serif;
|
||||||
|
font-feature-settings: 'ss01' on;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
unicode-bidi: isolate;
|
unicode-bidi: isolate;
|
||||||
@@ -853,7 +856,15 @@ const coinColumns = computed(() => [
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
color: var(--tv-card-muted);
|
color: var(--tv-card-muted);
|
||||||
|
font-size: clamp(11px, 11cqi, 15px);
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1.35;
|
||||||
|
white-space: normal;
|
||||||
|
direction: rtl;
|
||||||
|
unicode-bidi: isolate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -999,8 +1010,9 @@ const coinColumns = computed(() => [
|
|||||||
|
|
||||||
b {
|
b {
|
||||||
font-size: clamp(16px, 1.35vw, 22px);
|
font-size: clamp(16px, 1.35vw, 22px);
|
||||||
font-weight: 800;
|
font-weight: 700;
|
||||||
font-family: iran-sans, sans-serif;
|
font-family: iran-sans, sans-serif;
|
||||||
|
font-feature-settings: 'ss01' on;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
unicode-bidi: isolate;
|
unicode-bidi: isolate;
|
||||||
@@ -1094,6 +1106,7 @@ html.app-layout--tv .ant-config-provider,
|
|||||||
html.app-layout--tv .app-main,
|
html.app-layout--tv .app-main,
|
||||||
html.app-layout--tv .tv-monitor {
|
html.app-layout--tv .tv-monitor {
|
||||||
font-family: iran-sans, sans-serif !important;
|
font-family: iran-sans, sans-serif !important;
|
||||||
|
font-feature-settings: 'ss01' on;
|
||||||
}
|
}
|
||||||
|
|
||||||
html.app-layout--tv,
|
html.app-layout--tv,
|
||||||
|
|||||||
Reference in New Issue
Block a user