update deps
This commit is contained in:
parent
9876261789
commit
f44fa8bf7c
BIN
web/bun.lockb
BIN
web/bun.lockb
Binary file not shown.
@ -11,32 +11,32 @@
|
|||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.7.0",
|
"@astrojs/check": "^0.9.3",
|
||||||
"@astrojs/mdx": "^3.1.2",
|
"@astrojs/mdx": "^3.1.6",
|
||||||
"@astrojs/tailwind": "^5.1.0",
|
"@astrojs/tailwind": "^5.1.0",
|
||||||
"@astrojs/ts-plugin": "^1.8.0",
|
"@astrojs/ts-plugin": "^1.10.2",
|
||||||
"@photo-sphere-viewer/core": "^5.8.1",
|
"@photo-sphere-viewer/core": "^5.10.0",
|
||||||
"@photo-sphere-viewer/markers-plugin": "^5.8.1",
|
"@photo-sphere-viewer/markers-plugin": "^5.10.0",
|
||||||
"@photo-sphere-viewer/virtual-tour-plugin": "^5.8.1",
|
"@photo-sphere-viewer/virtual-tour-plugin": "^5.10.0",
|
||||||
"@unom/style": "git+https://git.unom.io/unom/style.git",
|
"@unom/style": "git+https://git.unom.io/unom/style.git",
|
||||||
"astro": "^4.11.3",
|
"astro": "^4.15.6",
|
||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.20",
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"ical": "^0.8.0",
|
"ical": "^0.8.0",
|
||||||
"keen-slider": "^6.8.6",
|
"keen-slider": "^6.8.6",
|
||||||
"lucide-astro": "^0.399.0",
|
"lucide-astro": "^0.441.0",
|
||||||
"marked": "^13.0.1",
|
"marked": "^14.1.2",
|
||||||
"motion": "^10.18.0",
|
"motion": "^10.18.0",
|
||||||
"pannellum": "^2.5.6",
|
"pannellum": "^2.5.6",
|
||||||
"postcss": "^8.4.39",
|
"postcss": "^8.4.47",
|
||||||
"postcss-custom-media": "^10.0.7",
|
"postcss-custom-media": "^11.0.1",
|
||||||
"postcss-import": "^16.1.0",
|
"postcss-import": "^16.1.0",
|
||||||
"prettier-plugin-astro": "^0.14.0",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"tailwind-merge": "^2.3.0",
|
"tailwind-merge": "^2.5.2",
|
||||||
"tailwindcss": "^3.4.4",
|
"tailwindcss": "^3.4.4",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
"typescript": "^5.5.3"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ical": "^0.8.3",
|
"@types/ical": "^0.8.3",
|
||||||
|
@ -19,8 +19,8 @@ export async function getCalenderIcs() {
|
|||||||
|
|
||||||
export type Event = {
|
export type Event = {
|
||||||
title: string;
|
title: string;
|
||||||
start: Date;
|
start: Date | undefined;
|
||||||
end: Date;
|
end: Date | undefined;
|
||||||
location: string;
|
location: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
link: string | undefined;
|
link: string | undefined;
|
||||||
@ -51,12 +51,13 @@ export async function getEvents() {
|
|||||||
|
|
||||||
if (!isRecurring || !e.rrule) return e;
|
if (!isRecurring || !e.rrule) return e;
|
||||||
|
|
||||||
else {
|
|
||||||
|
|
||||||
const latest = e.recurrences?.[e.recurrences.length - 1];
|
const latest = e.recurrences?.[e.recurrences.length - 1];
|
||||||
|
|
||||||
if (!latest) {
|
if (!latest) {
|
||||||
const duration = e.end !== undefined && e.start !== undefined ? e.end.getTime() - e.start.getTime() : 0;
|
const duration =
|
||||||
|
e.end !== undefined && e.start !== undefined
|
||||||
|
? e.end.getTime() - e.start.getTime()
|
||||||
|
: 0;
|
||||||
const next = e.rrule.after(new Date(Date.now()), true);
|
const next = e.rrule.after(new Date(Date.now()), true);
|
||||||
|
|
||||||
if (!next) {
|
if (!next) {
|
||||||
@ -66,12 +67,9 @@ export async function getEvents() {
|
|||||||
e.start = next;
|
e.start = next;
|
||||||
e.end = new Date(next.getTime() + duration);
|
e.end = new Date(next.getTime() + duration);
|
||||||
|
|
||||||
return e
|
return e;
|
||||||
|
|
||||||
} else {
|
|
||||||
return latest
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return latest;
|
||||||
})
|
})
|
||||||
.filter((e) => {
|
.filter((e) => {
|
||||||
const isFuture = Number(e.end) > Date.now();
|
const isFuture = Number(e.end) > Date.now();
|
||||||
@ -93,12 +91,10 @@ export async function getEvents() {
|
|||||||
|
|
||||||
const isRecurring = !!e.rrule;
|
const isRecurring = !!e.rrule;
|
||||||
|
|
||||||
// console.log(e.description);
|
|
||||||
|
|
||||||
if (e.description) {
|
if (e.description) {
|
||||||
const lines = e.description.split("\n");
|
const lines = e.description.split("\n");
|
||||||
|
|
||||||
for (let line of lines) {
|
for (const line of lines) {
|
||||||
const designator = line.substring(0, line.search(":"));
|
const designator = line.substring(0, line.search(":"));
|
||||||
|
|
||||||
switch (designator) {
|
switch (designator) {
|
||||||
@ -113,7 +109,7 @@ export async function getEvents() {
|
|||||||
.trim();
|
.trim();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
description += line + " ";
|
description += `${line} `;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,8 +118,8 @@ export async function getEvents() {
|
|||||||
|
|
||||||
const event: Event = {
|
const event: Event = {
|
||||||
title: e.summary || "Kein Titel",
|
title: e.summary || "Kein Titel",
|
||||||
start: e.start!,
|
start: e.start,
|
||||||
end: e.end!,
|
end: e.end,
|
||||||
location: e.location || "Kein Standort",
|
location: e.location || "Kein Standort",
|
||||||
description,
|
description,
|
||||||
link,
|
link,
|
||||||
@ -134,7 +130,7 @@ export async function getEvents() {
|
|||||||
return event;
|
return event;
|
||||||
})
|
})
|
||||||
// Sort the events
|
// Sort the events
|
||||||
.sort((a, b) => a.start.getTime() - b.start.getTime());
|
.sort((a, b) => (a.start?.getTime() || 0) - (b.start?.getTime() || 0));
|
||||||
|
|
||||||
return futureAndRecurringEvents;
|
return futureAndRecurringEvents;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user