Fix: Persist native sync timers and implement monitor UI
- Implemented safe merge in root layout to preserve local timer overrides. - Added Native Sync Monitor UI to background sync component. - Exposed loop periods and hash prefix length in Launcher Config. - Ensured manual adjustments survive page refreshes.
This commit is contained in:
@@ -116,6 +116,86 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Sync Loop Timers Section -->
|
||||
<section
|
||||
class:preset-outlined-warning-300-700={$events_loc.launcher.show_section__sync_timers}
|
||||
class="sync_timers w-full preset-outlined-surface-300-700 transition-all mb-2"
|
||||
>
|
||||
<h3 class="text-center mb-2 text-sm font-semibold w-full">
|
||||
<button
|
||||
onclick={() => {
|
||||
$events_loc.launcher.show_section__sync_timers =
|
||||
!$events_loc.launcher.show_section__sync_timers;
|
||||
}}
|
||||
class="btn btn-sm w-full justify-between"
|
||||
>
|
||||
<span>
|
||||
{#if $events_loc.launcher.show_section__sync_timers}
|
||||
<span class="fas fa-chevron-down"></span>
|
||||
{:else}
|
||||
<span class="fas fa-chevron-right"></span>
|
||||
{/if}
|
||||
Native Sync Timers
|
||||
</span>
|
||||
</button>
|
||||
</h3>
|
||||
|
||||
<div
|
||||
class="flex flex-col gap-1 items-center justify-start w-full p-2"
|
||||
class:hidden={!$events_loc.launcher.show_section__sync_timers}
|
||||
>
|
||||
{#if $ae_loc.native_device}
|
||||
<label class="flex flex-row gap-1 items-center justify-start text-xs w-full">
|
||||
<span class="grow opacity-70">Event Sync (ms):</span>
|
||||
<input
|
||||
type="number"
|
||||
bind:value={$ae_loc.native_device.check_event_loop_period}
|
||||
class="input input-sm w-24 text-right preset-tonal-surface"
|
||||
/>
|
||||
</label>
|
||||
<label class="flex flex-row gap-1 items-center justify-start text-xs w-full">
|
||||
<span class="grow opacity-70">Device Heartbeat (ms):</span>
|
||||
<input
|
||||
type="number"
|
||||
bind:value={$ae_loc.native_device.check_event_device_loop_period}
|
||||
class="input input-sm w-24 text-right preset-tonal-surface"
|
||||
/>
|
||||
</label>
|
||||
<label class="flex flex-row gap-1 items-center justify-start text-xs w-full">
|
||||
<span class="grow opacity-70">Location Refresh (ms):</span>
|
||||
<input
|
||||
type="number"
|
||||
bind:value={$ae_loc.native_device.check_event_location_loop_period}
|
||||
class="input input-sm w-24 text-right preset-tonal-surface"
|
||||
/>
|
||||
</label>
|
||||
<label class="flex flex-row gap-1 items-center justify-start text-xs w-full">
|
||||
<span class="grow opacity-70">Session Scan (ms):</span>
|
||||
<input
|
||||
type="number"
|
||||
bind:value={$ae_loc.native_device.check_event_session_loop_period}
|
||||
class="input input-sm w-24 text-right preset-tonal-surface"
|
||||
/>
|
||||
</label>
|
||||
<label class="flex flex-row gap-1 items-center justify-start text-xs w-full border-t border-surface-500/20 pt-1 mt-1">
|
||||
<span class="grow font-semibold text-primary-500">Hash Prefix Length:</span>
|
||||
<input
|
||||
type="number"
|
||||
min="1"
|
||||
max="8"
|
||||
bind:value={$ae_loc.native_device.hash_prefix_length}
|
||||
class="input input-sm w-24 text-right preset-tonal-surface font-bold"
|
||||
/>
|
||||
</label>
|
||||
<div class="text-[9px] text-gray-500 mt-1 italic w-full text-right">
|
||||
* Prefix: {($ae_loc.native_device.hash_prefix_length || 2)} chars. Reload required.
|
||||
</div>
|
||||
{:else}
|
||||
<div class="text-xs text-error-500 italic">No device config hydrated.</div>
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
<!-- <hr class="w-full my-2 border-1 border-gray-200 dark:border-gray-800 " /> -->
|
||||
|
||||
Reference in New Issue
Block a user