Browse Source

refactor: add svgs to sub folder (#687)

pull/694/head
Dan Ditomaso 11 months ago
committed by GitHub
parent
commit
87cd91b0f8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      packages/web/index.html
  2. 0
      packages/web/public/devices/diy.svg
  3. 0
      packages/web/public/devices/heltec-ht62-esp32c3-sx1262.svg
  4. 0
      packages/web/public/devices/heltec-mesh-node-t114-case.svg
  5. 0
      packages/web/public/devices/heltec-mesh-node-t114.svg
  6. 0
      packages/web/public/devices/heltec-v3-case.svg
  7. 0
      packages/web/public/devices/heltec-v3.svg
  8. 0
      packages/web/public/devices/heltec-vision-master-e213.svg
  9. 0
      packages/web/public/devices/heltec-vision-master-e290.svg
  10. 0
      packages/web/public/devices/heltec-vision-master-t190.svg
  11. 0
      packages/web/public/devices/heltec-wireless-paper-V1_0.svg
  12. 0
      packages/web/public/devices/heltec-wireless-paper.svg
  13. 0
      packages/web/public/devices/heltec-wireless-tracker-V1-0.svg
  14. 0
      packages/web/public/devices/heltec-wireless-tracker.svg
  15. 0
      packages/web/public/devices/heltec-wsl-v3.svg
  16. 0
      packages/web/public/devices/nano-g2-ultra.svg
  17. 0
      packages/web/public/devices/pico.svg
  18. 0
      packages/web/public/devices/promicro.svg
  19. 0
      packages/web/public/devices/rak-wismeshtap.svg
  20. 0
      packages/web/public/devices/rak11310.svg
  21. 0
      packages/web/public/devices/rak2560.svg
  22. 0
      packages/web/public/devices/rak4631.svg
  23. 0
      packages/web/public/devices/rak4631_case.svg
  24. 0
      packages/web/public/devices/rpipicow.svg
  25. 0
      packages/web/public/devices/seeed-sensecap-indicator.svg
  26. 0
      packages/web/public/devices/seeed-xiao-s3.svg
  27. 0
      packages/web/public/devices/station-g2.svg
  28. 0
      packages/web/public/devices/t-deck.svg
  29. 0
      packages/web/public/devices/t-echo.svg
  30. 0
      packages/web/public/devices/t-watch-s3.svg
  31. 0
      packages/web/public/devices/tbeam-s3-core.svg
  32. 0
      packages/web/public/devices/tbeam.svg
  33. 0
      packages/web/public/devices/tlora-c6.svg
  34. 0
      packages/web/public/devices/tlora-t3s3-epaper.svg
  35. 0
      packages/web/public/devices/tlora-t3s3-v1.svg
  36. 0
      packages/web/public/devices/tlora-v2-1-1_6.svg
  37. 0
      packages/web/public/devices/tlora-v2-1-1_8.svg
  38. 0
      packages/web/public/devices/tracker-t1000-e.svg
  39. 0
      packages/web/public/devices/unknown.svg
  40. 0
      packages/web/public/devices/wio-tracker-wm1110.svg
  41. 0
      packages/web/public/devices/wm1110_dev_kit.svg
  42. 16
      packages/web/public/logo.svg
  43. 12
      packages/web/public/logo_black.svg
  44. 12
      packages/web/public/logo_white.svg
  45. 2
      packages/web/public/site.webmanifest
  46. 19
      packages/web/src/components/Sidebar.tsx
  47. 2
      packages/web/src/components/generic/DeviceImage.tsx

2
packages/web/index.html

@ -7,7 +7,7 @@
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
<link rel="manifest" href="site.webmanifest" />
<link rel="mask-icon" href="Logo_Black.svg" color="#67ea94" />
<link rel="mask-icon" href="logo_black.svg" color="#67ea94" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<link
rel="stylesheet"

0
packages/web/public/diy.svg → packages/web/public/devices/diy.svg

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

0
packages/web/public/heltec-ht62-esp32c3-sx1262.svg → packages/web/public/devices/heltec-ht62-esp32c3-sx1262.svg

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

0
packages/web/public/heltec-mesh-node-t114-case.svg → packages/web/public/devices/heltec-mesh-node-t114-case.svg

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

0
packages/web/public/heltec-mesh-node-t114.svg → packages/web/public/devices/heltec-mesh-node-t114.svg

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

0
packages/web/public/heltec-v3-case.svg → packages/web/public/devices/heltec-v3-case.svg

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
packages/web/public/heltec-v3.svg → packages/web/public/devices/heltec-v3.svg

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

0
packages/web/public/heltec-vision-master-e213.svg → packages/web/public/devices/heltec-vision-master-e213.svg

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

0
packages/web/public/heltec-vision-master-e290.svg → packages/web/public/devices/heltec-vision-master-e290.svg

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

0
packages/web/public/heltec-vision-master-t190.svg → packages/web/public/devices/heltec-vision-master-t190.svg

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

0
packages/web/public/heltec-wireless-paper-V1_0.svg → packages/web/public/devices/heltec-wireless-paper-V1_0.svg

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

0
packages/web/public/heltec-wireless-paper.svg → packages/web/public/devices/heltec-wireless-paper.svg

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

0
packages/web/public/heltec-wireless-tracker-V1-0.svg → packages/web/public/devices/heltec-wireless-tracker-V1-0.svg

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

0
packages/web/public/heltec-wireless-tracker.svg → packages/web/public/devices/heltec-wireless-tracker.svg

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

0
packages/web/public/heltec-wsl-v3.svg → packages/web/public/devices/heltec-wsl-v3.svg

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

0
packages/web/public/nano-g2-ultra.svg → packages/web/public/devices/nano-g2-ultra.svg

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

0
packages/web/public/pico.svg → packages/web/public/devices/pico.svg

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

0
packages/web/public/promicro.svg → packages/web/public/devices/promicro.svg

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

0
packages/web/public/rak-wismeshtap.svg → packages/web/public/devices/rak-wismeshtap.svg

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

0
packages/web/public/rak11310.svg → packages/web/public/devices/rak11310.svg

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 164 KiB

0
packages/web/public/rak2560.svg → packages/web/public/devices/rak2560.svg

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
packages/web/public/rak4631.svg → packages/web/public/devices/rak4631.svg

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

0
packages/web/public/rak4631_case.svg → packages/web/public/devices/rak4631_case.svg

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

0
packages/web/public/rpipicow.svg → packages/web/public/devices/rpipicow.svg

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

0
packages/web/public/seeed-sensecap-indicator.svg → packages/web/public/devices/seeed-sensecap-indicator.svg

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

0
packages/web/public/seeed-xiao-s3.svg → packages/web/public/devices/seeed-xiao-s3.svg

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

0
packages/web/public/station-g2.svg → packages/web/public/devices/station-g2.svg

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

0
packages/web/public/t-deck.svg → packages/web/public/devices/t-deck.svg

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
packages/web/public/t-echo.svg → packages/web/public/devices/t-echo.svg

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

0
packages/web/public/t-watch-s3.svg → packages/web/public/devices/t-watch-s3.svg

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

0
packages/web/public/tbeam-s3-core.svg → packages/web/public/devices/tbeam-s3-core.svg

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

0
packages/web/public/tbeam.svg → packages/web/public/devices/tbeam.svg

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

0
packages/web/public/tlora-c6.svg → packages/web/public/devices/tlora-c6.svg

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

0
packages/web/public/tlora-t3s3-epaper.svg → packages/web/public/devices/tlora-t3s3-epaper.svg

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

0
packages/web/public/tlora-t3s3-v1.svg → packages/web/public/devices/tlora-t3s3-v1.svg

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

0
packages/web/public/tlora-v2-1-1_6.svg → packages/web/public/devices/tlora-v2-1-1_6.svg

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
packages/web/public/tlora-v2-1-1_8.svg → packages/web/public/devices/tlora-v2-1-1_8.svg

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
packages/web/public/tracker-t1000-e.svg → packages/web/public/devices/tracker-t1000-e.svg

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

0
packages/web/public/unknown.svg → packages/web/public/devices/unknown.svg

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

0
packages/web/public/wio-tracker-wm1110.svg → packages/web/public/devices/wio-tracker-wm1110.svg

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

0
packages/web/public/wm1110_dev_kit.svg → packages/web/public/devices/wm1110_dev_kit.svg

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

16
packages/web/public/logo.svg

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="512" height="512" viewBox="0 0 512 512" xml:space="preserve">
<desc>Created with Fabric.js 4.6.0</desc>
<defs>
</defs>
<g transform="matrix(1 0 0 1 256 256)" id="xYQ9Gk9Jwpgj_HMOXB3F_" >
<path style="stroke: rgb(213,130,139); stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(103,234,148); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-256, -256)" d="M 0 0 L 512 0 L 512 512 L 0 512 z" stroke-linecap="round" />
</g>
<g transform="matrix(1.79 0 0 1.79 313.74 258.36)" id="1xBsk2n9FZp60Rz1O-ceJ" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: round; stroke-miterlimit: 2; fill: rgb(44,45,60); fill-rule: evenodd; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-250.97, -362.41)" d="M 250.908 330.267 L 193.126 415.005 L 180.938 406.694 L 244.802 313.037 C 246.174 311.024 248.453 309.819 250.889 309.816 C 253.326 309.814 255.606 311.015 256.982 313.026 L 320.994 406.536 L 308.821 414.869 L 250.908 330.267 Z" stroke-linecap="round" />
</g>
<g transform="matrix(1.81 0 0 1.81 145 256.15)" id="KxN7E9YpbyPgz0S4z4Cl6" >
<path style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: round; stroke-miterlimit: 2; fill: rgb(44,45,60); fill-rule: evenodd; opacity: 1;" vector-effect="non-scaling-stroke" transform=" translate(-115.14, -528.06)" d="M 87.642 581.398 L 154.757 482.977 L 142.638 474.713 L 75.523 573.134 L 87.642 581.398 Z" stroke-linecap="round" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

12
packages/web/public/logo_black.svg

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 100 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(0.802386,0,0,0.460028,-421.748,-122.127)">
<g transform="matrix(0.579082,0,0,1.01004,460.975,-39.6867)">
<path d="M250.908,330.267L193.126,415.005L180.938,406.694L244.802,313.037C246.174,311.024 248.453,309.819 250.889,309.816C253.326,309.814 255.606,311.015 256.982,313.026L320.994,406.536L308.821,414.869L250.908,330.267Z"/>
</g>
<g transform="matrix(0.582378,0,0,1.01579,485.019,-211.182)">
<path d="M87.642,581.398L154.757,482.977L142.638,474.713L75.523,573.134L87.642,581.398Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

12
packages/web/public/logo_white.svg

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 100 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(0.802386,0,0,0.460028,-421.748,-122.127)">
<g transform="matrix(0.579082,0,0,1.01004,460.975,-39.6867)">
<path d="M250.908,330.267L193.126,415.005L180.938,406.694L244.802,313.037C246.174,311.024 248.453,309.819 250.889,309.816C253.326,309.814 255.606,311.015 256.982,313.026L320.994,406.536L308.821,414.869L250.908,330.267Z" style="fill:white;"/>
</g>
<g transform="matrix(0.582378,0,0,1.01579,485.019,-211.182)">
<path d="M87.642,581.398L154.757,482.977L142.638,474.713L75.523,573.134L87.642,581.398Z" style="fill:white;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

2
packages/web/public/site.webmanifest

@ -5,7 +5,7 @@
"description": "Meshtastic Web App",
"icons": [
{
"src": "/Logo.svg",
"src": "/logo.svg",
"sizes": "any",
"type": "image/svg+xml"
}

19
packages/web/src/components/Sidebar.tsx

@ -1,4 +1,5 @@
import React, { useEffect, useState, useTransition } from "react";
import type React from "react";
import { useEffect, useState, useTransition } from "react";
import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.tsx";
import { Subtle } from "@components/UI/Typography/Subtle.tsx";
import { useDevice } from "@core/stores/deviceStore.ts";
@ -101,7 +102,7 @@ export const Sidebar = ({ children }: SidebarProps) => {
setDisplayedNodeCount(currentNodeCountValue);
});
}
}, [currentNodeCountValue, displayedNodeCount, startNodeCountTransition]);
}, [currentNodeCountValue, displayedNodeCount]);
const pages: NavLink[] = [
{
@ -146,7 +147,7 @@ export const Sidebar = ({ children }: SidebarProps) => {
)}
>
<img
src="/Logo.svg"
src="/logo.svg"
alt={t("app.logo")}
className="size-10 flex-shrink-0 rounded-xl"
/>
@ -163,10 +164,7 @@ export const Sidebar = ({ children }: SidebarProps) => {
</h2>
</div>
<SidebarSection
label={t("navigation.title")}
className="mt-4 px-0"
>
<SidebarSection label={t("navigation.title")} className="mt-4 px-0">
{pages.map((link) => {
return (
<SidebarButton
@ -186,12 +184,7 @@ export const Sidebar = ({ children }: SidebarProps) => {
})}
</SidebarSection>
<div
className={cn(
"flex-1 min-h-0",
isCollapsed && "overflow-hidden",
)}
>
<div className={cn("flex-1 min-h-0", isCollapsed && "overflow-hidden")}>
{children}
</div>

2
packages/web/src/components/generic/DeviceImage.tsx

@ -47,7 +47,7 @@ const hardwareModelToFilename: { [key: string]: string } = {
};
export const DeviceImage = ({ deviceType, className }: DeviceImageProps) => {
const getPath = (device: string) => `/${device}`;
const getPath = (device: string) => `/devices/${device}`;
const device = hardwareModelToFilename[deviceType] || "unknown.svg";
return <img className={className} src={getPath(device)} alt={device} />;
};

Loading…
Cancel
Save