From 1c529c0e7d47d02f578fcec6f3b7b8306b2ab905 Mon Sep 17 00:00:00 2001 From: SASAGAWA Kiyoshi Date: Sun, 11 Feb 2024 05:30:37 +0900 Subject: [PATCH 1/4] Fix: iCal integration fails with all-day events (#2883) --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- src/widgets/calendar/integrations/ical.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/widgets/calendar/integrations/ical.jsx b/src/widgets/calendar/integrations/ical.jsx index ec6427916..05d059c72 100644 --- a/src/widgets/calendar/integrations/ical.jsx +++ b/src/widgets/calendar/integrations/ical.jsx @@ -52,15 +52,17 @@ export default function Integration({ config, params, setEvents, hideErrors, tim } const eventToAdd = (date, i, type) => { - const duration = event.dtend.value - event.dtstart.value; - const days = duration / (1000 * 60 * 60 * 24); + // 'dtend' is null for all-day events + const { dtstart, dtend = { value: 0 } } = event; + + const days = dtend.value === 0 ? 1 : (dtend.value - dtstart.value) / (1000 * 60 * 60 * 24); const eventDate = timezone ? DateTime.fromJSDate(date, { zone: timezone }) : DateTime.fromJSDate(date); for (let j = 0; j < days; j += 1) { // See https://github.com/gethomepage/homepage/issues/2753 uid is not stable // assumption is that the event is the same if the start, end and title are all the same - const hash = simpleHash(`${event?.dtstart?.value}${event?.dtend?.value}${title}${i}${j}${type}}`); + const hash = simpleHash(`${dtstart?.value}${dtend?.value}${title}${i}${j}${type}}`); eventsToAdd[hash] = { title, date: eventDate.plus({ days: j }), From 35af27f209a7426baf8d0793b118b7432d0d15fe Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:37:59 -0800 Subject: [PATCH 2/4] Update ical.jsx --- src/widgets/calendar/integrations/ical.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/widgets/calendar/integrations/ical.jsx b/src/widgets/calendar/integrations/ical.jsx index 05d059c72..059adfa2e 100644 --- a/src/widgets/calendar/integrations/ical.jsx +++ b/src/widgets/calendar/integrations/ical.jsx @@ -54,9 +54,7 @@ export default function Integration({ config, params, setEvents, hideErrors, tim const eventToAdd = (date, i, type) => { // 'dtend' is null for all-day events const { dtstart, dtend = { value: 0 } } = event; - const days = dtend.value === 0 ? 1 : (dtend.value - dtstart.value) / (1000 * 60 * 60 * 24); - const eventDate = timezone ? DateTime.fromJSDate(date, { zone: timezone }) : DateTime.fromJSDate(date); for (let j = 0; j < days; j += 1) { From 87d1ea4f2e7bd3080a3e44786d4dea3a5c56454f Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:54:34 -0800 Subject: [PATCH 3/4] Update services.md --- docs/configs/services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configs/services.md b/docs/configs/services.md index 010950ebc..490356fcb 100644 --- a/docs/configs/services.md +++ b/docs/configs/services.md @@ -101,7 +101,7 @@ To use a local icon, first create a Docker mount to `/app/public/icons` and then ## Ping -Services may have an optional `ping` property that allows you to monitor the availability of an external host. As of v0.8.0, the ping feature attempts to use a true (ICMP) ping command on the underlying host. +Services may have an optional `ping` property that allows you to monitor the availability of an external host. As of v0.8.0, the ping feature attempts to use a true (ICMP) ping command on the underlying host. Currently, only IPv4 is supported. ```yaml - Group A: From ea0310548a190af11ba18fa2fd1f705bea518902 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Wed, 14 Feb 2024 01:42:50 +0100 Subject: [PATCH 4/4] Change: use Script component instead of async script for custom.js (#2901) --- src/pages/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 0de51e32a..4bf1d9a27 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -1,6 +1,7 @@ /* eslint-disable react/no-array-index-key */ import useSWR, { SWRConfig } from "swr"; import Head from "next/head"; +import Script from "next/script"; import dynamic from "next/dynamic"; import classNames from "classnames"; import { useTranslation } from "next-i18next"; @@ -401,8 +402,7 @@ function Home({ initialSettings }) { emptyValue="/* No custom CSS */" /> - -