@axium/notes 0.4.5 → 0.4.6

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/notes",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "Notes for Axium",
6
6
  "funding": {
@@ -36,8 +36,8 @@
36
36
  "build": "tsc"
37
37
  },
38
38
  "peerDependencies": {
39
- "@axium/client": ">=0.37.0",
40
- "@axium/core": ">=0.39.0",
39
+ "@axium/client": ">=0.39.0",
40
+ "@axium/core": ">=0.41.0",
41
41
  "@axium/server": ">=0.55.0",
42
42
  "@sveltejs/kit": "^2.27.3",
43
43
  "utilium": "^3.0.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.notes')} icon="notes" href="/notes" />
9
+
10
+ {@render children()}
@@ -1,15 +1,17 @@
1
1
  import { connect } from '@axium/client/socket';
2
2
  import { schemas } from '@axium/client/sync';
3
- import { getCurrentSession } from '@axium/client/user';
3
+ import { currentSession } from '@axium/client/user';
4
4
  import type { Session, UserPublic } from '@axium/core';
5
5
  import { Note } from '@axium/notes/common';
6
6
 
7
7
  schemas.set('notes', Note);
8
8
 
9
+ export const ssr = false;
10
+
9
11
  export async function load({ parent }) {
10
12
  let { session }: { session?: (Session & { user: UserPublic }) | null } = await parent();
11
13
 
12
- session ||= await getCurrentSession().catch(() => null);
14
+ session ||= await currentSession();
13
15
 
14
16
  if (session) await connect().catch(() => null);
15
17
 
@@ -22,7 +22,6 @@
22
22
  </svelte:head>
23
23
 
24
24
  <div id="notes-main">
25
- <h1>{text('app_name.notes')}</h1>
26
25
  <button
27
26
  id="create-note"
28
27
  class="icon-text mobile-float-right"
@@ -1,8 +1,6 @@
1
1
  import { fetchAPI } from '@axium/client/requests';
2
2
  import { redirect } from '@sveltejs/kit';
3
3
 
4
- export const ssr = false;
5
-
6
4
  export async function load({ parent }) {
7
5
  let { session } = await parent();
8
6
 
@@ -1,7 +1,5 @@
1
1
  import { fetchAPI } from '@axium/client/requests';
2
2
 
3
- export const ssr = false;
4
-
5
3
  export async function load({ params }) {
6
4
  const note = await fetchAPI('GET', 'notes/:id', {}, params.id!);
7
5