mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-03 02:10:55 +00:00
Open reactions modal on reaction summary
This commit is contained in:
parent
33e7efdc02
commit
87d1241e85
@ -302,12 +302,30 @@
|
|||||||
content: ' · ';
|
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 {
|
.number {
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,15 @@ const Note: Component<{
|
|||||||
onCancel: onCancelZap,
|
onCancel: onCancelZap,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openReationModal = () => {
|
||||||
|
app?.actions.openReactionModal(props.note.post.id, {
|
||||||
|
likes: footerState.likes,
|
||||||
|
zaps: footerState.zapCount,
|
||||||
|
reposts: footerState.reposts,
|
||||||
|
quotes: 0,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const onContextMenuTrigger = () => {
|
const onContextMenuTrigger = () => {
|
||||||
app?.actions.openContextMenu(
|
app?.actions.openContextMenu(
|
||||||
props.note,
|
props.note,
|
||||||
@ -136,14 +145,7 @@ const Note: Component<{
|
|||||||
() => {
|
() => {
|
||||||
app?.actions.openCustomZapModal(customZapInfo);
|
app?.actions.openCustomZapModal(customZapInfo);
|
||||||
},
|
},
|
||||||
() => {
|
openReationModal,
|
||||||
app?.actions.openReactionModal(props.note.post.id, {
|
|
||||||
likes: footerState.likes,
|
|
||||||
zaps: footerState.zapCount,
|
|
||||||
reposts: footerState.reposts,
|
|
||||||
quotes: 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,9 +216,12 @@ const Note: Component<{
|
|||||||
<span>
|
<span>
|
||||||
{veryLongDate(props.note.post?.created_at).replace('at', '·')}
|
{veryLongDate(props.note.post?.created_at).replace('at', '·')}
|
||||||
</span>
|
</span>
|
||||||
<span class={styles.reactSummary}>
|
<button
|
||||||
|
class={styles.reactSummary}
|
||||||
|
onClick={openReationModal}
|
||||||
|
>
|
||||||
<span class={styles.number}>{reactionSum()}</span> Reactions
|
<span class={styles.number}>{reactionSum()}</span> Reactions
|
||||||
</span>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<NoteFooter
|
<NoteFooter
|
||||||
|
Loading…
Reference in New Issue
Block a user