diff --git a/CHANGELOG.md b/CHANGELOG.md index e913c58a..c5f5fb5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ # 0.3.3 - [x] Add ability to start a chat from the messages list page (NIP 24 only) +- [x] Move notification info to modal # 0.3.2 diff --git a/src/app/ModalRoutes.svelte b/src/app/ModalRoutes.svelte index 70d3a702..5de518c3 100644 --- a/src/app/ModalRoutes.svelte +++ b/src/app/ModalRoutes.svelte @@ -16,6 +16,7 @@ import NoteShare from "src/app/views/NoteShare.svelte" import PublishInfo from "src/app/views/PublishInfo.svelte" import NoteDetail from "src/app/views/NoteDetail.svelte" + import NotificationInfo from "src/app/views/NotificationInfo.svelte" import ThreadDetail from "src/app/views/ThreadDetail.svelte" import PersonDetail from "src/app/views/PersonDetail.svelte" import PersonList from "src/app/shared/PersonList.svelte" @@ -42,6 +43,8 @@ {:else if m.type === "note/share"} +{:else if m.type === "notification/info"} + {:else if m.type === "thread/detail"} {:else if m.type === "publish/info"} diff --git a/src/app/views/Notification.svelte b/src/app/views/Notification.svelte index aa98fc30..978f7174 100644 --- a/src/app/views/Notification.svelte +++ b/src/app/views/Notification.svelte @@ -6,9 +6,7 @@ import PersonCircle from "src/app/shared/PersonCircle.svelte" import PersonName from "src/app/shared/PersonName.svelte" import Card from "src/partials/Card.svelte" - import Popover from "src/partials/Popover.svelte" import NoteContent from "src/app/shared/NoteContent.svelte" - import NotificationSection from "src/app/views/NotificationSection.svelte" import {modal} from "src/partials/state" export let event @@ -35,6 +33,8 @@ return "reacted to" }) + + const showDetails = () => modal.push({type: "notification/info", zaps, likes, replies}) {#if note} @@ -51,24 +51,10 @@ mentioned you. {:else} - -
- {quantify(pubkeys.length, "person", "people")} - {actionText} your note. -
-
- {#if zaps.length > 0} - Zapped by - {/if} - {#if likes.length > 0} - Liked by - {/if} - {#if replies.length > 0} - Replies - {/if} -
-
+
+ {quantify(pubkeys.length, "person", "people")} + {actionText} your note. +
{/if} {formatTimestamp(event.created_at)} diff --git a/src/app/views/NotificationInfo.svelte b/src/app/views/NotificationInfo.svelte new file mode 100644 index 00000000..d050d88b --- /dev/null +++ b/src/app/views/NotificationInfo.svelte @@ -0,0 +1,22 @@ + + + + {#if zaps.length > 0} + + {/if} + {#if likes.length > 0} + + {/if} + {#if replies.length > 0} + + {/if} + diff --git a/src/app/views/NotificationSection.svelte b/src/app/views/NotificationSection.svelte index 49b9329d..4731b3d0 100644 --- a/src/app/views/NotificationSection.svelte +++ b/src/app/views/NotificationSection.svelte @@ -1,14 +1,13 @@ -
- -
- {#each pubkeys as pubkey} - - {/each} -
+

{label}

+
+ {#each pubkeys as pubkey} + + {/each}