Skip to content

Lad reckless modal#351

Merged
OSPFNeighbour merged 2 commits intomaster-devfrom
lad-reckless-modal
Mar 21, 2026
Merged

Lad reckless modal#351
OSPFNeighbour merged 2 commits intomaster-devfrom
lad-reckless-modal

Conversation

@OSPFNeighbour
Copy link
Collaborator

This pull request adds a confirmation modal to prevent users from unintentionally changing the refreshInterval setting in the configuration. Now, when a user attempts to modify the refresh interval, a modal prompts them to type "reckless" to confirm the change, helping to avoid accidental or potentially disruptive updates. The logic also ensures that the modal does not appear when loading settings from storage or programmatically updating the value.

Key changes:

User Experience & Safety:

  • Added a modal confirmation dialog that appears when the user tries to change the refreshInterval value. The modal requires the user to type "reckless" to confirm the change, reducing the risk of accidental or reckless updates.

State Management & Logic:

  • Introduced guards (suppressRecklessModal and lastRefreshInterval) to prevent the modal from appearing during programmatic updates, such as when loading settings from storage or reverting changes. [1] [2] [3]
  • Updated the logic in loadFromStorage to suppress the modal during configuration load and to set the correct previous value for refreshInterval. [1] [2] [3]

Prevent accidental changes to refreshInterval by tracking the last value and showing a confirmation modal whenever the observable is changed. A showRecklessModal helper is injected into the DOM (id: recklessModal) and requires the user to type "reckless" to confirm; onCancel reverts the observable to the previous value. Implementation uses bootstrap.Modal and creates/removes event handlers for confirm/cancel and the modal close button.
@OSPFNeighbour OSPFNeighbour merged commit 1288a4c into master-dev Mar 21, 2026
OSPFNeighbour added a commit that referenced this pull request Mar 21, 2026
* tiny text align fix on trackable assets under teams

* config bundle fixup

removed redundant info from config LS

* update style on priority change (#349)

* function to complete a job (#350)

* function to complete a job

* and date is needed

* Lad reduce tasking search (#348)

* first

* removed too much! put it back

* shitty theme

* Bump flatted from 3.2.7 to 3.4.2 (#346)

Bumps [flatted](https://github.com/WebReflection/flatted) from 3.2.7 to 3.4.2.
- [Commits](WebReflection/flatted@v3.2.7...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Lad reckless modal (#351)

* Add confirmation modal for refreshInterval changes

Prevent accidental changes to refreshInterval by tracking the last value and showing a confirmation modal whenever the observable is changed. A showRecklessModal helper is injected into the DOM (id: recklessModal) and requires the user to type "reckless" to confirm; onCancel reverts the observable to the previous value. Implementation uses bootstrap.Modal and creates/removes event handlers for confirm/cancel and the modal close button.

* gated

* Refine dark-mode styles for task list items (#353)

Adjust dark-mode CSS for vehicle popup tasking list: add styling for team badge (.veh-pop__team-title .badge.bg-light) with darker background (#444), text and border tweaks; set explicit background for tasking items (.veh-pop__tasking-item, --no-job) to #383838; set muted text color to #b0b0b0; and update hover background to #434343 to improve contrast and consistency in dark mode.

* Batch job tasking fetch and debounce (#352)

* Batch job tasking fetch and debounce

Add batched and debounced tasking fetches to reduce per-job API calls and bursts. main.js: introduce a 250ms debounced initial-load batch for newly filtered-in jobs, a periodic batch refresh (driven by config.refreshInterval) and timer management (start/restart). Job.js: remove per-job periodic refresh checks, add a SINGLE_FETCH_COOLDOWN_MS (10s) and make fetchTasking honor a force option to avoid redundant single-job requests right after batch updates. Team.js: gate fetchTasking against both last fetch time and last bulk refresh time, clear loading state when throttled, and make updateFromJson do defensive/no-op updates to avoid unnecessary observable writes. shared/BeaconClient/job.js: extend getTasking to accept single id or array of ids, build multi-JobIds parameters, and use paginated JSON fetch to return a unified Results array. Overall this reduces API traffic, prevents duplicate refreshes, and avoids unnecessary UI churn.

* Missed one type

* teams not refreshing after tasking

* sector fuckery when just wanting to see all jobs

* bad bar for sectors

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant