@axium/calendar 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/calendar",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev>",
|
|
5
5
|
"description": "Calendar for Axium",
|
|
6
6
|
"funding": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"build": "tsc"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@axium/client": ">=0.
|
|
42
|
-
"@axium/core": ">=0.
|
|
41
|
+
"@axium/client": ">=0.39.0",
|
|
42
|
+
"@axium/core": ">=0.41.0",
|
|
43
43
|
"@axium/server": ">=0.47.0",
|
|
44
44
|
"@sveltejs/kit": "^2.27.3",
|
|
45
45
|
"kysely": "^0.29.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { text } from '@axium/client';
|
|
3
|
+
import { TopBarContent } from '@axium/client/components';
|
|
4
|
+
|
|
5
|
+
const { children } = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<TopBarContent name={text('app_name.calendar')} icon="calendar" href="/calendar" />
|
|
9
|
+
|
|
10
|
+
{@render children()}
|
package/routes/calendar/+page.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventFilter, getSpanFilter, type Calendar } from '@axium/calendar/common';
|
|
2
2
|
import { fetchAPI } from '@axium/client/requests';
|
|
3
|
-
import {
|
|
3
|
+
import { currentSession } from '@axium/client/user';
|
|
4
4
|
import type { Session, User } from '@axium/core';
|
|
5
5
|
import { redirect } from '@sveltejs/kit';
|
|
6
6
|
import { prettifyError } from 'zod';
|
|
@@ -11,11 +11,8 @@ export const ssr = false;
|
|
|
11
11
|
export async function load({ parent, url }) {
|
|
12
12
|
let { session }: { session?: (Session & { user: User }) | null } = await parent();
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} catch (e) {
|
|
17
|
-
redirect(307, '/login?after=/calendar');
|
|
18
|
-
}
|
|
14
|
+
session ||= await currentSession();
|
|
15
|
+
if (!session) redirect(307, '/login?after=/calendar');
|
|
19
16
|
|
|
20
17
|
const filter: EventFilter = getSpanFilter('week', new Date());
|
|
21
18
|
try {
|
package/routes/calendar/cal.css
CHANGED