diff --git a/src/components/StatusBar.vue b/src/components/StatusBar.vue index 6fcc0f45..6df83773 100644 --- a/src/components/StatusBar.vue +++ b/src/components/StatusBar.vue @@ -51,12 +51,19 @@ - + -
+
+ :class=" + gameStore.isGameRunning ? 'bg-status-online' : 'bg-status-offline-alt' + " /> {{ t('status_bar.game') }} {{ gameSessionText @@ -71,11 +78,15 @@ :side-offset="4">
- {{ t('status_bar.game_started_at') }} + {{ + t('status_bar.game_started_at') + }} {{ gameStartedAtText }}
- {{ t('status_bar.game_session_duration') }} + {{ + t('status_bar.game_session_duration') + }} {{ gameSessionDetailText }}
@@ -88,11 +99,15 @@ :side-offset="4">
- {{ t('status_bar.game_last_session') }} + {{ + t('status_bar.game_last_session') + }} {{ lastSessionText }}
- {{ t('status_bar.game_last_offline') }} + {{ + t('status_bar.game_last_offline') + }} {{ lastOfflineTimeText }}
@@ -269,7 +284,10 @@ @update:model-value="toggleVisibility('proxy')"> {{ t('status_bar.proxy') }} - + WebSocket ({ ...c }))); - const clockCount = ref(3); + const clockCount = ref(2); const clockPopoverOpen = reactive([false, false, false]); const visibleClocks = computed(() => clocks.value.slice(0, clockCount.value)); diff --git a/src/components/__tests__/statusBarUtils.test.js b/src/components/__tests__/statusBarUtils.test.js index fa3c2355..487cc139 100644 --- a/src/components/__tests__/statusBarUtils.test.js +++ b/src/components/__tests__/statusBarUtils.test.js @@ -268,8 +268,8 @@ describe('loadClockCount', () => { storage = createMockStorage(); }); - test('returns 3 when storage is empty', () => { - expect(loadClockCount(storage)).toBe(3); + test('returns 2 when storage is empty', () => { + expect(loadClockCount(storage)).toBe(2); }); test.each([0, 1, 2, 3])('returns valid stored count %i', (n) => { @@ -277,17 +277,17 @@ describe('loadClockCount', () => { expect(loadClockCount(storage)).toBe(n); }); - test('returns 3 for out-of-range values', () => { + test('returns 2 for out-of-range values', () => { storage.setItem('VRCX_statusBarClockCount', '4'); - expect(loadClockCount(storage)).toBe(3); + expect(loadClockCount(storage)).toBe(2); storage.setItem('VRCX_statusBarClockCount', '-1'); - expect(loadClockCount(storage)).toBe(3); + expect(loadClockCount(storage)).toBe(2); }); - test('returns 3 for non-numeric values', () => { + test('returns 2 for non-numeric values', () => { storage.setItem('VRCX_statusBarClockCount', 'abc'); - expect(loadClockCount(storage)).toBe(3); + expect(loadClockCount(storage)).toBe(2); }); }); diff --git a/src/components/statusBarUtils.js b/src/components/statusBarUtils.js index 008bc8a0..09dc51b9 100644 --- a/src/components/statusBarUtils.js +++ b/src/components/statusBarUtils.js @@ -131,7 +131,7 @@ export function loadClocks(storage, defaults) { /** * Load the clock count (0-3) from a Storage-like object. - * Returns 3 when stored data is absent or invalid. + * Returns 2 when stored data is absent or invalid. * @param {Storage} storage * @returns {number} */ @@ -145,7 +145,7 @@ export function loadClockCount(storage) { } catch { // ignore } - return 3; + return 2; } /**