48 changed files with 1937 additions and 353 deletions
@ -1 +1 @@ |
|||||
SNOWPACK_PUBLIC_DEVICE_IP= |
VITE_PUBLIC_DEVICE_IP= |
||||
File diff suppressed because it is too large
@ -1,38 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html lang="en"> |
|
||||
<head> |
|
||||
<meta charset="utf-8" /> |
|
||||
<link rel="shortcut icon" href="/favicon.ico" /> |
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/touch-icon.png" /> |
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" /> |
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" /> |
|
||||
<link rel="manifest" href="/site.webmanifest" /> |
|
||||
<link rel="mask-icon" href="/safari-tab.svg" color="#67ea94" /> |
|
||||
<link href="https://rsms.me/inter/inter.css" rel="stylesheet" /> |
|
||||
|
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" /> |
|
||||
<link |
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap" |
|
||||
rel="stylesheet" |
|
||||
/> |
|
||||
<link |
|
||||
rel="stylesheet" |
|
||||
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" |
|
||||
/> |
|
||||
<meta name="theme-color" content="#67ea94" /> |
|
||||
<meta |
|
||||
name="viewport" |
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0" |
|
||||
/> |
|
||||
<meta |
|
||||
name="description" |
|
||||
content="Web site created using create-snowpack-app" |
|
||||
/> |
|
||||
<title>Meshtastic Web</title> |
|
||||
</head> |
|
||||
<body> |
|
||||
<div id="root"></div> |
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript> |
|
||||
<script type="module" src="/index.js"></script> |
|
||||
</body> |
|
||||
</html> |
|
||||
@ -0,0 +1,2 @@ |
|||||
|
User-agent: * |
||||
|
Allow: / |
||||
@ -0,0 +1,29 @@ |
|||||
|
.ReloadPrompt-container { |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
width: 0; |
||||
|
height: 0; |
||||
|
} |
||||
|
.ReloadPrompt-toast { |
||||
|
position: fixed; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
margin: 16px; |
||||
|
padding: 12px; |
||||
|
border: 1px solid #8885; |
||||
|
border-radius: 4px; |
||||
|
z-index: 1; |
||||
|
text-align: left; |
||||
|
box-shadow: 3px 4px 5px 0 #8885; |
||||
|
background-color: white; |
||||
|
} |
||||
|
.ReloadPrompt-toast-message { |
||||
|
margin-bottom: 8px; |
||||
|
} |
||||
|
.ReloadPrompt-toast-button { |
||||
|
border: 1px solid #8885; |
||||
|
outline: none; |
||||
|
margin-right: 5px; |
||||
|
border-radius: 2px; |
||||
|
padding: 3px 10px; |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
import './ReloadPrompt.css'; |
||||
|
|
||||
|
// eslint-disable-next-line no-use-before-define
|
||||
|
import type React from 'react'; |
||||
|
|
||||
|
import { useRegisterSW } from 'virtual:pwa-register/react'; |
||||
|
|
||||
|
const ReloadPrompt = (): JSX.Element => { |
||||
|
const { |
||||
|
offlineReady: [offlineReady, setOfflineReady], |
||||
|
needRefresh: [needRefresh, setNeedRefresh], |
||||
|
updateServiceWorker, |
||||
|
} = useRegisterSW({ |
||||
|
onRegistered(r) { |
||||
|
// eslint-disable-next-line prefer-template
|
||||
|
console.log(`SW Registered:`, r); |
||||
|
}, |
||||
|
onRegisterError(error) { |
||||
|
console.log('SW registration error', error); |
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
const close = (): void => { |
||||
|
setOfflineReady(false); |
||||
|
setNeedRefresh(false); |
||||
|
}; |
||||
|
|
||||
|
return ( |
||||
|
<div className="ReloadPrompt-container"> |
||||
|
{(offlineReady || needRefresh) && ( |
||||
|
<div className="ReloadPrompt-toast"> |
||||
|
<div className="ReloadPrompt-message"> |
||||
|
{offlineReady ? ( |
||||
|
<span>App ready to work offline</span> |
||||
|
) : ( |
||||
|
<span> |
||||
|
New content available, click on reload button to update. |
||||
|
</span> |
||||
|
)} |
||||
|
</div> |
||||
|
{needRefresh && ( |
||||
|
<button |
||||
|
className="ReloadPrompt-toast-button" |
||||
|
onClick={(): Promise<void> => updateServiceWorker(true)} |
||||
|
> |
||||
|
Reload |
||||
|
</button> |
||||
|
)} |
||||
|
<button |
||||
|
className="ReloadPrompt-toast-button" |
||||
|
onClick={(): void => close()} |
||||
|
> |
||||
|
Close |
||||
|
</button> |
||||
|
</div> |
||||
|
)} |
||||
|
</div> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default ReloadPrompt; |
||||
@ -0,0 +1,9 @@ |
|||||
|
Add desctiptions to form elements (below on mobile, to the right on desktop) |
||||
|
full width form elements on channel manager, don't use deprecated `modemConfig` |
||||
|
add default value to undefined protobufs, (omit if default to keep them small (only for ota packets)) |
||||
|
add input validation min,max etc |
||||
|
change ch type select to disable, make primary and delete buttons |
||||
|
maybe make channel editor acordion? |
||||
|
|
||||
|
meshtastic.js |
||||
|
- either extrapolate user and position out of nodeInfo, or fire off events for all position and user packets even when contained in a nodeInfo packet, decide how to fire events for nodeInfo, wether we merge it or do something else |
||||
@ -1,34 +1,32 @@ |
|||||
{ |
{ |
||||
"include": ["src", "types"], |
"include": ["src", "types"], |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"module": "esnext", |
"target": "ESNext", |
||||
"target": "esnext", |
"useDefineForClassFields": true, |
||||
"moduleResolution": "node", |
"lib": ["DOM", "DOM.Iterable", "ESNext"], |
||||
"jsx": "preserve", |
"allowJs": false, |
||||
|
"skipLibCheck": true, |
||||
|
"esModuleInterop": false, |
||||
|
"allowSyntheticDefaultImports": true, |
||||
|
"strict": true, |
||||
|
"forceConsistentCasingInFileNames": true, |
||||
|
"module": "ESNext", |
||||
|
"moduleResolution": "Node", |
||||
|
"resolveJsonModule": true, |
||||
|
"isolatedModules": true, |
||||
|
"noEmit": true, |
||||
|
"jsx": "react-jsx", |
||||
"baseUrl": "./", |
"baseUrl": "./", |
||||
/* paths - import rewriting/resolving */ |
|
||||
"paths": { |
"paths": { |
||||
// If you configured any Snowpack aliases, add them here. |
|
||||
// Add this line to get types for streaming imports (packageOptions.source="remote"): |
|
||||
// "*": [".snowpack/types/*"] |
|
||||
// More info: https://www.snowpack.dev/guides/streaming-imports |
|
||||
"@app/*": ["./src/*"], |
"@app/*": ["./src/*"], |
||||
"@pages/*": ["./src/pages/*"], |
"@pages/*": ["./src/pages/*"], |
||||
"@components/*": ["./src/components/*"], |
"@components/*": ["./src/components/*"], |
||||
"@core/*": ["./src/core/*"] |
"@core/*": ["./src/core/*"] |
||||
}, |
}, |
||||
/* noEmit - Snowpack builds (emits) files, not tsc. */ |
|
||||
"noEmit": true, |
|
||||
/* Additional Options */ |
|
||||
"importHelpers": true, |
"importHelpers": true, |
||||
"removeComments": true, |
"removeComments": true, |
||||
"strict": true, |
|
||||
"strictNullChecks": true, |
"strictNullChecks": true, |
||||
"skipLibCheck": true, |
"types": ["vite/client", "vite-plugin-pwa/client"], |
||||
"types": ["snowpack-env"], |
|
||||
"forceConsistentCasingInFileNames": true, |
|
||||
"resolveJsonModule": true, |
|
||||
"allowSyntheticDefaultImports": true, |
|
||||
"importsNotUsedAsValues": "error" |
"importsNotUsedAsValues": "error" |
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue