mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-10-23 09:42:21 +00:00
Deemphasize the radio details
This commit is contained in:
1 parent
541d66020b
commit
eea782acc9
3 files changed
+4
-10
No files matched your search
+1
-1
@@ -72,7 +72,7 @@ Error generating stack: `+b.message+`
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/const bk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wg=Pu("x",bk);var Gg=Vg();const Qg=Fo(Gg);function fk(a){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r.appendChild(o),o.styleSheet?o.styleSheet.cssText=a:o.appendChild(document.createTextNode(a))}const vk=a=>{switch(a){case"success":return xk;case"info":return qk;case"warning":return zk;case"error":return jk;default:return null}},kk=Array(12).fill(0),wk=({visible:a,className:r})=>me.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":a},me.createElement("div",{className:"sonner-spinner"},kk.map((o,t)=>me.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),xk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),zk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),qk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),jk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ak=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},me.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),me.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ck=()=>{const[a,r]=me.useState(document.hidden);return me.useEffect(()=>{const o=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),a};let vu=1;class Ek{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const o=this.subscribers.indexOf(r);this.subscribers.splice(o,1)}),this.publish=r=>{this.subscribers.forEach(o=>o(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var o;const{message:t,...u}=r,l=typeof(r==null?void 0:r.id)=="number"||((o=r.id)==null?void 0:o.length)>0?r.id:vu++,m=this.toasts.find(h=>h.id===l),c=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),m?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...r,id:l,title:t}),{...h,...r,id:l,dismissible:c,title:t}):h):this.addToast({title:t,...u,dismissible:c,id:l}),l},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:r,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(t=>t({id:o.id,dismiss:!0}))}),r),this.message=(r,o)=>this.create({...o,message:r}),this.error=(r,o)=>this.create({...o,message:r,type:"error"}),this.success=(r,o)=>this.create({...o,type:"success",message:r}),this.info=(r,o)=>this.create({...o,type:"info",message:r}),this.warning=(r,o)=>this.create({...o,type:"warning",message:r}),this.loading=(r,o)=>this.create({...o,type:"loading",message:r}),this.promise=(r,o)=>{if(!o)return;let t;o.loading!==void 0&&(t=this.create({...o,promise:r,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const u=Promise.resolve(r instanceof Function?r():r);let l=t!==void 0,m;const c=u.then(async d=>{if(m=["resolve",d],me.isValidElement(d))l=!1,this.create({id:t,type:"default",message:d});else if(Bk(d)&&!d.ok){l=!1;const g=typeof o.error=="function"?await o.error(`HTTP error! status: ${d.status}`):o.error,f=typeof o.description=="function"?await o.description(`HTTP error! status: ${d.status}`):o.description,w=typeof g=="object"&&!me.isValidElement(g)?g:{message:g};this.create({id:t,type:"error",description:f,...w})}else if(d instanceof Error){l=!1;const g=typeof o.error=="function"?await o.error(d):o.error,Line truncated
|
||||
*/const bk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wg=Pu("x",bk);var Gg=Vg();const Qg=Fo(Gg);function fk(a){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r.appendChild(o),o.styleSheet?o.styleSheet.cssText=a:o.appendChild(document.createTextNode(a))}const vk=a=>{switch(a){case"success":return xk;case"info":return qk;case"warning":return zk;case"error":return jk;default:return null}},kk=Array(12).fill(0),wk=({visible:a,className:r})=>me.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":a},me.createElement("div",{className:"sonner-spinner"},kk.map((o,t)=>me.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),xk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),zk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),qk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),jk=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ak=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},me.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),me.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ck=()=>{const[a,r]=me.useState(document.hidden);return me.useEffect(()=>{const o=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),a};let vu=1;class Ek{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const o=this.subscribers.indexOf(r);this.subscribers.splice(o,1)}),this.publish=r=>{this.subscribers.forEach(o=>o(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var o;const{message:t,...u}=r,l=typeof(r==null?void 0:r.id)=="number"||((o=r.id)==null?void 0:o.length)>0?r.id:vu++,m=this.toasts.find(h=>h.id===l),c=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),m?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...r,id:l,title:t}),{...h,...r,id:l,dismissible:c,title:t}):h):this.addToast({title:t,...u,dismissible:c,id:l}),l},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:r,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(t=>t({id:o.id,dismiss:!0}))}),r),this.message=(r,o)=>this.create({...o,message:r}),this.error=(r,o)=>this.create({...o,message:r,type:"error"}),this.success=(r,o)=>this.create({...o,type:"success",message:r}),this.info=(r,o)=>this.create({...o,type:"info",message:r}),this.warning=(r,o)=>this.create({...o,type:"warning",message:r}),this.loading=(r,o)=>this.create({...o,type:"loading",message:r}),this.promise=(r,o)=>{if(!o)return;let t;o.loading!==void 0&&(t=this.create({...o,promise:r,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const u=Promise.resolve(r instanceof Function?r():r);let l=t!==void 0,m;const c=u.then(async d=>{if(m=["resolve",d],me.isValidElement(d))l=!1,this.create({id:t,type:"default",message:d});else if(Bk(d)&&!d.ok){l=!1;const g=typeof o.error=="function"?await o.error(`HTTP error! status: ${d.status}`):o.error,f=typeof o.description=="function"?await o.description(`HTTP error! status: ${d.status}`):o.description,w=typeof g=="object"&&!me.isValidElement(g)?g:{message:g};this.create({id:t,type:"error",description:f,...w})}else if(d instanceof Error){l=!1;const g=typeof o.error=="function"?await o.error(d):o.error,Line truncated
|
||||
`).map((oe,ee,z)=>_.jsxs("span",{children:[oe,ee<z.length-1&&_.jsx("br",{})]},ee)),!$&&_.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-2",children:sh(C.sender_timestamp||C.received_at)}),C.outgoing&&(C.acked?" ✓":" ?")]})]})]},C.id)})]}),y&&_.jsx("button",{onClick:w,className:"absolute bottom-4 right-4 w-10 h-10 rounded-full bg-muted hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-opacity",title:"Scroll to bottom",children:_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:_.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})}const ax=B.forwardRef(function({onSend:r,disabled:o,placeholder:t},u){const[l,m]=B.useState(""),[c,h]=B.useState(!1),d=B.useRef(null);B.useImperativeHandle(u,()=>({appendText:f=>{var x;m(w=>w+f),(x=d.current)==null||x.focus()}}));const y=B.useCallback(async f=>{f.preventDefault();const x=l.trim();if(!(!x||c||o)){h(!0);try{await r(x),m("")}catch(w){console.error("Failed to send message:",w)}finally{h(!1)}}},[l,c,o,r]),g=B.useCallback(f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),y(f))},[y]);return _.jsxs("form",{className:"px-4 py-3 border-t border-border flex gap-2",onSubmit:y,children:[_.jsx(wi,{ref:d,type:"text",value:l,onChange:f=>m(f.target.value),onKeyDown:g,placeholder:t||"Type a message...",disabled:o||c,className:"flex-1"}),_.jsx(Ha,{type:"submit",disabled:o||c||!l.trim(),children:c?"Sending...":"Send"})]})});function Si(a,r,{checkForDefaultPrevented:o=!0}={}){return function(u){if(a==null||a(u),o===!1||!u.defaultPrevented)return r==null?void 0:r(u)}}function nx(a,r){const o=B.createContext(r),t=l=>{const{children:m,...c}=l,h=B.useMemo(()=>c,Object.values(c));return _.jsx(o.Provider,{value:h,children:m})};t.displayName=a+"Provider";function u(l){const m=B.useContext(o);if(m)return m;if(r!==void 0)return r;throw new Error(`\`${l}\` must be used within \`${a}\``)}return[t,u]}function Hr(a,r=[]){let o=[];function t(l,m){const c=B.createContext(m),h=o.length;o=[...o,m];const d=g=>{var A;const{scope:f,children:x,...w}=g,j=((A=f==null?void 0:f[a])==null?void 0:A[h])||c,v=B.useMemo(()=>w,Object.values(w));return _.jsx(j.Provider,{value:v,children:x})};d.displayName=l+"Provider";function y(g,f){var j;const x=((j=f==null?void 0:f[a])==null?void 0:j[h])||c,w=B.useContext(x);if(w)return w;if(m!==void 0)return m;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[d,y]}const u=()=>{const l=o.map(m=>B.createContext(m));return function(c){const h=(c==null?void 0:c[a])||l;return B.useMemo(()=>({[`__scope${a}`]:{...c,[a]:h}}),[c,h])}};return u.scopeName=a,[t,ox(u,...r)]}function ox(...a){const r=a[0];if(a.length===1)return r;const o=()=>{const t=a.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(l){const m=t.reduce((c,{useScope:h,scopeName:d})=>{const g=h(l)[`__scope${d}`];return{...c,...g}},{});return B.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return o.scopeName=r.scopeName,o}var _o=globalThis!=null&&globalThis.document?B.useLayoutEffect:()=>{},rx=Tu[" useId ".trim().toString()]||(()=>{}),sx=0;function Pr(a){const[r,o]=B.useState(rx());return _o(()=>{o(t=>t??String(sx++))},[a]),r?`radix-${r}`:""}var tx=Tu[" useInsertionEffect ".trim().toString()]||_o;function al({prop:a,defaultProp:r,onChange:o=()=>{},caller:t}){const[u,l,m]=lx({defaultProp:r,onChange:o}),c=a!==void 0,h=c?a:u;{const y=B.useRef(a!==void 0);B.useEffect(()=>{const g=y.current;g!==c&&console.warn(`${t} is changing from ${g?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=c},[c,t])}const d=B.useCallback(y=>{var g;if(c){const f=cx(y)?y(a):y;f!==a&&((g=m.current)==null||g.call(m,f))}else l(y)},[c,a,l,m]);return[h,d]}function lx({defaultProp:a,onChange:r}){const[o,t]=B.useState(a),u=B.useRef(o),l=B.useRef(r);return tx(()=>{l.current=r},[r]),B.useEffect(()=>{var m;u.current!==o&&((m=l.current)==null||m.call(l,o),u.current=o)},[o,u]),[o,t,l]}function cx(a){return typeof a=="function"}function ux(a){const r=dx(a),o=B.forwardRef((t,u)=>{const{children:l,...m}=t,c=B.Children.toArray(l),h=c.find(mx);if(h){const d=h.props.children,y=c.map(g=>g===h?B.Children.count(d)>1?B.Children.only(null):B.isValidElement(d)?d.props.children:null:g);return _.jsx(r,{...m,ref:u,children:B.isValidElement(d)?B.cloneElement(d,void 0,y):null})}return _.jsx(r,{...m,ref:u,children:l})});return o.displayName=`${a}.Slot`,o}function dx(a){const r=B.forwardRef((o,t)=>{const{children:u,...l}=o;if(B.isValidElement(u)){const m=gx(u),c=hx(l,u.props);return u.type!==B.Fragment&&(c.ref=t?Or(t,m):m),B.cloneElement(u,c)}return B.Children.count(u)>1?B.Children.only(null):null});return r.displayName=`${a}.S
Line truncated
|
||||
.`.concat(Mx,` {
|
||||
overflow: hidden `).concat(t,`;
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>RemoteTerm for MeshCore</title>
|
||||
<script type="module" crossorigin src="/assets/index-B4aoszDr.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-FM2HgcXA.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-C3_XTTUI.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -61,16 +61,10 @@ export function StatusBar({ health, config, onConfigClick, onAdvertise, onMenuCl
|
||||
{config && (
|
||||
<>
|
||||
<div className="hidden lg:flex items-center gap-1 text-[#888]">
|
||||
Name: <span className="text-[#e0e0e0]">{config.name || 'Unnamed'}</span>
|
||||
<span className="text-[#e0e0e0]">{config.name || 'Unnamed'}</span>
|
||||
</div>
|
||||
<div className="hidden xl:flex items-center gap-1 text-[#888]">
|
||||
Freq: <span className="text-[#e0e0e0]">{config.radio.freq} MHz</span>
|
||||
</div>
|
||||
<div className="hidden xl:flex items-center gap-1 text-[#888]">
|
||||
SF{config.radio.sf}/CR{config.radio.cr}
|
||||
</div>
|
||||
<div className="hidden xl:flex items-center gap-1 text-[#888]">
|
||||
TX: <span className="text-[#e0e0e0]">{config.tx_power} dBm</span>
|
||||
{config.radio.freq} MHz/SF{config.radio.sf}/CR{config.radio.cr}/{config.tx_power}dBm
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user