This commit is contained in:
2026-03-26 12:27:39 +07:00
parent a895c0f910
commit aa8fe39310
3 changed files with 81 additions and 5 deletions
+4 -5
View File
@@ -2,10 +2,10 @@
import { onMounted, ref } from 'vue';
import { apiGetDays } from './client';
import type { Schedule } from './models';
import { formatRussianDate, getRelativeDayName } from './date';
import { formatRussianDate, getRelativeDayName, timeAgo } from './date';
import { capitalizeFirstLetter } from './text';
const schedule = ref<Schedule>({ days: [] })
const schedule = ref<Schedule>({ updateTime: "", days: [] })
onMounted(async () => {
schedule.value = await apiGetDays()
@@ -15,6 +15,7 @@ onMounted(async () => {
<template>
<div>
Обновлено: {{ timeAgo(schedule.updateTime) }}
<div v-for="day in schedule.days" :key="day.date" class="day-block">
{{ capitalizeFirstLetter(formatRussianDate(day.date)) }}
<span v-if="getRelativeDayName(day.date) !== ''">({{ getRelativeDayName(day.date) }})</span>
@@ -53,7 +54,5 @@ onMounted(async () => {
border-radius: 10px;
}
.performance-block {
}
.performance-block {}
</style>