Merge branch 'gethomepage:main' into main

pull/3004/head
Avnit Bambah 3 months ago committed by GitHub
commit 928c8c880d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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:

@ -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 */"
/>
</style>
<link rel="preload" href="/api/config/custom.js" as="fetch" crossOrigin="anonymous" />
<script data-name="custom.js" src="/api/config/custom.js" async />
<Script src="/api/config/custom.js" />
<div className="relative container m-auto flex flex-col justify-start z-10 h-full">
<QuickLaunch

@ -52,15 +52,15 @@ 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 }),

Loading…
Cancel
Save