@axium/tasks 0.4.11 → 0.4.12

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.
@@ -2,6 +2,7 @@
2
2
  import { goto } from '$app/navigation';
3
3
  import { page } from '$app/state';
4
4
  import { copy } from '@axium/client/gui';
5
+ import type { UserPublic } from '@axium/core';
5
6
  import { AccessControlDialog, Icon, Popover } from '@axium/client/components';
6
7
  import { fetchAPI, text } from '@axium/client';
7
8
  import type { Task, TaskList } from '@axium/tasks/common';
@@ -9,8 +10,11 @@
9
10
  import { download } from 'utilium/dom.js';
10
11
  import { toastStatus } from '@axium/client/toast';
11
12
 
12
- let { list = $bindable(), lists = $bindable() }: { list: WithRequired<TaskList, 'tasks'>; lists?: WithRequired<TaskList, 'tasks'>[] } =
13
- $props();
13
+ let {
14
+ list = $bindable(),
15
+ lists = $bindable(),
16
+ user,
17
+ }: { list: WithRequired<TaskList, 'tasks'>; lists?: WithRequired<TaskList, 'tasks'>[]; user?: UserPublic } = $props();
14
18
 
15
19
  let tasks = $state(list.tasks);
16
20
 
@@ -175,7 +179,7 @@
175
179
  </div>
176
180
  {/if}
177
181
  </Popover>
178
- <AccessControlDialog bind:dialog={acl} item={list} itemType="task_lists" editable />
182
+ <AccessControlDialog bind:dialog={acl} item={list} itemType="task_lists" {user} />
179
183
  </div>
180
184
  <div>
181
185
  <button class="icon-text" onclick={() => fetchAPI('PUT', 'task_lists/:id', { summary: '' }, list.id).then(t => tasks.push(t))}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/tasks",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "Tasks for Axium",
6
6
  "funding": {
@@ -36,8 +36,8 @@
36
36
  "build": "tsc"
37
37
  },
38
38
  "peerDependencies": {
39
- "@axium/client": ">=0.18.0",
40
- "@axium/core": ">=0.19.0",
39
+ "@axium/client": ">=0.20.0",
40
+ "@axium/core": ">=0.23.0",
41
41
  "@axium/server": ">=0.35.0",
42
42
  "@sveltejs/kit": "^2.27.3",
43
43
  "utilium": "^2.6.3"
@@ -1,8 +1,8 @@
1
1
  import { getCurrentSession } from '@axium/client/user';
2
- import type { Session } from '@axium/core';
2
+ import type { Session, UserPublic } from '@axium/core';
3
3
 
4
4
  export async function load({ parent, url }) {
5
- let { session }: { session?: Session | null } = await parent();
5
+ let { session }: { session?: (Session & { user: UserPublic }) | null } = await parent();
6
6
 
7
7
  session ||= await getCurrentSession().catch(() => null);
8
8
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  <div class="lists-container">
26
26
  {#each lists as list}
27
- <TaskList {list} bind:lists />
27
+ <TaskList {list} bind:lists user={data.session?.user} />
28
28
  {/each}
29
29
  </div>
30
30
  </div>
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
  {/if}
36
36
 
37
- <TaskList list={data.list} />
37
+ <TaskList list={data.list} user={data.session?.user} />
38
38
  </div>
39
39
 
40
40
  <style>