mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Open reactions modal on reaction summary
This commit is contained in:
parent
33e7efdc02
commit
87d1241e85
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user