From 8c270feb5b489c0dd3bfe8b3edbd3111115f9bd3 Mon Sep 17 00:00:00 2001 From: Pandipipas Date: Fri, 22 May 2026 21:19:45 +0200 Subject: [PATCH] feat: enhance pack management and character handling; implement automatic registry refresh and logo display updates --- .../components/GamePackDownloadDialog.vue | 51 ++- .../components/ScoreCenterPanel.vue | 36 +-- .../composables/useCharacterGame.ts | 4 +- .../composables/usePackRegistry.ts | 40 +-- src/extension/pack-manager.ts | 4 +- src/shared/fighting-characters.ts | 298 ++---------------- 6 files changed, 98 insertions(+), 335 deletions(-) diff --git a/src/dashboard/scoreko-dev/components/GamePackDownloadDialog.vue b/src/dashboard/scoreko-dev/components/GamePackDownloadDialog.vue index ff8d333..403baec 100644 --- a/src/dashboard/scoreko-dev/components/GamePackDownloadDialog.vue +++ b/src/dashboard/scoreko-dev/components/GamePackDownloadDialog.vue @@ -6,6 +6,7 @@ // ───────────────────────────────────────────────────────────────────────────── import { computed, watch } from 'vue'; +import { getPackLogoUrl } from '../../../shared/pack-config'; import type { PackRegistryEntry } from '../../../shared/pack-types'; import { usePackRegistry } from '../composables/usePackRegistry'; @@ -48,15 +49,13 @@ const isError = computed(() => downloadState.value?.status === 'error'); const progress = computed(() => downloadState.value?.progress ?? 0); -const logoUrl = computed(() => - props.packEntry ? packRegistry.getLocalLogoUrl(props.packEntry.id) : '', -); - -const giteaLogoUrl = computed(() => - props.packEntry - ? `${packRegistry.registry.value ? '' : ''}` // resolved from packEntry.logoPath via Gitea - : '', -); +// Pre-install: show logo directly from Gitea (pack not on disk yet). +// Update mode: pack is installed, serve from local /packs/ route. +const logoSrc = computed(() => { + if (!props.packEntry) return ''; + if (props.isUpdate) return packRegistry.getLocalLogoUrl(props.packEntry.id); + return getPackLogoUrl(props.packEntry.id); +}); // Close automatically once download completes and emit so parent sets the game watch(isDone, (done) => { @@ -98,8 +97,15 @@ const close = () => emit('update:modelValue', false); {{ packEntry.name }}
- v{{ packEntry.version }} · {{ packEntry.characterCount }} personajes · - {{ packRegistry.formatBytes(packEntry.totalSizeBytes) }} + +
emit('update:modelValue', false); /> - +
+ @@ -253,8 +266,18 @@ const close = () => emit('update:modelValue', false); overflow: hidden; } +.pack-download-dialog__logo { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 10px; +} + .pack-download-dialog__banner-icon { - opacity: 0.35; + position: relative; /* above the logo */ + opacity: 0.25; } .pack-download-dialog__progress-section { diff --git a/src/dashboard/scoreko-dev/components/ScoreCenterPanel.vue b/src/dashboard/scoreko-dev/components/ScoreCenterPanel.vue index 6e2a276..efcb1fd 100644 --- a/src/dashboard/scoreko-dev/components/ScoreCenterPanel.vue +++ b/src/dashboard/scoreko-dev/components/ScoreCenterPanel.vue @@ -1,5 +1,5 @@