mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Merge remote-tracking branch 'upstream/main' into fix/drone-airspace
# Conflicts: # docs/CURRENT-STATE.md # src/app/constructCatalog.test.mjs # src/app/sourceComposition.test.mjs # src/data/layerState.test.mjs # src/data/layerStateTokenLedger.test.mjs # src/i18n/locales/ar.json
This commit is contained in:
195 files changed
+23414
-1578
No files matched your search
@@ -30,6 +30,7 @@ export const LAYER_NAME_KEYS = Object.freeze({
|
||||
'telegeography-submarine-cables': msg('Submarine Cables'),
|
||||
'local-firms': msg('FIRMS Active Fires'),
|
||||
'local-adsb': msg('Local ADS-B'),
|
||||
'osm-places': msg('OSM Places'),
|
||||
transit: msg('Transit'),
|
||||
'recent-imagery': msg('Recent Imagery'),
|
||||
'fire-perimeters': msg('Fire Perimeters'),
|
||||
@@ -44,6 +45,8 @@ export const LAYER_NAME_KEYS = Object.freeze({
|
||||
'air-quality': msg('Air quality'),
|
||||
directions: msg('Directions'),
|
||||
'alpr-cameras': msg('ALPR Cameras'),
|
||||
'sea-marks': msg('Sea Marks'),
|
||||
'ski-pistes': msg('Ski Pistes'),
|
||||
});
|
||||
|
||||
/** The layer panel's own English names, where they differ from the module's. */
|
||||
|
||||
@@ -65,6 +65,8 @@ const PANEL_GROUPS = [
|
||||
'local-datacenters',
|
||||
'telegeography-submarine-cables',
|
||||
'local-dams',
|
||||
'sea-marks',
|
||||
'ski-pistes',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -93,7 +95,7 @@ const PANEL_GROUPS = [
|
||||
// needs no heading there.
|
||||
{
|
||||
label: msg('Utilities'),
|
||||
ids: ['directions'],
|
||||
ids: ['directions', 'osm-places'],
|
||||
containerId: 'utilities-toggles',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -241,9 +241,12 @@ export function bindRadioControls() {
|
||||
const pool = this._radioTunerPool.length
|
||||
? this._radioTunerPool
|
||||
: this._radioTunerStations;
|
||||
// Silent unless a stream is active; an active stream follows the selection.
|
||||
const { audioState } = this.radio.getUIState();
|
||||
const cycled = this.radio.cycleStation(direction, {
|
||||
rotate,
|
||||
stationIds: pool.map((station) => station.id),
|
||||
autoplay: ['loading', 'buffering', 'playing'].includes(audioState),
|
||||
origin: 'user',
|
||||
});
|
||||
if (!cycled) {
|
||||
|
||||
@@ -47,7 +47,9 @@ function fixture() {
|
||||
publishTuner() {},
|
||||
};
|
||||
const calls = [];
|
||||
const cycleOptions = [];
|
||||
const subscribers = [];
|
||||
const uiState = { audioState: 'stopped' };
|
||||
const radio = {
|
||||
subscribe(callback) {
|
||||
subscribers.push(callback);
|
||||
@@ -57,10 +59,12 @@ function fixture() {
|
||||
endTuning() {
|
||||
calls.push('endTuning');
|
||||
},
|
||||
cycleStation(direction) {
|
||||
cycleStation(direction, options) {
|
||||
calls.push(['cycle', direction]);
|
||||
cycleOptions.push(options);
|
||||
return true;
|
||||
},
|
||||
getUIState: () => uiState,
|
||||
};
|
||||
const actions = {
|
||||
isRegistered: () => true,
|
||||
@@ -90,6 +94,8 @@ function fixture() {
|
||||
store,
|
||||
actions,
|
||||
calls,
|
||||
cycleOptions,
|
||||
uiState,
|
||||
subscribers,
|
||||
document,
|
||||
cleanup() {
|
||||
@@ -177,3 +183,31 @@ test('destruction releases an active tuner pointer after revoking listeners', ()
|
||||
f.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
test('Next and Previous play only while a stream is active', () => {
|
||||
const f = fixture();
|
||||
try {
|
||||
f.controls.connect();
|
||||
for (const audioState of ['stopped', 'paused', 'error']) {
|
||||
f.uiState.audioState = audioState;
|
||||
f.store.act('cycleRadio', 1);
|
||||
f.store.act('cycleRadio', -1);
|
||||
}
|
||||
assert.deepEqual(
|
||||
f.cycleOptions.map((options) => options.autoplay),
|
||||
[false, false, false, false, false, false],
|
||||
);
|
||||
f.cycleOptions.length = 0;
|
||||
for (const audioState of ['loading', 'buffering', 'playing']) {
|
||||
f.uiState.audioState = audioState;
|
||||
f.store.act('cycleRadio', 1);
|
||||
f.store.act('cycleRadio', -1);
|
||||
}
|
||||
assert.deepEqual(
|
||||
f.cycleOptions.map((options) => options.autoplay),
|
||||
[true, true, true, true, true, true],
|
||||
);
|
||||
} finally {
|
||||
f.cleanup();
|
||||
}
|
||||
});
|
||||
@@ -25,7 +25,9 @@ export function renderRadioState(state) {
|
||||
const interactive = enabled && !transitioning && !uncertain;
|
||||
const selected = state.selected || null;
|
||||
const hasStations = state.filteredCount > 0;
|
||||
const activePlayback = ['playing', 'buffering'].includes(state.audioState);
|
||||
const activePlayback = ['loading', 'buffering', 'playing'].includes(
|
||||
state.audioState,
|
||||
);
|
||||
document
|
||||
.getElementById('title-bar')
|
||||
?.classList.toggle('radio-broadcasting', state.audioState === 'playing');
|
||||
|
||||
@@ -37,6 +37,7 @@ const ESRI_NOTE = msg('Imagery on Esri · Google 3D returns when cleared');
|
||||
const LAYER_NOTICES = new Set([
|
||||
ESRI_NOTE,
|
||||
msg('Box and images cleared'),
|
||||
msg('Search cancelled'),
|
||||
msg('Esri map unavailable · no swipe'),
|
||||
msg('Swipe needs a globe map'),
|
||||
msg('Imagery stays on Esri · CLEAR to use Google 3D'),
|
||||
|
||||
@@ -67,7 +67,7 @@ const radioWords = computed(() => ({
|
||||
<a id="radio-station-homepage" :href="radio ? radio.station.homepage || undefined : '#'" target="_blank" rel="noopener noreferrer" :hidden="radio ? !radio.station.homepage : true">{{ t('STATION SITE') }}</a>
|
||||
<a href="https://www.radio-browser.info/" target="_blank" rel="noopener noreferrer">{{ t('DIRECTORY: RADIO BROWSER') }}</a>
|
||||
</div>
|
||||
<p class="radio-privacy">{{ t('Audio connects directly to the broadcaster after you press play. Your IP is visible to that broadcaster.') }}</p>
|
||||
<p class="radio-privacy">{{ t('Audio connects directly to the broadcaster when you press play, choose a station on the globe or ask voice to play. Your IP is visible to that broadcaster.') }}</p>
|
||||
<SdrCard />
|
||||
</RailPanel>
|
||||
</template>
|
||||
Reference in new issue
Block a user