generated from VLADIMIR/template_frontend
update
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user