Open reactions modal on reaction summary

This commit is contained in:
Bojan Mojsilovic 2024-04-16 15:31:03 +02:00
parent 33e7efdc02
commit 87d1241e85
2 changed files with 33 additions and 10 deletions

View File

@ -302,12 +302,30 @@
content: ' · ';
}
background: none;
margin: 0;
padding: 0;
margin-left: 4px;
display: inline-block;
width: fit-content;
outline: none;
border: none;
color: var(--text-tertiary);
font-size: 16px;
font-weight: 400;
line-height: 16px;
.number {
color: var(--text-primary);
font-size: 16px;
font-weight: 600;
line-height: 16px;
}
&:hover {
color: var(--text-primary);
}
}
}
}

View File

@ -129,6 +129,15 @@ const Note: Component<{
onCancel: onCancelZap,
};
const openReationModal = () => {
app?.actions.openReactionModal(props.note.post.id, {
likes: footerState.likes,
zaps: footerState.zapCount,
reposts: footerState.reposts,
quotes: 0,
});
};
const onContextMenuTrigger = () => {
app?.actions.openContextMenu(
props.note,
@ -136,14 +145,7 @@ const Note: Component<{
() => {
app?.actions.openCustomZapModal(customZapInfo);
},
() => {
app?.actions.openReactionModal(props.note.post.id, {
likes: footerState.likes,
zaps: footerState.zapCount,
reposts: footerState.reposts,
quotes: 0,
});
}
openReationModal,
);
}
@ -214,9 +216,12 @@ const Note: Component<{
<span>
{veryLongDate(props.note.post?.created_at).replace('at', '·')}
</span>
<span class={styles.reactSummary}>
<button
class={styles.reactSummary}
onClick={openReationModal}
>
<span class={styles.number}>{reactionSum()}</span> Reactions
</span>
</button>
</div>
<NoteFooter