mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Merge branch 'master' of github.com:ckaczor/HomeMonitor
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
function loadCalendar() {
|
function loadCalendar() {
|
||||||
const newCalendarDays = [] as CalendarDay[];
|
const newCalendarDays = [] as CalendarDay[];
|
||||||
|
|
||||||
calendarStore.getUpcoming(calendarDayCount).then((upcoming) => {
|
calendarStore.getUpcoming(calendarDayCount, true).then((upcoming) => {
|
||||||
const currentDay = startOfDay(currentTime.value);
|
const currentDay = startOfDay(currentTime.value);
|
||||||
|
|
||||||
for (let i = 0; i < calendarDayCount; i++) {
|
for (let i = 0; i < calendarDayCount; i++) {
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
loadCalendar();
|
loadCalendar();
|
||||||
|
|
||||||
setInterval(() => currentTime.value = new Date(), 1000);
|
setInterval(() => currentTime.value = new Date(), 1000);
|
||||||
setInterval(() => loadCalendar(), 60000);
|
setInterval(() => loadCalendar(), 30 * 60 * 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ export const useCalendarStore = defineStore('calendar', {
|
|||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
async getUpcoming(days: number): Promise<CalendarEntry[]> {
|
async getUpcoming(days: number, includeHolidays: boolean): Promise<CalendarEntry[]> {
|
||||||
const response = await axios.get<CalendarEntry[]>(Environment.getUrlPrefix() + `:8081/api/calendar/calendar/upcoming?days=${days}`);
|
const response = await axios.get<CalendarEntry[]>(Environment.getUrlPrefix() + `:8081/api/calendar/calendar/upcoming?days=${days}&includeHolidays=${includeHolidays}`);
|
||||||
|
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user