diff --git a/package.json b/package.json index 2513aa6..7736dc1 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "hls.js": "^1.6.15", "leancloud-realtime": "5.0.0-rc.8", "pinia": "^3.0.4", + "pinia-plugin-persistedstate": "^4.7.1", "primeicons": "^7.0.0", "primevue": "^4.5.4", "uuid": "^13.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c13d370..4404d93 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: pinia: specifier: ^3.0.4 version: 3.0.4(typescript@5.9.3)(vue@3.5.30(typescript@5.9.3)) + pinia-plugin-persistedstate: + specifier: ^4.7.1 + version: 4.7.1(pinia@3.0.4(typescript@5.9.3)(vue@3.5.30(typescript@5.9.3))) primeicons: specifier: ^7.0.0 version: 7.0.0 @@ -2801,6 +2804,7 @@ packages: glob@11.1.0: resolution: {integrity: sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==} engines: {node: 20 || >=22} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@7.2.3: @@ -3777,6 +3781,20 @@ packages: engines: {node: '>=0.10'} hasBin: true + pinia-plugin-persistedstate@4.7.1: + resolution: {integrity: sha512-WHOqh2esDlR3eAaknPbqXrkkj0D24h8shrDPqysgCFR6ghqP/fpFfJmMPJp0gETHsvrh9YNNg6dQfo2OEtDnIQ==} + peerDependencies: + '@nuxt/kit': '>=3.0.0' + '@pinia/nuxt': '>=0.10.0' + pinia: '>=3.0.0' + peerDependenciesMeta: + '@nuxt/kit': + optional: true + '@pinia/nuxt': + optional: true + pinia: + optional: true + pinia@3.0.4: resolution: {integrity: sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==} peerDependencies: @@ -8742,6 +8760,12 @@ snapshots: pidtree@0.6.0: {} + pinia-plugin-persistedstate@4.7.1(pinia@3.0.4(typescript@5.9.3)(vue@3.5.30(typescript@5.9.3))): + dependencies: + defu: 6.1.4 + optionalDependencies: + pinia: 3.0.4(typescript@5.9.3)(vue@3.5.30(typescript@5.9.3)) + pinia@3.0.4(typescript@5.9.3)(vue@3.5.30(typescript@5.9.3)): dependencies: '@vue/devtools-api': 7.7.9 diff --git a/src/App.vue b/src/App.vue index 736d096..99015a4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,19 +1,19 @@ diff --git a/src/components/header/TopToolbar.vue b/src/components/header/TopToolbar.vue index 6137fbd..9baa430 100644 --- a/src/components/header/TopToolbar.vue +++ b/src/components/header/TopToolbar.vue @@ -207,10 +207,16 @@ const settingsVisible = ref(false); margin-bottom: 1rem; } +.top-toolbar :deep(.p-toolbar) { + min-height: 3.2rem; + row-gap: 0.45rem; +} + .toolbar-brand { display: flex; align-items: center; gap: 0.65rem; + min-width: 0; } .brand-logo { @@ -239,23 +245,29 @@ const settingsVisible = ref(false); font-size: 0.78rem; } -.toolbar-actions { - display: flex; - align-items: center; - gap: 0.5rem; +.zone-select { + min-width: 9rem; +} + +.zone-select-button-wrap { + width: 100%; min-width: 0; + max-width: 100%; } -.toolbar-actions > * { - flex-shrink: 0; +.zone-select-button-wrap :deep(.p-selectbutton) { + width: 100%; + min-width: 0; + display: flex; + flex-wrap: wrap; + gap: 0.28rem; } -.zone-select { - min-width: 9rem; +.zone-select-button-wrap :deep(.p-togglebutton) { + flex: 0 0 auto; } -.zone-select-button-wrap { - flex: 1; +.zone-select-button-wrap :deep(.p-togglebutton .p-button-label) { min-width: 0; } @@ -304,14 +316,6 @@ const settingsVisible = ref(false); padding: 0.25rem; } -.settings-entry-logo { - display: block; - width: 1.35rem; - height: 1.35rem; - object-fit: contain; - opacity: 0.92; -} - @media (width <= 768px) { .toolbar-brand-meta h1 { font-size: 0.92rem; @@ -321,10 +325,6 @@ const settingsVisible = ref(false); display: none; } - .toolbar-actions { - gap: 0.35rem; - } - .zone-select { min-width: 0; flex: 1; diff --git a/src/components/layout/LiveStage.vue b/src/components/layout/LiveStage.vue index 06a3289..6cfeab7 100644 --- a/src/components/layout/LiveStage.vue +++ b/src/components/layout/LiveStage.vue @@ -6,6 +6,7 @@ import { Fieldset } from 'primevue'; import Splitter from 'primevue/splitter'; import SplitterPanel from 'primevue/splitterpanel'; import { computed, defineAsyncComponent } from 'vue'; +import LivePlayer from '../live/LivePlayer.vue'; import type { DanmuMessage } from '../../types/api'; const dataStore = useRmDataStore(); @@ -14,6 +15,7 @@ const uiStore = useUiStore(); const { effectiveStreamUrl, streamLoading, + liveGameInfo, effectiveStreamErrorMessage, playerQualityOptions, selectedQualityRes, @@ -29,12 +31,12 @@ const emit = defineEmits<{ danmuReset: []; }>(); -const LivePlayer = defineAsyncComponent(() => import('../live/LivePlayer.vue')); const DanmuPanel = defineAsyncComponent(() => import('../danmu/DanmuPanel.vue')); const MatchFirepowerBar = defineAsyncComponent(() => import('../panels/MatchFirepowerBar.vue')); const MatchReactionStrip = defineAsyncComponent(() => import('../panels/MatchReactionStrip.vue')); const hasCurrentMatch = computed(() => Boolean(runningMatchForSelectedZone.value)); +const showMatchDependentPlaceholder = computed(() => streamLoading.value || !liveGameInfo.value); function onRetry() { void dataStore.retryLiveStream(); @@ -54,7 +56,8 @@ function onDanmuReset() {
- + +