fix(game-ui): 메인과 지도 화면 모드 경계를 통일한다
This commit is contained in:
@@ -9,6 +9,7 @@ import { useMapViewerStore } from '../../stores/mapViewer';
|
||||
import { buildAssetUrl } from '../../utils/mapAssets';
|
||||
import { resolveMapBackgroundPath, resolveMapSeason, resolveNextMapSeason } from '../../utils/mapBackground';
|
||||
import { configuredGameAssetUrl } from '../../utils/imageAssets';
|
||||
import { SCREEN_MODE_DESKTOP_MEDIA_QUERY } from '../../utils/screenModeViewport';
|
||||
|
||||
interface MapSummary {
|
||||
year: number;
|
||||
@@ -133,7 +134,7 @@ const preloadDecodedImage = (url: string): Promise<void> => {
|
||||
return pending;
|
||||
};
|
||||
|
||||
const isWide = useMediaQuery('(min-width: 1024px)');
|
||||
const isWide = useMediaQuery(SCREEN_MODE_DESKTOP_MEDIA_QUERY);
|
||||
const mapStore = useMapViewerStore();
|
||||
const {
|
||||
showCityName,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
export const SCREEN_MODE_KEY = 'sam.screenMode';
|
||||
export const SCREEN_MODE_CHANGE_EVENT = 'tryChangeScreenMode';
|
||||
export const SCREEN_MODE_DESKTOP_MIN_WIDTH = 940;
|
||||
export const SCREEN_MODE_DESKTOP_MEDIA_QUERY = `(min-width: ${SCREEN_MODE_DESKTOP_MIN_WIDTH}px)`;
|
||||
export const SCREEN_MODE_MOBILE_MEDIA_QUERY = `(max-width: ${SCREEN_MODE_DESKTOP_MIN_WIDTH - 0.02}px)`;
|
||||
|
||||
export type ScreenMode = 'auto' | '500px' | '1000px';
|
||||
|
||||
|
||||
@@ -37,11 +37,12 @@ import {
|
||||
MOBILE_MAIN_PANEL_ORDER_STORAGE_KEY,
|
||||
type MobileMainPanelId,
|
||||
} from '../utils/mobileMainPanelOrder';
|
||||
import { SCREEN_MODE_MOBILE_MEDIA_QUERY } from '../utils/screenModeViewport';
|
||||
|
||||
const session = useSessionStore();
|
||||
const dashboard = useMainDashboardStore();
|
||||
const { info: showInfoToast } = useGameFeedback();
|
||||
const isMobile = useMediaQuery('(max-width: 939.98px)');
|
||||
const isMobile = useMediaQuery(SCREEN_MODE_MOBILE_MEDIA_QUERY);
|
||||
|
||||
const npcMode = ref(0);
|
||||
const globalNavigation = ref<MainNavigationEntry[]>(defaultGlobalNavigation);
|
||||
|
||||
Reference in New Issue
Block a user