poe-svelte-ui-lib 2.35.0 → 2.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/FieldLabel.svelte +6 -6
- package/dist/GUIRenderer/GUIRenderer.svelte +7 -1
- package/dist/Graph/Graph.svelte +3 -1
- package/dist/InfoHint.svelte +2 -1
- package/dist/Input/Input.svelte +7 -5
- package/dist/Joystick/Joystick.svelte +20 -19
- package/dist/Loader/Loader.svelte +4 -4
- package/dist/Select/Select.svelte +6 -4
- package/dist/Slider/Slider.svelte +3 -1
- package/dist/Switch/Switch.svelte +6 -2
- package/dist/Table/Table.svelte +3 -1
- package/dist/Widget/Widget.svelte +6 -2
- package/dist/WidgetDeviceInfo/CpuIcon.svelte +6 -6
- package/dist/WidgetDeviceInfo/RestartIcon.svelte +3 -3
- package/dist/WidgetFileSystem/RefreshIcon.svelte +4 -4
- package/dist/WidgetFileSystem/StorageIcon.svelte +4 -4
- package/dist/WidgetFileSystem/WidgetFileSystem.svelte +3 -3
- package/dist/WidgetFirmware/FirmwareIcon.svelte +4 -4
- package/dist/WidgetFirmware/README.md +2 -2
- package/dist/WidgetFirmware/WidgetFirmware.svelte +3 -3
- package/dist/WidgetHeader.svelte +3 -1
- package/dist/WidgetLoRa/RadioIcon.svelte +4 -4
- package/dist/WidgetMap/FitIcon.svelte +4 -4
- package/dist/WidgetMap/MapIcon.svelte +3 -10
- package/dist/WidgetMap/WidgetMap.svelte +6 -6
- package/dist/WidgetMap/mapWrapper/utils.js +1 -1
- package/dist/WidgetMap/mission/MapAgro.svelte +57 -47
- package/dist/WidgetMap/mission/MapRoute.svelte +16 -12
- package/dist/WidgetMap/mission/MissionIcon.svelte +3 -3
- package/dist/WidgetMap/mission/MissionSim.svelte +9 -9
- package/dist/WidgetPFD/PlaneIcon.svelte +4 -4
- package/dist/WidgetPFD/WidgetPFD.svelte +25 -23
- package/dist/WidgetRGBStrip/LightIcon.svelte +4 -4
- package/dist/WidgetStackInfo/MemoryIcon.svelte +4 -4
- package/dist/WidgetStackInfo/RefreshIcon.svelte +4 -4
- package/dist/WidgetStackInfo/WidgetStackInfo.svelte +6 -6
- package/dist/WidgetWiFi/SearchIcon.svelte +4 -4
- package/dist/WidgetWiFi/WarningIcon.svelte +4 -4
- package/dist/WidgetWiFi/WifiIcon.svelte +4 -4
- package/dist/busBridge.d.ts +9 -5
- package/dist/busBridge.js +35 -6
- package/dist/libIcons/ArrowIcon.svelte +4 -4
- package/dist/libIcons/ButtonAdd.svelte +4 -4
- package/dist/libIcons/ButtonClear.svelte +6 -6
- package/dist/libIcons/ButtonDelete.svelte +4 -4
- package/dist/libIcons/ButtonDownload.svelte +4 -4
- package/dist/libIcons/ColumnsIcon.svelte +5 -5
- package/dist/libIcons/CommandListIcon.svelte +4 -4
- package/dist/libIcons/CrossIcon.svelte +6 -6
- package/dist/libIcons/Error.svelte +4 -4
- package/dist/libIcons/EyeIcon.svelte +5 -5
- package/dist/libIcons/EyeSlashIcon.svelte +6 -6
- package/dist/libIcons/GraphIcon.svelte +4 -4
- package/dist/libIcons/InfoIcon.svelte +5 -5
- package/dist/libIcons/Library.svelte +4 -4
- package/dist/libIcons/MoreIcon.svelte +3 -3
- package/dist/libIcons/MoveVerticalIcon.svelte +6 -6
- package/dist/libIcons/PlugIcon.svelte +3 -1
- package/dist/libIcons/RestartIcon.svelte +4 -4
- package/dist/libIcons/SendIcon.svelte +4 -4
- package/dist/libIcons/ThemeIcon.svelte +6 -6
- package/dist/libIcons/UnplugIcon.svelte +4 -3
- package/dist/locales/translations.js +3 -3
- package/package.json +8 -7
|
@@ -428,17 +428,19 @@
|
|
|
428
428
|
<span class="flex items-center gap-3 text-[12px] font-semibold text-(--muted-color) tabular-nums">
|
|
429
429
|
{#if headerProgress !== null}
|
|
430
430
|
<span class="flex items-center gap-1.5" title={simulate ? $T("widget.sim.title") : $T("widget.mission.progressHint")}>
|
|
431
|
-
<span class="h-1.5 w-14 overflow-hidden rounded-full bg-(--hairline-color) {narrow ? 'hidden' : ''}"
|
|
432
|
-
|
|
433
|
-
>
|
|
431
|
+
<span class="h-1.5 w-14 overflow-hidden rounded-full bg-(--hairline-color) {narrow ? 'hidden' : ''}">
|
|
432
|
+
<span class="block h-full rounded-full bg-(--accent-color)" style="width: {Math.round(headerProgress * 100)}%"></span>
|
|
433
|
+
</span>
|
|
434
434
|
{Math.round(headerProgress * 100)}%{#if live && !narrow}
|
|
435
435
|
· {$T("widget.mission.treated")} {fmt(treatedHa, 2)} {$T("widget.mission.ha")}{/if}
|
|
436
436
|
</span>
|
|
437
437
|
{/if}
|
|
438
438
|
{#if stats && (!narrow || headerProgress === null)}
|
|
439
|
-
<span class="text-[12px] font-semibold text-(--muted-color) tabular-nums"
|
|
440
|
-
|
|
441
|
-
|
|
439
|
+
<span class="text-[12px] font-semibold text-(--muted-color) tabular-nums">
|
|
440
|
+
{fmt(stats.ha, 2)}
|
|
441
|
+
{$T("widget.mission.ha")} · {fmt(stats.total, 2)}
|
|
442
|
+
{$T("widget.mission.km")}
|
|
443
|
+
</span>
|
|
442
444
|
{/if}
|
|
443
445
|
</span>
|
|
444
446
|
</div>
|
|
@@ -510,10 +512,9 @@
|
|
|
510
512
|
<div class="flex min-w-48 flex-col gap-1.5">
|
|
511
513
|
<span class="text-[13px] font-semibold">{$T("widget.mission.searching")}</span>
|
|
512
514
|
<div class="flex items-center gap-2 text-[12px] tabular-nums">
|
|
513
|
-
<span class="h-1.5 flex-1 overflow-hidden rounded-full bg-(--container-color)"
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
>
|
|
515
|
+
<span class="h-1.5 flex-1 overflow-hidden rounded-full bg-(--container-color)">
|
|
516
|
+
<span class="block h-full rounded-full bg-(--accent-color) transition-[width]" style="width: {Math.round(searching * 100)}%"></span>
|
|
517
|
+
</span>
|
|
517
518
|
<span class="w-9 text-right">{Math.round(searching * 100)}%</span>
|
|
518
519
|
</div>
|
|
519
520
|
</div>
|
|
@@ -590,9 +591,9 @@
|
|
|
590
591
|
<Input type="number" label={{ name: $T("widget.mission.tank") }} {...numField("tank", 1, 1000, 1)} />
|
|
591
592
|
</div>
|
|
592
593
|
<div class="flex flex-col gap-1.5 text-[13px]">
|
|
593
|
-
<span class="w-max text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.sprayControl"), enabled: $hints }}
|
|
594
|
-
|
|
595
|
-
>
|
|
594
|
+
<span class="w-max text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.sprayControl"), enabled: $hints }}>
|
|
595
|
+
{$T("widget.mission.sprayControl")}
|
|
596
|
+
</span>
|
|
596
597
|
{#each sprayModes as m}
|
|
597
598
|
<label class="flex cursor-pointer items-start gap-2">
|
|
598
599
|
<input type="radio" class="mt-0.5" name="sprayControl" checked={plan.sprayControl === m} onchange={() => update({ sprayControl: m })} />
|
|
@@ -649,8 +650,10 @@
|
|
|
649
650
|
class="flex cursor-pointer items-center gap-2 border-none bg-transparent p-0 text-left text-(--font-color)"
|
|
650
651
|
title={$T("widget.mission.showOnMap")}
|
|
651
652
|
onclick={() => fitMapTo(mapInstance, field)}
|
|
652
|
-
><span class="size-2.5 rounded-sm bg-(--green-mark)"></span>{$T("widget.mission.field")} {i + 1}</button
|
|
653
653
|
>
|
|
654
|
+
<span class="size-2.5 rounded-sm bg-(--green-mark)"></span>{$T("widget.mission.field")}
|
|
655
|
+
{i + 1}
|
|
656
|
+
</button>
|
|
654
657
|
<span class="flex items-center gap-3">
|
|
655
658
|
<span class="flex items-center gap-1" use:hint={{ text: $T("widget.mission.hint.fieldAngle"), enabled: $hints }}>
|
|
656
659
|
<Input
|
|
@@ -662,9 +665,9 @@
|
|
|
662
665
|
/>°
|
|
663
666
|
</span>
|
|
664
667
|
<span class="w-16 text-right font-semibold">{areaText(fieldArea(field, []))}</span>
|
|
665
|
-
<button class="cursor-pointer border-none bg-transparent p-0 text-(--red-text)" onclick={() => removeField(i)} aria-label="Delete"
|
|
666
|
-
|
|
667
|
-
>
|
|
668
|
+
<button class="cursor-pointer border-none bg-transparent p-0 text-(--red-text)" onclick={() => removeField(i)} aria-label="Delete">
|
|
669
|
+
✕
|
|
670
|
+
</button>
|
|
668
671
|
</span>
|
|
669
672
|
</div>
|
|
670
673
|
{:else}
|
|
@@ -681,13 +684,15 @@
|
|
|
681
684
|
class="flex cursor-pointer items-center gap-2 border-none bg-transparent p-0 text-left text-(--font-color)"
|
|
682
685
|
title={$T("widget.mission.showOnMap")}
|
|
683
686
|
onclick={() => fitMapTo(mapInstance, hole)}
|
|
684
|
-
><span class="size-2.5 rounded-sm bg-(--red-mark)"></span>{$T("widget.mission.hole")} {i + 1}</button
|
|
685
687
|
>
|
|
688
|
+
<span class="size-2.5 rounded-sm bg-(--red-mark)"></span>{$T("widget.mission.hole")}
|
|
689
|
+
{i + 1}
|
|
690
|
+
</button>
|
|
686
691
|
<span class="flex items-center gap-2">
|
|
687
692
|
<span class="font-semibold">{areaText(fieldArea(hole, []))}</span>
|
|
688
|
-
<button class="cursor-pointer border-none bg-transparent p-0 text-(--red-text)" onclick={() => removeHole(i)} aria-label="Delete"
|
|
689
|
-
|
|
690
|
-
>
|
|
693
|
+
<button class="cursor-pointer border-none bg-transparent p-0 text-(--red-text)" onclick={() => removeHole(i)} aria-label="Delete">
|
|
694
|
+
✕
|
|
695
|
+
</button>
|
|
691
696
|
</span>
|
|
692
697
|
</div>
|
|
693
698
|
{/each}
|
|
@@ -700,12 +705,13 @@
|
|
|
700
705
|
{#if stats}
|
|
701
706
|
<!-- Что из контуров получается к обработке -->
|
|
702
707
|
<div class="grid grid-cols-2 gap-x-4 gap-y-1.5 rounded-lg bg-(--container-color) p-3 text-[13px] tabular-nums">
|
|
703
|
-
<span class="text-(--muted-color)">{$T("widget.mission.area")}</span><span class="text-right font-semibold"
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
708
|
+
<span class="text-(--muted-color)">{$T("widget.mission.area")}</span><span class="text-right font-semibold">
|
|
709
|
+
{fmt(stats.ha, 2)}
|
|
710
|
+
{$T("widget.mission.ha")}
|
|
711
|
+
</span>
|
|
712
|
+
<span class="text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.coverage"), enabled: $hints }}>
|
|
713
|
+
{$T("widget.mission.coverage")}
|
|
714
|
+
</span><span class="text-right font-semibold">{fmt(stats.coverage, 0)} %</span>
|
|
709
715
|
</div>
|
|
710
716
|
{/if}
|
|
711
717
|
{#if fields.length || plan.holes.length}
|
|
@@ -719,32 +725,36 @@
|
|
|
719
725
|
<span class="text-[11px] font-semibold tracking-wide text-(--faint-color) uppercase">{$T("widget.mission.calc")}</span>
|
|
720
726
|
{#if stats}
|
|
721
727
|
<div class="grid grid-cols-2 gap-x-4 gap-y-1.5 rounded-lg bg-(--container-color) p-3 text-[13px] tabular-nums">
|
|
722
|
-
<span class="text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.passes"), enabled: $hints }}
|
|
723
|
-
|
|
724
|
-
><span class="text-right font-semibold">{stats.passes} / {stats.cells}</span>
|
|
728
|
+
<span class="text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.passes"), enabled: $hints }}>
|
|
729
|
+
{$T("widget.mission.passesCount")}
|
|
730
|
+
</span><span class="text-right font-semibold">{stats.passes} / {stats.cells}</span>
|
|
725
731
|
<span class="text-(--muted-color)">{$T("widget.mission.turns")}</span><span class="text-right font-semibold">{stats.turns}</span>
|
|
726
|
-
<span class="text-(--muted-color)">{$T("widget.mission.sprayLen")}</span><span class="text-right font-semibold"
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
<span class="text-(--muted-color)"
|
|
735
|
-
|
|
736
|
-
>
|
|
737
|
-
<span class="text-(--muted-color)"
|
|
738
|
-
|
|
739
|
-
|
|
732
|
+
<span class="text-(--muted-color)">{$T("widget.mission.sprayLen")}</span><span class="text-right font-semibold">
|
|
733
|
+
{fmt(stats.spray, 2)}
|
|
734
|
+
{$T("widget.mission.km")}
|
|
735
|
+
</span>
|
|
736
|
+
<span class="text-(--muted-color)">{$T("widget.mission.totalLen")}</span><span class="text-right font-semibold">
|
|
737
|
+
{fmt(stats.total, 2)}
|
|
738
|
+
{$T("widget.mission.km")}
|
|
739
|
+
</span>
|
|
740
|
+
<span class="text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.time"), enabled: $hints }}>
|
|
741
|
+
{$T("widget.mission.time")}
|
|
742
|
+
</span><span class="text-right font-semibold">{fmt(stats.timeMin, 0)} {$T("widget.mission.min")}</span>
|
|
743
|
+
<span class="text-(--muted-color)">{$T("widget.mission.liquid")}</span><span class="text-right font-semibold">
|
|
744
|
+
{fmt(stats.liquid, 0)}
|
|
745
|
+
{$T("widget.mission.l")}
|
|
746
|
+
</span>
|
|
747
|
+
<span class="text-(--muted-color)" use:hint={{ text: $T("widget.mission.hint.refills"), enabled: $hints }}>
|
|
748
|
+
{$T("widget.mission.refills")}
|
|
749
|
+
</span><span class="text-right font-semibold">{stats.refills}</span>
|
|
740
750
|
<span class="text-(--muted-color)">{$T("widget.mission.waypoints")}</span><span class="text-right font-semibold">{stats.waypoints}</span>
|
|
741
751
|
</div>
|
|
742
752
|
<div class="flex flex-wrap gap-3 text-[11px] text-(--muted-color)">
|
|
743
753
|
<span class="flex items-center gap-1"><span class="h-0.5 w-4 bg-(--green-mark)"></span>{$T("widget.mission.legendSpray")}</span>
|
|
744
754
|
<span class="flex items-center gap-1"><span class="h-0.5 w-4 bg-(--orange-mark)"></span>{$T("widget.mission.legendTurn")}</span>
|
|
745
|
-
<span class="flex items-center gap-1"
|
|
746
|
-
|
|
747
|
-
>
|
|
755
|
+
<span class="flex items-center gap-1">
|
|
756
|
+
<span class="h-0.5 w-4 border-t-2 border-dashed border-(--accent-text)"></span>{$T("widget.mission.legendTransit")}
|
|
757
|
+
</span>
|
|
748
758
|
</div>
|
|
749
759
|
{:else}
|
|
750
760
|
<p class="m-0 text-[13px] text-(--muted-color)">{$T("widget.mission.empty")}</p>
|
|
@@ -218,9 +218,9 @@
|
|
|
218
218
|
<span class="flex items-center gap-3 text-[12px] font-semibold text-(--muted-color) tabular-nums">
|
|
219
219
|
{#if headerProgress !== null}
|
|
220
220
|
<span class="flex items-center gap-1.5" title={simulate ? $T("widget.sim.title") : $T("widget.mission.progressHint")}>
|
|
221
|
-
<span class="h-1.5 w-14 overflow-hidden rounded-full bg-(--hairline-color) {narrow ? 'hidden' : ''}"
|
|
222
|
-
|
|
223
|
-
>
|
|
221
|
+
<span class="h-1.5 w-14 overflow-hidden rounded-full bg-(--hairline-color) {narrow ? 'hidden' : ''}">
|
|
222
|
+
<span class="block h-full rounded-full bg-(--accent-color)" style="width: {Math.round(headerProgress * 100)}%"></span>
|
|
223
|
+
</span>
|
|
224
224
|
{Math.round(headerProgress * 100)}%{#if live && !narrow}
|
|
225
225
|
· {live.finished
|
|
226
226
|
? $T("widget.route.finished")
|
|
@@ -307,9 +307,10 @@
|
|
|
307
307
|
<div class="grid grid-cols-2 divide-x divide-(--border-color) rounded-lg bg-(--container-color) py-3 text-[13px] tabular-nums">
|
|
308
308
|
<div class="grid grid-cols-[1fr_auto] gap-x-4 gap-y-1.5 px-3">
|
|
309
309
|
<span class="text-(--muted-color)">{$T("widget.route.points")}</span><span class="text-right font-semibold">{stats.points}</span>
|
|
310
|
-
<span class="text-(--muted-color)">{$T("widget.route.maxAlt")}</span><span class="text-right font-semibold"
|
|
311
|
-
|
|
312
|
-
|
|
310
|
+
<span class="text-(--muted-color)">{$T("widget.route.maxAlt")}</span><span class="text-right font-semibold">
|
|
311
|
+
{stats.maxAlt}
|
|
312
|
+
{$T("widget.mission.m")}
|
|
313
|
+
</span>
|
|
313
314
|
</div>
|
|
314
315
|
<div class="grid grid-cols-[1fr_auto] gap-x-4 gap-y-1.5 px-3">
|
|
315
316
|
<span class="text-(--muted-color)">{$T("widget.mission.totalLen")}</span><span class="text-right font-semibold">{km(stats.length)}</span>
|
|
@@ -352,8 +353,10 @@
|
|
|
352
353
|
onclick={() => {
|
|
353
354
|
selected = i
|
|
354
355
|
mapInstance?.easeTo({ center: p.point, duration: 300 })
|
|
355
|
-
}}
|
|
356
|
+
}}
|
|
356
357
|
>
|
|
358
|
+
{i + 1}
|
|
359
|
+
</button>
|
|
357
360
|
<Input
|
|
358
361
|
type="number"
|
|
359
362
|
value={p.alt}
|
|
@@ -367,8 +370,9 @@
|
|
|
367
370
|
onUpdate={(v) => Number.isFinite(Number(v)) && setPoint(i, { speed: Math.min(40, Math.max(0.5, Number(v))) })}
|
|
368
371
|
/>
|
|
369
372
|
<span class="text-right text-(--muted-color)">{leg ? `${fmt(leg.length, 0)} ${$T("widget.mission.m")}` : "-"}</span>
|
|
370
|
-
<button class="cursor-pointer border-none bg-transparent p-0 text-(--red-text)" onclick={() => removePoint(i)} aria-label="Delete"
|
|
371
|
-
|
|
373
|
+
<button class="cursor-pointer border-none bg-transparent p-0 text-(--red-text)" onclick={() => removePoint(i)} aria-label="Delete">
|
|
374
|
+
✕
|
|
375
|
+
</button>
|
|
372
376
|
</div>
|
|
373
377
|
{/each}
|
|
374
378
|
</div>
|
|
@@ -380,9 +384,9 @@
|
|
|
380
384
|
{$T("widget.route.returnHome")}
|
|
381
385
|
</label>
|
|
382
386
|
{#if route.points.length}
|
|
383
|
-
<button class="w-max cursor-pointer border-none bg-transparent p-0 text-[12px] text-(--red-text) underline" onclick={clearAll}
|
|
384
|
-
|
|
385
|
-
>
|
|
387
|
+
<button class="w-max cursor-pointer border-none bg-transparent p-0 text-[12px] text-(--red-text) underline" onclick={clearAll}>
|
|
388
|
+
{$T("widget.mission.clear")}
|
|
389
|
+
</button>
|
|
386
390
|
{/if}
|
|
387
391
|
</div>
|
|
388
392
|
{/if}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
5
|
-
>
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 20V5h4v14h4V5h4v14h4V4" />
|
|
5
|
+
</svg>
|
|
@@ -107,13 +107,13 @@
|
|
|
107
107
|
aria-label={clock.playing ? $T("widget.sim.pause") : $T("widget.sim.play")}
|
|
108
108
|
>
|
|
109
109
|
{#if clock.playing}
|
|
110
|
-
<svg viewBox="0 0 24 24" width="18" height="18"
|
|
111
|
-
|
|
112
|
-
>
|
|
110
|
+
<svg viewBox="0 0 24 24" width="18" height="18">
|
|
111
|
+
<rect x="6" y="5" width="4" height="14" rx="1" fill="currentColor" /><rect x="14" y="5" width="4" height="14" rx="1" fill="currentColor" />
|
|
112
|
+
</svg>
|
|
113
113
|
{:else}
|
|
114
|
-
<svg viewBox="0 0 24 24" width="18" height="18"
|
|
115
|
-
|
|
116
|
-
>
|
|
114
|
+
<svg viewBox="0 0 24 24" width="18" height="18">
|
|
115
|
+
<path d="M8 5.5v13a1 1 0 0 0 1.5.86l10.5-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5z" fill="currentColor" />
|
|
116
|
+
</svg>
|
|
117
117
|
{/if}
|
|
118
118
|
</button>
|
|
119
119
|
<select class="rounded border border-(--border-color) bg-(--field-color) px-1 py-0.5 text-(--font-color)" bind:value={clock.rate}>
|
|
@@ -124,9 +124,9 @@
|
|
|
124
124
|
<span>{clockText(clock.t)} / {clockText(clock.duration)} · {Math.round((clock.t / Math.max(1, clock.duration)) * 100)}%</span>
|
|
125
125
|
{#if !compact}<span>{pos.alt.toFixed(0)} {$T("widget.mission.m")} · {pos.speed.toFixed(1)} {$T("widget.mission.ms")}</span>{/if}
|
|
126
126
|
{#if showSpray}
|
|
127
|
-
<span class="{compact ? '' : 'min-w-[7.5rem]'} font-semibold {pos.spray ? 'text-(--green-text)' : 'text-(--muted-color)'}"
|
|
128
|
-
|
|
129
|
-
>
|
|
127
|
+
<span class="{compact ? '' : 'min-w-[7.5rem]'} font-semibold {pos.spray ? 'text-(--green-text)' : 'text-(--muted-color)'}">
|
|
128
|
+
{pos.spray ? $T("widget.sim.sprayOn") : $T("widget.sim.sprayOff")}
|
|
129
|
+
</span>
|
|
130
130
|
{/if}
|
|
131
131
|
</div>
|
|
132
132
|
<!-- Прокрутка пути: перетаскивание ставит полёт на паузу, чтобы рассмотреть любое место траектории -->
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="2"
|
|
10
10
|
d="M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -488,9 +488,9 @@
|
|
|
488
488
|
>
|
|
489
489
|
<div class="flex min-w-0 items-center gap-2" data-tip="system">
|
|
490
490
|
<span class="shrink-0 text-[11px] tracking-wide whitespace-nowrap text-(--faint-color) uppercase">{$T("pfd.system")}</span>
|
|
491
|
-
<span class="rounded-md px-1.5 py-0.5 {armed ? 'bg-(--red-color) text-white' : 'bg-(--container-color) text-(--muted-color)'}" data-tip="armed"
|
|
492
|
-
|
|
493
|
-
>
|
|
491
|
+
<span class="rounded-md px-1.5 py-0.5 {armed ? 'bg-(--red-color) text-white' : 'bg-(--container-color) text-(--muted-color)'}" data-tip="armed">
|
|
492
|
+
{armed ? "ARMED" : "DISARMED"}
|
|
493
|
+
</span>
|
|
494
494
|
<span data-tip="mode">{modeName}</span>
|
|
495
495
|
<span class="flex items-center gap-1" style="color: {NAV_COLOR[navState]}" data-tip="nav">
|
|
496
496
|
<span class="size-2 rounded-full" style="background: {NAV_COLOR[navState]}"></span>{$T("pfd.nav")}{sensErr > 0
|
|
@@ -506,9 +506,9 @@
|
|
|
506
506
|
{#if rssi >= 0 || remRssi >= 0 || drop >= 0}
|
|
507
507
|
<div class="flex min-w-0 items-center gap-2" data-tip="link">
|
|
508
508
|
<span class="shrink-0 text-[11px] tracking-wide whitespace-nowrap text-(--faint-color) uppercase">{$T("pfd.link")}</span>
|
|
509
|
-
<span class={Math.min(rssi, remRssi) >= 0 && Math.min(rssi, remRssi) < 30 ? "text-(--red-text)" : ""}
|
|
510
|
-
|
|
511
|
-
>
|
|
509
|
+
<span class={Math.min(rssi, remRssi) >= 0 && Math.min(rssi, remRssi) < 30 ? "text-(--red-text)" : ""}>
|
|
510
|
+
{rssi >= 0 ? Math.round(rssi) : "-"} / {remRssi >= 0 ? Math.round(remRssi) : "-"} %
|
|
511
|
+
</span>
|
|
512
512
|
{#if drop >= 0}<span class={drop > 5 ? "text-(--orange-text)" : ""}>{$T("pfd.link.drop", { v: fmt(drop) })}</span>{/if}
|
|
513
513
|
</div>
|
|
514
514
|
{/if}
|
|
@@ -583,9 +583,9 @@
|
|
|
583
583
|
{#if load !== null}
|
|
584
584
|
<g data-tip="load">
|
|
585
585
|
<rect x={HX + 8} y="8" width="64" height="22" rx="6" fill="#000" fill-opacity="0.55" />
|
|
586
|
-
<text x={HX + 16} y="24" font-size="13" font-weight="600"
|
|
587
|
-
|
|
588
|
-
>
|
|
586
|
+
<text x={HX + 16} y="24" font-size="13" font-weight="600">
|
|
587
|
+
<tspan fill="#fff" fill-opacity="0.7" font-size="10">G</tspan><tspan dx="5" fill={loadBad ? "#ef4444" : "#fff"}>{fmt(load)}</tspan>
|
|
588
|
+
</text>
|
|
589
589
|
</g>
|
|
590
590
|
{/if}
|
|
591
591
|
{#if wind}
|
|
@@ -595,17 +595,17 @@
|
|
|
595
595
|
<line x1={HX + 20} y1={load !== null ? 39 : 13} x2={HX + 20} y2={load !== null ? 51 : 25} stroke="#fff" stroke-width="2" />
|
|
596
596
|
<polygon points="{HX + 16},{load !== null ? 47 : 21} {HX + 24},{load !== null ? 47 : 21} {HX + 20},{load !== null ? 52 : 26}" fill="#fff" />
|
|
597
597
|
</g>
|
|
598
|
-
<text x={HX + 32} y={load !== null ? 50 : 24} fill="#fff" font-size="13" font-weight="600"
|
|
599
|
-
|
|
600
|
-
>
|
|
598
|
+
<text x={HX + 32} y={load !== null ? 50 : 24} fill="#fff" font-size="13" font-weight="600">
|
|
599
|
+
{fmt(wind.spd)}<tspan dx="3" fill-opacity="0.7" font-size="10">m/s</tspan>
|
|
600
|
+
</text>
|
|
601
601
|
</g>
|
|
602
602
|
{/if}
|
|
603
603
|
{#if thr !== null}
|
|
604
604
|
<g data-tip="thr">
|
|
605
605
|
<rect x={HX + HW - 84} y="8" width="76" height="22" rx="6" fill="#000" fill-opacity="0.55" />
|
|
606
|
-
<text x={HX + HW - 76} y="24" font-size="13" font-weight="600"
|
|
607
|
-
|
|
608
|
-
>
|
|
606
|
+
<text x={HX + HW - 76} y="24" font-size="13" font-weight="600">
|
|
607
|
+
<tspan fill="#fff" fill-opacity="0.7" font-size="10">THR</tspan><tspan dx="5" fill="#fff">{Math.round(thr)} %</tspan>
|
|
608
|
+
</text>
|
|
609
609
|
</g>
|
|
610
610
|
{/if}
|
|
611
611
|
|
|
@@ -709,8 +709,10 @@
|
|
|
709
709
|
fill={climb > 0.2 ? "#22c55e" : climb < -0.2 ? "#f97316" : "#fff"}
|
|
710
710
|
font-size="14"
|
|
711
711
|
font-weight="600"
|
|
712
|
-
text-anchor="middle"
|
|
712
|
+
text-anchor="middle"
|
|
713
713
|
>
|
|
714
|
+
{signed(climb)}
|
|
715
|
+
</text>
|
|
714
716
|
</g>
|
|
715
717
|
{/if}
|
|
716
718
|
|
|
@@ -737,9 +739,9 @@
|
|
|
737
739
|
</g>
|
|
738
740
|
<g data-tip="heading">
|
|
739
741
|
<rect x={CX - 26} y={HH + 20} width="52" height="24" rx="4" fill="#000" stroke="var(--accent-color)" stroke-width="1.5" />
|
|
740
|
-
<text x={CX} y={HH + 37} fill="#fff" font-size="14" font-weight="600" text-anchor="middle"
|
|
741
|
-
|
|
742
|
-
>
|
|
742
|
+
<text x={CX} y={HH + 37} fill="#fff" font-size="14" font-weight="600" text-anchor="middle">
|
|
743
|
+
{String(Math.round(wrap360(heading.current)) % 360).padStart(3, "0")}
|
|
744
|
+
</text>
|
|
743
745
|
</g>
|
|
744
746
|
|
|
745
747
|
<!-- Нет данных: флаг поверх прибора -->
|
|
@@ -778,10 +780,10 @@
|
|
|
778
780
|
{#if wp}
|
|
779
781
|
<div class="flex min-w-0 items-center gap-2" data-tip="route">
|
|
780
782
|
<span class="shrink-0 text-[11px] font-semibold tracking-wide whitespace-nowrap text-(--faint-color) uppercase">{$T("pfd.route")}</span>
|
|
781
|
-
<span
|
|
782
|
-
|
|
783
|
-
{$T("pfd.route.line", { n: wp.num, d: fmtDistance(wp.dist), x: fmtDistance(Math.abs(wp.xte)) })}{eta ? ` · ${eta}` : ""}
|
|
784
|
-
>
|
|
783
|
+
<span>
|
|
784
|
+
<span class="rounded-[3px] bg-black px-[3px]" style="color:#22d3ee">◆</span>
|
|
785
|
+
{$T("pfd.route.line", { n: wp.num, d: fmtDistance(wp.dist), x: fmtDistance(Math.abs(wp.xte)) })}{eta ? ` · ${eta}` : ""}
|
|
786
|
+
</span>
|
|
785
787
|
</div>
|
|
786
788
|
{/if}
|
|
787
789
|
{#if home}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="2"
|
|
10
10
|
d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5M9 18h6M10 22h4"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="2"
|
|
10
10
|
d="M6 19v-3m4 3v-3m4 3v-3m4 3v-3M8 11V9m8 2V9m-4 2V9M2 15h20M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="2"
|
|
10
10
|
d="M21 12a9 9 0 0 0-9-9a9.75 9.75 0 0 0-6.74 2.74L3 8m0-5v5h5m-5 4a9 9 0 0 0 9 9a9.75 9.75 0 0 0 6.74-2.74L21 16m-5 0h5v5"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -202,9 +202,9 @@
|
|
|
202
202
|
<div class="flex items-start justify-between gap-2 text-[13px]">
|
|
203
203
|
<div class="flex min-w-0 flex-col">
|
|
204
204
|
<span class="truncate font-semibold">{heapText("name", heap.Name)}</span>
|
|
205
|
-
<span class="text-[12px] text-(--muted-color)"
|
|
206
|
-
|
|
207
|
-
>
|
|
205
|
+
<span class="text-[12px] text-(--muted-color)">
|
|
206
|
+
{$T("widget.stack.used", { used: formatBytes(heap.used), total: formatBytes(heap.Total) })}
|
|
207
|
+
</span>
|
|
208
208
|
</div>
|
|
209
209
|
<span class="font-semibold tabular-nums" style="color: {percentColor(heap.usedPercent)}">{heap.usedPercent}%</span>
|
|
210
210
|
</div>
|
|
@@ -228,9 +228,9 @@
|
|
|
228
228
|
<div class="flex items-baseline justify-between gap-2 text-[12px] text-(--muted-color)">
|
|
229
229
|
<span use:hint={{ text: $T("widget.stack.hint.tasks"), enabled: $hints }}>{$T("widget.stack.tasks", { n: tasks.length })}</span>
|
|
230
230
|
{#if lowCount}
|
|
231
|
-
<span class="font-semibold text-(--red-text)" use:hint={{ text: $T("widget.stack.hint.low"), enabled: $hints }}
|
|
232
|
-
|
|
233
|
-
>
|
|
231
|
+
<span class="font-semibold text-(--red-text)" use:hint={{ text: $T("widget.stack.hint.low"), enabled: $hints }}>
|
|
232
|
+
{$T("widget.stack.low", { warn: warnBytes, n: lowCount })}
|
|
233
|
+
</span>
|
|
234
234
|
{/if}
|
|
235
235
|
</div>
|
|
236
236
|
<div class="flex max-h-80 min-h-0 flex-col">
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="1.5"
|
|
10
10
|
d="m14 14l2.5 2.5m-.067 2.025a1.48 1.48 0 1 1 2.092-2.092l3.042 3.042a1.48 1.48 0 1 1-2.092 2.092zM16 9A7 7 0 1 0 2 9a7 7 0 0 0 14 0"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="2"
|
|
10
10
|
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0M12 9v4m0 4h.01"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts"></script>
|
|
2
2
|
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"
|
|
4
|
-
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
|
4
|
+
<path
|
|
5
5
|
fill="none"
|
|
6
6
|
stroke="currentColor"
|
|
7
7
|
stroke-linecap="round"
|
|
8
8
|
stroke-linejoin="round"
|
|
9
9
|
stroke-width="2"
|
|
10
10
|
d="M5 12.55a11 11 0 0 1 14.08 0M1.42 9a16 16 0 0 1 21.16 0M8.53 16.11a6 6 0 0 1 6.95 0M12 20h.01"
|
|
11
|
-
|
|
12
|
-
>
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
package/dist/busBridge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type DeviceMessageLevel, type Dictionary } from "./protocols";
|
|
2
|
-
import type { DevicePayload } from "./fsTransfer";
|
|
3
|
-
import { type DeviceLink } from "./gui";
|
|
4
|
-
import { type LanguageCode } from "./locales/languages";
|
|
1
|
+
import { type DeviceMessageLevel, type Dictionary } from "./protocols/index.js";
|
|
2
|
+
import type { DevicePayload } from "./fsTransfer.js";
|
|
3
|
+
import { type DeviceLink } from "./gui.js";
|
|
4
|
+
import { type LanguageCode } from "./locales/languages.js";
|
|
5
5
|
export interface BusPacket {
|
|
6
6
|
trgId: number;
|
|
7
7
|
srcId: number;
|
|
@@ -21,6 +21,9 @@ export interface BusModule {
|
|
|
21
21
|
ModIFace?: number;
|
|
22
22
|
Progress?: number;
|
|
23
23
|
self: boolean;
|
|
24
|
+
BusID?: number;
|
|
25
|
+
ModBindKey?: string;
|
|
26
|
+
seen?: number;
|
|
24
27
|
}
|
|
25
28
|
export interface BusBridgeOptions {
|
|
26
29
|
values: {
|
|
@@ -32,6 +35,7 @@ export interface BusBridgeOptions {
|
|
|
32
35
|
onMessage?: (text: string, level: DeviceMessageLevel, module: BusModule | undefined) => void;
|
|
33
36
|
onModules?: (modules: BusModule[]) => void;
|
|
34
37
|
selfTarget?: number;
|
|
38
|
+
discover?: boolean;
|
|
35
39
|
}
|
|
36
40
|
/** BusID модуля по серийному номеру: HEX после ":", 0000 и FFFF сдвигаются на 1 (get_dev_bus_id прошивок); нет - 0 */
|
|
37
41
|
export declare const busIdFromSN: (serial: string) => number;
|
|
@@ -39,7 +43,7 @@ export declare const busIdFromSN: (serial: string) => number;
|
|
|
39
43
|
export declare const createBusBridge: (channel: BusChannel, options: BusBridgeOptions) => {
|
|
40
44
|
/** Связь с модулем; "" - модуль консоли, пока его серийный номер не известен */
|
|
41
45
|
link: (ModSN: string) => DeviceLink;
|
|
42
|
-
/** Модули изделия: из CFG.ModList головного модуля или сам модуль
|
|
46
|
+
/** Модули изделия: из CFG.ModList головного модуля или сам модуль консоли; в режиме шины - ответившие на ModuleInfo, seen обновляется без onModules */
|
|
43
47
|
modules: () => BusModule[];
|
|
44
48
|
/** Серийный номер модуля консоли ("" - ещё не ответил) */
|
|
45
49
|
self: () => string;
|