@axium/notes 0.1.5 → 0.1.7

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 +7 -12
  2. package/package.json +1 -1
package/lib/Note.svelte CHANGED
@@ -25,27 +25,22 @@
25
25
  <Popover>
26
26
  <div
27
27
  class="menu-item"
28
- onclick={e => {
29
- e.stopPropagation();
28
+ onclick={() =>
30
29
  fetchAPI('DELETE', 'notes/:id', {}, note.id).then(() => {
31
30
  if (!notes) goto('/notes');
32
31
  else notes.splice(notes.indexOf(note), 1);
33
- });
34
- }}
32
+ })}
35
33
  >
36
34
  <Icon i="trash" /> Delete
37
35
  </div>
38
36
  <div class="menu-item" onclick={() => download(note.title + '.txt', note.content ?? '')}>
39
- <Icon i="file-arrow-down" /> Download
37
+ <Icon i="download" /> Download
38
+ </div>
39
+ <div class="menu-item" onclick={() => copy('text/plain', `${location.origin}/notes/${note.id}`)}>
40
+ <Icon i="link-horizontal" /> Copy Link
40
41
  </div>
41
42
  {#if notes}
42
- <div
43
- class="menu-item"
44
- onclick={e => {
45
- e.currentTarget.parentElement?.togglePopover();
46
- open(`/notes/${note.id}`);
47
- }}
48
- >
43
+ <div class="menu-item" onclick={() => open(`/notes/${note.id}`)}>
49
44
  <Icon i="arrow-up-right-from-square" /> Open in New Tab
50
45
  </div>
51
46
  {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/notes",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "description": "Notes for Axium",
6
6
  "funding": {