@axium/notes 0.2.4 → 0.2.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.
Files changed (2) hide show
  1. package/lib/Note.svelte +13 -1
  2. package/package.json +1 -1
package/lib/Note.svelte CHANGED
@@ -1,13 +1,15 @@
1
1
  <script lang="ts">
2
2
  import { goto } from '$app/navigation';
3
3
  import { fetchAPI } from '@axium/client/requests';
4
- import { Icon, Popover } from '@axium/client/components';
4
+ import { AccessControlDialog, Icon, Popover } from '@axium/client/components';
5
5
  import type { Note } from '@axium/notes/common';
6
6
  import { page } from '$app/state';
7
7
  import { copy } from '@axium/client/clipboard';
8
8
  import { download } from 'utilium/dom.js';
9
9
 
10
10
  let { note = $bindable(), notes = $bindable(), pageMode = false }: { note: Note; notes?: Note[]; pageMode?: boolean } = $props();
11
+
12
+ let acl = $state<HTMLDialogElement>();
11
13
  </script>
12
14
 
13
15
  <div class={['note', pageMode && 'full-page']}>
@@ -36,6 +38,15 @@
36
38
  <div class="menu-item" onclick={() => download(note.title + '.txt', note.content ?? '')}>
37
39
  <Icon i="download" /> Download
38
40
  </div>
41
+ <div
42
+ class="menu-item"
43
+ onclick={() => {
44
+ acl!.showModal();
45
+ acl!.click();
46
+ }}
47
+ >
48
+ <Icon i="user-group" /> Share
49
+ </div>
39
50
  <div class="menu-item" onclick={() => copy('text/plain', `${location.origin}/notes/${note.id}`)}>
40
51
  <Icon i="link-horizontal" /> Copy Link
41
52
  </div>
@@ -51,6 +62,7 @@
51
62
  </div>
52
63
  {/if}
53
64
  </Popover>
65
+ <AccessControlDialog bind:dialog={acl} bind:item={note} itemType="notes" editable />
54
66
  </div>
55
67
  <textarea
56
68
  name="content"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/notes",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "description": "Notes for Axium",
6
6
  "funding": {