feat: removed traceroute from message screen.
This commit is contained in:
@@ -5,8 +5,7 @@ import {
|
|||||||
} from "@app/core/stores/deviceStore.ts";
|
} from "@app/core/stores/deviceStore.ts";
|
||||||
import { Message } from "@components/PageComponents/Messages/Message.tsx";
|
import { Message } from "@components/PageComponents/Messages/Message.tsx";
|
||||||
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx";
|
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx";
|
||||||
import { TraceRoute } from "@components/PageComponents/Messages/TraceRoute.tsx";
|
import type { Types } from "@meshtastic/js";
|
||||||
import type { Protobuf, Types } from "@meshtastic/js";
|
|
||||||
import { InboxIcon } from "lucide-react";
|
import { InboxIcon } from "lucide-react";
|
||||||
import type { JSX } from "react";
|
import type { JSX } from "react";
|
||||||
|
|
||||||
@@ -14,7 +13,6 @@ export interface ChannelChatProps {
|
|||||||
messages?: MessageWithState[];
|
messages?: MessageWithState[];
|
||||||
channel: Types.ChannelNumber;
|
channel: Types.ChannelNumber;
|
||||||
to: Types.Destination;
|
to: Types.Destination;
|
||||||
traceroutes?: Types.PacketMetadata<Protobuf.Mesh.RouteDiscovery>[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const EmptyState = () => (
|
const EmptyState = () => (
|
||||||
@@ -28,7 +26,6 @@ export const ChannelChat = ({
|
|||||||
messages,
|
messages,
|
||||||
channel,
|
channel,
|
||||||
to,
|
to,
|
||||||
traceroutes,
|
|
||||||
}: ChannelChatProps): JSX.Element => {
|
}: ChannelChatProps): JSX.Element => {
|
||||||
const { nodes } = useDevice();
|
const { nodes } = useDevice();
|
||||||
|
|
||||||
@@ -64,21 +61,6 @@ export const ChannelChat = ({
|
|||||||
<MessageInput to={to} channel={channel} />
|
<MessageInput to={to} channel={channel} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* {to === "broadcast" ? null : traceroutes ? (
|
|
||||||
traceroutes.map((traceroute, index) => (
|
|
||||||
<TraceRoute
|
|
||||||
key={traceroute.id}
|
|
||||||
from={nodes.get(traceroute.from)}
|
|
||||||
to={nodes.get(traceroute.to)}
|
|
||||||
route={traceroute.data.route}
|
|
||||||
/>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<div className="m-auto">
|
|
||||||
<InboxIcon className="m-auto" />
|
|
||||||
<Subtle>No Traceroutes</Subtle>
|
|
||||||
</div>
|
|
||||||
)} */}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -108,21 +108,6 @@ const MessagesPage = () => {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
icon: WaypointsIcon,
|
|
||||||
async onClick() {
|
|
||||||
const targetNode = nodes.get(activeChat)?.num;
|
|
||||||
if (targetNode === undefined) return;
|
|
||||||
toast({
|
|
||||||
title: "Sending Traceroute, please wait...",
|
|
||||||
});
|
|
||||||
await connection?.traceRoute(targetNode).then(() =>
|
|
||||||
toast({
|
|
||||||
title: "Traceroute sent.",
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
: []
|
: []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user