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 (
|
return (
|
||||||
<div class="pt-3 first-of-type:pt-0">
|
<div class="pt-3 first-of-type:pt-0">
|
||||||
<Suspense
|
<Suspense
|
||||||
@@ -218,13 +237,7 @@ export function UnifiedActivityItem(props: {
|
|||||||
: profileFromNostr()?.primal_image_url || ""
|
: profileFromNostr()?.primal_image_url || ""
|
||||||
}
|
}
|
||||||
icon={shouldShowShuffle() ? <Shuffle /> : undefined}
|
icon={shouldShowShuffle() ? <Shuffle /> : undefined}
|
||||||
primaryOnClick={() =>
|
primaryOnClick={handlePrimaryOnClick}
|
||||||
primaryContact()?.id
|
|
||||||
? navigate(`/chat/${primaryContact()?.id}`)
|
|
||||||
: profileFromNostr()
|
|
||||||
? props.onNewContactClick(profileFromNostr()!)
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
amountOnClick={click}
|
amountOnClick={click}
|
||||||
primaryName={
|
primaryName={
|
||||||
props.item.inbound
|
props.item.inbound
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ export function GenericItem(props: {
|
|||||||
<Match when={props.icon}>
|
<Match when={props.icon}>
|
||||||
<button
|
<button
|
||||||
class="flex h-[3rem] w-[3rem] items-center justify-center"
|
class="flex h-[3rem] w-[3rem] items-center justify-center"
|
||||||
onClick={() => props.primaryOnClick}
|
onClick={() =>
|
||||||
|
props.primaryOnClick && props.primaryOnClick()
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{props.icon}
|
{props.icon}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import {
|
|||||||
ConfirmDialog,
|
ConfirmDialog,
|
||||||
DefaultMain,
|
DefaultMain,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
MutinyWalletGuard,
|
MutinyWalletGuard
|
||||||
VStack
|
|
||||||
} from "~/components";
|
} from "~/components";
|
||||||
import { useI18n } from "~/i18n/context";
|
import { useI18n } from "~/i18n/context";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user