mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(ui): render the Context mode switch from a store
ContextControls presents the selected mode, the transition busy state and the nearby sites search through a publish option, and ContextView renders them from the gev-context store. ./ui/context stays free of Vue. The Radio QA reads the search button's aria-busy, the state it actually carries.
This commit is contained in:
1 parent
b6c7c130f6
commit
749bfd5cd4
13 files changed
+273
-143
No files matched your search
@@ -86,10 +86,9 @@ export function _initGlobalContextPanel() {
|
||||
!this._dataManager?.layers?.has('military-installations')
|
||||
)
|
||||
return;
|
||||
const button = this._installationsSearchBtn;
|
||||
if (button.getAttribute('aria-busy') === 'true') return;
|
||||
button.setAttribute('aria-disabled', 'true');
|
||||
button.setAttribute('aria-busy', 'true');
|
||||
if (this._installationsSearchBusy) return;
|
||||
this._installationsSearchBusy = true;
|
||||
this._presentContext();
|
||||
void this._runUserFacingContextAction(async (notificationToken) => {
|
||||
const enabled = await this._dataManager.setEnabled(
|
||||
'military-installations',
|
||||
@@ -118,8 +117,8 @@ export function _initGlobalContextPanel() {
|
||||
}, t('Nearby installations could not be refreshed; try again')).finally(
|
||||
() => {
|
||||
if (this.destroyed) return;
|
||||
button.setAttribute('aria-disabled', 'false');
|
||||
button.setAttribute('aria-busy', 'false');
|
||||
this._installationsSearchBusy = false;
|
||||
this._presentContext();
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user