fix(game-ui): restore detailed map images

This commit is contained in:
2026-08-13 16:35:52 +00:00
parent b6add2930b
commit 5f2f2a256e
4 changed files with 120 additions and 24 deletions
@@ -258,7 +258,7 @@ watch(
:map-layout="props.mapLayout ?? null"
:loading="false"
:selected-city-id="mapSelectedCityId"
:detail-mode="false"
:detail-mode="true"
:fit-container="true"
@select-city="selectMapCity"
/>
@@ -158,7 +158,14 @@ const cityStateStyle = computed(() => ({
class="city-base"
:type="props.selectOnly ? 'button' : undefined"
:to="props.selectOnly ? undefined : { name: 'current-city', query: { cityId: props.city.id } }"
:class="[{ mine: props.city.isMyCity, selected: props.city.selected, 'supply-off': !props.city.supply }]"
:class="[
{
mine: props.city.isMyCity,
selected: props.city.selected,
'supply-off': !props.city.supply,
'select-only': props.selectOnly,
},
]"
:style="cityBaseStyle"
@mouseenter="emit('hover', props.city.id)"
@mouseleave="emit('leave')"
@@ -195,6 +202,10 @@ const cityStateStyle = computed(() => ({
background: transparent;
}
.city-base.select-only {
cursor: pointer;
}
.city-bg {
position: absolute;
background-position: center;
@@ -63,14 +63,20 @@ interface CityView {
selected: boolean;
}
const props = defineProps<{
mapData: MapSummary | null;
mapLayout: MapLayout | null;
loading: boolean;
selectedCityId?: number | null;
detailMode?: boolean;
fitContainer?: boolean;
}>();
const props = withDefaults(
defineProps<{
mapData: MapSummary | null;
mapLayout: MapLayout | null;
loading: boolean;
selectedCityId?: number | null;
detailMode?: boolean;
fitContainer?: boolean;
}>(),
{
// Vue casts an absent Boolean prop to false unless undefined is an explicit default.
detailMode: undefined,
}
);
const emit = defineEmits<{
(event: 'select-city', cityId: number): void;