mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-18 23:04:25 +01:00
show channel close details
This commit is contained in:
committed by
benthecarman
parent
15926619c7
commit
875eeeb4e9
@@ -185,6 +185,25 @@ export function UnifiedActivityItem(props: {
|
||||
}
|
||||
};
|
||||
|
||||
function handlePrimaryOnClick() {
|
||||
if (primaryContact()?.id) {
|
||||
navigate(`/chat/${primaryContact()?.id}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (profileFromNostr()) {
|
||||
props.onNewContactClick(profileFromNostr()!);
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
props.item.kind === "ChannelOpen" ||
|
||||
props.item.kind === "ChannelClose"
|
||||
) {
|
||||
click();
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div class="pt-3 first-of-type:pt-0">
|
||||
<Suspense
|
||||
@@ -218,13 +237,7 @@ export function UnifiedActivityItem(props: {
|
||||
: profileFromNostr()?.primal_image_url || ""
|
||||
}
|
||||
icon={shouldShowShuffle() ? <Shuffle /> : undefined}
|
||||
primaryOnClick={() =>
|
||||
primaryContact()?.id
|
||||
? navigate(`/chat/${primaryContact()?.id}`)
|
||||
: profileFromNostr()
|
||||
? props.onNewContactClick(profileFromNostr()!)
|
||||
: undefined
|
||||
}
|
||||
primaryOnClick={handlePrimaryOnClick}
|
||||
amountOnClick={click}
|
||||
primaryName={
|
||||
props.item.inbound
|
||||
|
||||
@@ -43,7 +43,9 @@ export function GenericItem(props: {
|
||||
<Match when={props.icon}>
|
||||
<button
|
||||
class="flex h-[3rem] w-[3rem] items-center justify-center"
|
||||
onClick={() => props.primaryOnClick}
|
||||
onClick={() =>
|
||||
props.primaryOnClick && props.primaryOnClick()
|
||||
}
|
||||
>
|
||||
{props.icon}
|
||||
</button>
|
||||
|
||||
@@ -6,8 +6,7 @@ import {
|
||||
ConfirmDialog,
|
||||
DefaultMain,
|
||||
ExternalLink,
|
||||
MutinyWalletGuard,
|
||||
VStack
|
||||
MutinyWalletGuard
|
||||
} from "~/components";
|
||||
import { useI18n } from "~/i18n/context";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user