Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions src/client/src/components/controls/PlayButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
</div>
<div class="play-button__content__text-area">
<div class="play-button__content__text-area__status">
{{ statusText }}
<span>{{ liveText }}</span>
<span>|</span>
<span class="play-button__content__text-area__status__listeners">
<span class="pi pi-wave-pulse" />
<span>{{ listenersText }}</span>
</span>
</div>
<div class="play-button__content__text-area__now-playing">
<div class="play-button__content__text-area__now-playing__text">
Expand Down Expand Up @@ -201,12 +206,19 @@ const handleError = () => {
})
waitAndTryReconnect()
}

const statusText = computed(() => {
computed(() => {
const liveText = streamStore.status.isLive ? 'Live' : 'Offline'
return `${liveText} | Listeners: ${streamStore.status.listenerCount}`
})

const liveText = computed(() => {
return streamStore.status.isLive ? 'Live' : 'Offline'
})

const listenersText = computed(() => {
return streamStore.status.listenerCount ?? 0
})

const elapsedText = ref('')
let elapsedTextInterval: ReturnType<typeof setInterval> | undefined

Expand Down Expand Up @@ -372,6 +384,14 @@ $text-translate-amount: v-bind(nameTranslateWidthPx);
font-size: small;
text-align: left;
white-space: nowrap;
display: flex;
flex-direction: row;
gap: variables.$space-m;

&__listeners {
display: flex;
gap: variables.$space-s;
}
}

&__elapsed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
field="start"
header="Date">
<template #body="{ data }: { data: ScheduleResponse }">
{{ parseDate(data.startsAt).toLocaleDateString() }}
{{ parseDate(data.startsAt).toLocaleDateString(undefined, dateStringOptions) }}
</template>
</Column>
<Column
Expand All @@ -44,7 +44,7 @@
<template #body="{ data }: { data: ScheduleResponse }">
<TwoLineData
:above="data.name"
:below="parseDate(data.startsAt).toLocaleDateString()" />
:below="parseDate(data.startsAt).toLocaleDateString(undefined, dateStringOptions)" />
</template>
</Column>
<!-- Only show the action col for grids with schedules in the future -->
Expand Down Expand Up @@ -115,6 +115,8 @@ const toast = useToast()
const expandedRows = ref({})
const isMobile: Ref<boolean> | undefined = inject('isMobile')

const dateStringOptions: Intl.DateTimeFormatOptions = { weekday: 'long', day: '2-digit', month: '2-digit', year: 'numeric' }

const props = withDefaults(
defineProps<{
hideActions?: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/server/LowPressureZone.Api/LowPressureZone.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<UserSecretsId>9d2c548d-3c62-4409-9c65-fe1fa2b047b1</UserSecretsId>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<Version>1.6.4</Version>
<Version>1.6.7</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading