Skip to content

Commit

Permalink
Map & chat updates for React SPA (#22)
Browse files Browse the repository at this point in the history
* Moved map over, minor fixes to chat so it'll load

* Update chat, added minor improvements

* Fix gh links
  • Loading branch information
daviesgeek authored Jul 10, 2024
1 parent 96eb785 commit 63d5759
Show file tree
Hide file tree
Showing 19 changed files with 1,059 additions and 166 deletions.
Binary file modified frontend/.yarn/install-state.gz
Binary file not shown.
132 changes: 113 additions & 19 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>MeshInfo</title>
</head>
<body>
<div>
<div class="w-full h-full">
<!-- Static sidebar for desktop -->
<div
class="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-60 lg:flex-col"
Expand All @@ -31,47 +31,133 @@
<div>%VITE_MESH_DESCRIPTION%</div>

<div>
<a href="%VITE_MESH_URL%" class="text-xs text-gray-900">Website</a>
<a href="%VITE_MESH_DESCRIPTION%" class="text-xs text-gray-900"
>Website</a
>
</div>

<nav class="flex flex-col flex-1">
<h3>Mesh</h3>
<div class="mb-2">
<a href="chat">Chat</a>
<a href="chat">
<img
src="images/icons/chat.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Chat
</a>
</div>
<div class="mb-2">
<a href="map">Map</a>
<a href="map">
<img
src="images/icons/map.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Map
</a>
</div>
<div class="mb-2">
<a href="nodes">Nodes</a>
<a href="nodes">
<img
src="images/icons/node.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Nodes
</a>
</div>
<div class="mb-2">
<a href="neighbors">Node Neighbors</a>
<a href="neighbors.html">
<img
src="images/icons/neighbors.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Node Neighbors
</a>
</div>
<div class="mb-2">
<a href="network">Network</a>
<a href="stats.html">
<img
src="images/icons/stats.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Stats
</a>
</div>
<div class="mb-2">
<a href="routes">Routes</a>
<a href="telemetry.html">
<img
src="images/icons/telemetry.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Telemetry
</a>
</div>
<div class="mb-2">
<a href="stats">Stats</a>
<a href="traceroutes.html">
<img
src="images/icons/route2.svg"
width="20"
height="20"
align="middle"
style="vertical-align: middle"
/>
Traceroutes
</a>
</div>
</nav>

<nav class="flex flex-col flex-1">
<h3>Logs</h3>
<div class="mb-2">
<a href="telemetry">Telemetry</a>
<a href="mesh_log.html">Mesh Messages</a>
</div>
<div class="mb-2">
<a href="traceroutes">Traceroutes</a>
<a href="mqtt_log.html">MQTT Messages</a>
</div>
</nav>

<nav class="flex flex-col flex-1">
<h3>Logs</h3>
<h3>Other Tools</h3>
<div class="mb-2">
<a href="mesh_log.html">Mesh Messages</a>
<a href="https://meshview.armooo.net" target="_blank"
>Armooo's MeshView</a
>
</div>
<div class="mb-2">
<a href="mqtt_log.html">MQTT Messages</a>
<a href="https://meshtastic.liamcottle.net" target="_blank"
>Liam's Meshtastic Web</a
>
</div>
<div class="mb-2">
<a href="https://meshmap.net" target="_blank">MeshMap</a>
</div>
<div class="mb-2">
<a href="https://app.bayme.sh" target="_blank"
>Bay Mesh Explorer</a
>
</div>
<div class="mb-2">
<a href="https://heywhatsthat.com/profiler.html" target="_blank"
>HWT Path Profiler</a
>
</div>
</nav>

Expand All @@ -91,11 +177,7 @@ <h5 class="mb-2">Powered by MeshInfo</h5>
</div>
</div>

<div class="lg:pl-60">
<main>
<div class="px-4 sm:px-6 lg:px-8" id="root"></div>
</main>
</div>
<div id="root" class="lg:pl-60 h-full"></div>
</div>

<style>
Expand All @@ -104,6 +186,18 @@ <h5 class="mb-2">Powered by MeshInfo</h5>
font-size: 12px;
margin: 0;
padding: 0;
height: 100vh;
width: 100vw;
}
a {
text-decoration: none;
color: #33f;
}
a:visited {
color: #33f;
}
nav a:hover {
color: #000;
}
</style>

Expand Down
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"start": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@reduxjs/toolkit": "^2.2.5",
"autoprefixer": "^10.4.19",
"date-fns": "^3.6.0",
"ol": "^9.2.4",
"postcss": "^8.4.38",
"react": "^18.2.0",
Expand Down
4 changes: 4 additions & 0 deletions frontend/public/images/icons/chat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions frontend/public/images/icons/map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions frontend/public/images/icons/neighbors.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/public/images/icons/node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions frontend/public/images/icons/route.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/public/images/icons/route2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/public/images/icons/stats.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 63d5759

Please sign in to comment.