Skip to content

Commit

Permalink
Merge remote-tracking branch 'hunter275/traceroute' into traceroute
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter275 committed Jul 4, 2024
2 parents bcebfd2 + f3fbe75 commit 0955bbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/PageComponents/Messages/ChannelChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const ChannelChat = ({

return (
<div className="flex flex-grow flex-col">
<div className="flex flex-grow flex-col">
<div className="flex flex-grow">
<div className="flex flex-grow flex-col">
{messages ? (
messages.map((message, index) => (
<Message
Expand All @@ -44,6 +45,8 @@ export const ChannelChat = ({
<Subtle>No Messages</Subtle>
</div>
)}
</div>
<div className={"flex flex-grow flex-col border-slate-400 border-l " + (traceroutes == undefined ? "hidden" : "") }>
{ to === "broadcast" ? null : traceroutes ? (
traceroutes.map((traceroute, index) => (
<TraceRoute
Expand All @@ -60,6 +63,7 @@ export const ChannelChat = ({
</div>
)}
</div>
</div>
<div className="p-3">
<MessageInput to={to} channel={channel} />
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export const MessagesPage = (): JSX.Element => {
icon: WaypointsIcon,
async onClick() {
if (nodes.get(activeChat)?.num === undefined) return;
toast({
title: "Sending Traceroute, please wait..."
})
await connection?.traceRoute(nodes.get(activeChat)?.num!).then(() =>
toast({
title: `Traceroute sent.`,
Expand Down

0 comments on commit 0955bbe

Please sign in to comment.