fix(frontend): restore legacy viewport geometry
This commit is contained in:
@@ -6,7 +6,11 @@ import { fileURLToPath } from 'node:url';
|
||||
const response = (data: unknown) => ({ result: { data } });
|
||||
const artifactRoot = process.env.CITY_PARITY_ARTIFACT_DIR;
|
||||
const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..');
|
||||
const imageRoots = [resolve(repositoryRoot, '../image'), resolve(repositoryRoot, '../../image')];
|
||||
const imageRoots = [
|
||||
...(process.env.FRONTEND_PARITY_IMAGE_ROOT ? [resolve(process.env.FRONTEND_PARITY_IMAGE_ROOT)] : []),
|
||||
resolve(repositoryRoot, '../image'),
|
||||
resolve(repositoryRoot, '../../image'),
|
||||
];
|
||||
const readImage = async (relativePath: string): Promise<Buffer> => {
|
||||
if (relativePath.includes('..')) throw new Error(`Unsafe fixture image path: ${relativePath}`);
|
||||
for (const root of imageRoots) {
|
||||
@@ -126,10 +130,25 @@ const install = async (page: Page, mode: 'member' | 'wanderer' | 'admin' = 'memb
|
||||
if (operation === 'general.me') return response(generalContext);
|
||||
if (operation === 'world.getMap') return response(map);
|
||||
if (operation === 'turns.getCommandTable') return response({ general: [], nation: [] });
|
||||
if (operation === 'turns.reserved.getGeneral') return response([]);
|
||||
if (operation === 'turns.reserved.getGeneral' || operation === 'turns.reserved.getNation') {
|
||||
return response({ turns: [], revision: 0 });
|
||||
}
|
||||
if (operation === 'messages.getRecent') return response(emptyMessages);
|
||||
if (operation === 'messages.getContacts') return response({ nation: [] });
|
||||
if (operation === 'general.getRecentRecords')
|
||||
return response({ global: [], general: [], history: [] });
|
||||
if (operation === 'general.getFrontStatus')
|
||||
return response({
|
||||
onlineUserCount: 1,
|
||||
onlineNations: '아국(1)',
|
||||
onlineGenerals: '장수',
|
||||
nationNotice: '',
|
||||
lastExecuted: null,
|
||||
latestVote: null,
|
||||
});
|
||||
if (operation === 'board.getAccess') return response({ canMeeting: false, canSecret: false });
|
||||
if (operation === 'tournament.getState') return response({ stage: 0 });
|
||||
if (operation === 'public.recordAccess') return response({ recorded: true });
|
||||
if (operation === 'nation.getNationInfo')
|
||||
return response({
|
||||
nation: {
|
||||
|
||||
@@ -361,7 +361,7 @@ const generalImage = (general: General) => {
|
||||
margin: 1em 0;
|
||||
}
|
||||
.back-row {
|
||||
margin-top: 14px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.stats {
|
||||
margin-top: 0;
|
||||
|
||||
@@ -20,7 +20,7 @@ import { trpc } from '../utils/trpc';
|
||||
|
||||
const session = useSessionStore();
|
||||
const dashboard = useMainDashboardStore();
|
||||
const isMobile = useMediaQuery('(max-width: 991px)');
|
||||
const isMobile = useMediaQuery('(max-width: 1024px)');
|
||||
|
||||
const mobileTabs = [
|
||||
{ key: 'map', label: '지도' },
|
||||
|
||||
@@ -33,8 +33,10 @@ pnpm test:e2e:frontend-legacy
|
||||
|
||||
When another worktree occupies the default ports, set
|
||||
`FRONTEND_PARITY_GATEWAY_PORT`, `FRONTEND_PARITY_GAME_PORT`, and
|
||||
`FRONTEND_PARITY_GAME_URL`. `FRONTEND_PARITY_ARTIFACT_DIR` retains the
|
||||
tournament and betting screenshots.
|
||||
`FRONTEND_PARITY_GAME_URL`. If the core2026 worktree is outside the workspace
|
||||
that owns `image/`, set `FRONTEND_PARITY_IMAGE_ROOT` to that ignored image
|
||||
checkout. `FRONTEND_PARITY_ARTIFACT_DIR` retains the tournament and betting
|
||||
screenshots.
|
||||
|
||||
Run the focused simulator fixture with:
|
||||
|
||||
|
||||
@@ -7,7 +7,11 @@ import { generateKeyPairSync } from 'node:crypto';
|
||||
import { canonicalFrontendFixture as fixture } from './fixtures/canonical';
|
||||
|
||||
const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
|
||||
const imageRoots = [resolve(repositoryRoot, '../image'), resolve(repositoryRoot, '../../image')];
|
||||
const imageRoots = [
|
||||
...(process.env.FRONTEND_PARITY_IMAGE_ROOT ? [resolve(process.env.FRONTEND_PARITY_IMAGE_ROOT)] : []),
|
||||
resolve(repositoryRoot, '../image'),
|
||||
resolve(repositoryRoot, '../../image'),
|
||||
];
|
||||
const artifactRoot = process.env.FRONTEND_PARITY_ARTIFACT_DIR;
|
||||
const passwordPublicKey = generateKeyPairSync('rsa', {
|
||||
modulusLength: 2048,
|
||||
|
||||
Reference in New Issue
Block a user