Fix prod url & more settings
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
"description": "Meshtastic web client",
|
"description": "Meshtastic web client",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_ENV=development vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"package": "gzipper c -i html,js,css,png,ico,svg,webmanifest,txt dist dist/output && tar -cvf dist/build.tar -C ./dist/output/ $(ls ./dist/output/)",
|
"package": "gzipper c -i html,js,css,png,ico,svg,webmanifest,txt dist dist/output && tar -cvf dist/build.tar -C ./dist/output/ $(ls ./dist/output/)",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@headlessui/react": "^1.4.2",
|
"@headlessui/react": "^1.4.2",
|
||||||
"@meshtastic/meshtasticjs": "^0.6.26",
|
"@meshtastic/meshtasticjs": "^0.6.27",
|
||||||
"@reduxjs/toolkit": "^1.6.2",
|
"@reduxjs/toolkit": "^1.6.2",
|
||||||
"boring-avatars": "^1.5.8",
|
"boring-avatars": "^1.5.8",
|
||||||
"i18next": "^21.4.2",
|
"i18next": "^21.4.2",
|
||||||
|
|||||||
Generated
+4
-4
@@ -2,7 +2,7 @@ lockfileVersion: 5.3
|
|||||||
|
|
||||||
specifiers:
|
specifiers:
|
||||||
'@headlessui/react': ^1.4.2
|
'@headlessui/react': ^1.4.2
|
||||||
'@meshtastic/meshtasticjs': ^0.6.26
|
'@meshtastic/meshtasticjs': ^0.6.27
|
||||||
'@reduxjs/toolkit': ^1.6.2
|
'@reduxjs/toolkit': ^1.6.2
|
||||||
'@types/react': ^17.0.34
|
'@types/react': ^17.0.34
|
||||||
'@types/react-dom': ^17.0.11
|
'@types/react-dom': ^17.0.11
|
||||||
@@ -52,7 +52,7 @@ specifiers:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@headlessui/react': 1.4.2_react-dom@17.0.2+react@17.0.2
|
'@headlessui/react': 1.4.2_react-dom@17.0.2+react@17.0.2
|
||||||
'@meshtastic/meshtasticjs': 0.6.26
|
'@meshtastic/meshtasticjs': 0.6.27
|
||||||
'@reduxjs/toolkit': 1.6.2_react-redux@7.2.6+react@17.0.2
|
'@reduxjs/toolkit': 1.6.2_react-redux@7.2.6+react@17.0.2
|
||||||
boring-avatars: 1.5.8
|
boring-avatars: 1.5.8
|
||||||
i18next: 21.4.2
|
i18next: 21.4.2
|
||||||
@@ -1359,8 +1359,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
|
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@meshtastic/meshtasticjs/0.6.26:
|
/@meshtastic/meshtasticjs/0.6.27:
|
||||||
resolution: {integrity: sha512-1itDg63rfyMzEbDQrFycmG19mLus3mCffpm3T0PC+egj7e4q9aWBO3o3WC8/eoakeaS/cmBUW+FIO+h/Cktkzw==}
|
resolution: {integrity: sha512-WiM9v/3+YWtt6/wLJOyyhAQdtsIGcEs3geofRZA6y/TCQkbjo/mdvY8Y+ZMZERSFXIZXiovvZgJG0vSYq7JC9A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@protobuf-ts/runtime': 2.0.7
|
'@protobuf-ts/runtime': 2.0.7
|
||||||
sub-events: 1.8.9
|
sub-events: 1.8.9
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ const App = (): JSX.Element => {
|
|||||||
|
|
||||||
const connectionURL = hostOverrideEnabled
|
const connectionURL = hostOverrideEnabled
|
||||||
? hostOverride
|
? hostOverride
|
||||||
: import.meta.env.NODE_ENV === 'production'
|
: import.meta.env.PROD
|
||||||
? window.location.hostname
|
? window.location.hostname
|
||||||
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
||||||
'http://meshtastic.local';
|
'http://meshtastic.local';
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import { FiXCircle } from 'react-icons/fi';
|
|||||||
import { useBreakpoint } from '@app/hooks/breakpoint';
|
import { useBreakpoint } from '@app/hooks/breakpoint';
|
||||||
import { Drawer } from '@components/generic/Drawer';
|
import { Drawer } from '@components/generic/Drawer';
|
||||||
import { IconButton } from '@components/generic/IconButton';
|
import { IconButton } from '@components/generic/IconButton';
|
||||||
import { SidebarItem, SidebarItemProps } from '@components/generic/SidebarItem';
|
import type { SidebarItemProps } from '@components/generic/SidebarItem';
|
||||||
|
import { SidebarItem } from '@components/generic/SidebarItem';
|
||||||
import { Tab } from '@headlessui/react';
|
import { Tab } from '@headlessui/react';
|
||||||
|
|
||||||
export interface PageLayoutProps {
|
export interface PageLayoutProps {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const Files = ({ navOpen, setNavOpen }: RangeTestProps): JSX.Element => {
|
|||||||
|
|
||||||
const connectionURL = hostOverrideEnabled
|
const connectionURL = hostOverrideEnabled
|
||||||
? hostOverride
|
? hostOverride
|
||||||
: import.meta.env.NODE_ENV === 'production'
|
: import.meta.env.PROD
|
||||||
? window.location.hostname
|
? window.location.hostname
|
||||||
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
||||||
'http://meshtastic.local';
|
'http://meshtastic.local';
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export const Connection = ({
|
|||||||
|
|
||||||
const connectionURL: string = hostOverrideEnabled
|
const connectionURL: string = hostOverrideEnabled
|
||||||
? hostOverride
|
? hostOverride
|
||||||
: import.meta.env.NODE_ENV === 'production'
|
: import.meta.env.PROD
|
||||||
? window.location.hostname
|
? window.location.hostname
|
||||||
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
: (import.meta.env.VITE_PUBLIC_DEVICE_IP as string) ??
|
||||||
'http://meshtastic.local';
|
'http://meshtastic.local';
|
||||||
|
|||||||
@@ -88,6 +88,16 @@ export const Radio = ({ navOpen, setNavOpen }: RadioProps): JSX.Element => {
|
|||||||
<Cover enabled={debug} content={<JSONPretty data={radioConfig} />} />
|
<Cover enabled={debug} content={<JSONPretty data={radioConfig} />} />
|
||||||
<div className="w-full max-w-3xl p-10 md:max-w-xl">
|
<div className="w-full max-w-3xl p-10 md:max-w-xl">
|
||||||
<form className="space-y-2" onSubmit={onSubmit}>
|
<form className="space-y-2" onSubmit={onSubmit}>
|
||||||
|
<div>Power</div>
|
||||||
|
<hr />
|
||||||
|
<Input
|
||||||
|
label={'Charge current'}
|
||||||
|
disabled
|
||||||
|
{...register('chargeCurrent', { valueAsNumber: true })}
|
||||||
|
/>
|
||||||
|
<Checkbox label="Always powered" {...register('isAlwaysPowered')} />
|
||||||
|
<Checkbox label="Low Power" {...register('isLowPower')} />
|
||||||
|
<hr />
|
||||||
<div>WiFi</div>
|
<div>WiFi</div>
|
||||||
<Input label={t('strings.wifi_ssid')} {...register('wifiSsid')} />
|
<Input label={t('strings.wifi_ssid')} {...register('wifiSsid')} />
|
||||||
<Input
|
<Input
|
||||||
@@ -95,14 +105,11 @@ export const Radio = ({ navOpen, setNavOpen }: RadioProps): JSX.Element => {
|
|||||||
label={t('strings.wifi_psk')}
|
label={t('strings.wifi_psk')}
|
||||||
{...register('wifiPassword')}
|
{...register('wifiPassword')}
|
||||||
/>
|
/>
|
||||||
<Input
|
<hr />
|
||||||
label={'Charge current'}
|
|
||||||
disabled
|
|
||||||
{...register('chargeCurrent', { valueAsNumber: true })}
|
|
||||||
/>
|
|
||||||
<div>Position</div>
|
<div>Position</div>
|
||||||
<Input
|
<Input
|
||||||
label={'Broadcast Interval (seconds)'}
|
label={'Broadcast Interval (seconds)'}
|
||||||
|
type="number"
|
||||||
{...register('positionBroadcastSecs', { valueAsNumber: true })}
|
{...register('positionBroadcastSecs', { valueAsNumber: true })}
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
@@ -124,13 +131,31 @@ export const Radio = ({ navOpen, setNavOpen }: RadioProps): JSX.Element => {
|
|||||||
optionsEnum={Protobuf.GpsOperation}
|
optionsEnum={Protobuf.GpsOperation}
|
||||||
{...register('gpsOperation', { valueAsNumber: true })}
|
{...register('gpsOperation', { valueAsNumber: true })}
|
||||||
/>
|
/>
|
||||||
|
<Select
|
||||||
<div>Other</div>
|
label="Display Format"
|
||||||
|
optionsEnum={Protobuf.GpsCoordinateFormat}
|
||||||
|
{...register('gpsFormat', { valueAsNumber: true })}
|
||||||
|
/>
|
||||||
|
<Checkbox label="Accept 2D Fix" {...register('gpsAccept2D')} />
|
||||||
<Input
|
<Input
|
||||||
label={'Last GPS Attempt'}
|
label="Max DOP"
|
||||||
|
type="number"
|
||||||
|
{...register('gpsMaxDop', { valueAsNumber: true })}
|
||||||
|
/>
|
||||||
|
<Input
|
||||||
|
label="Last GPS Attempt"
|
||||||
disabled
|
disabled
|
||||||
{...register('gpsAttemptTime', { valueAsNumber: true })}
|
{...register('gpsAttemptTime', { valueAsNumber: true })}
|
||||||
/>
|
/>
|
||||||
|
<hr />
|
||||||
|
<div>Other</div>
|
||||||
|
<Select
|
||||||
|
label="Region"
|
||||||
|
optionsEnum={Protobuf.RegionCode}
|
||||||
|
{...register('region', { valueAsNumber: true })}
|
||||||
|
/>
|
||||||
|
<Checkbox label="Debug Log" {...register('debugLogEnabled')} />
|
||||||
|
<Checkbox label="Serial Disabled" {...register('serialDisabled')} />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
Reference in New Issue
Block a user