feat: 메인 화면에 정식 기수 표시

This commit is contained in:
2026-08-20 16:22:05 +00:00
parent b3b6be7a16
commit daa96b79aa
10 changed files with 173 additions and 8 deletions
+1
View File
@@ -44,6 +44,7 @@ export type WorldStateConfig = z.infer<typeof zWorldStateConfig>;
export const zWorldStateMeta = z.object({
serverId: z.string().optional(),
gameIdx: z.number().int().positive().optional(),
starttime: z.string().optional(),
opentime: z.string().optional(),
preopenAt: z.string().optional(),
+2
View File
@@ -53,6 +53,8 @@ export const lobbyRouter = router({
return {
serverId: worldState.meta.serverId?.trim() || ctx.profile?.name || 'game',
profile: ctx.profile.id,
gameIdx: worldState.meta.gameIdx ?? 1,
year: worldState.currentYear,
month: worldState.currentMonth,
userCnt,
+4
View File
@@ -15,6 +15,7 @@ const buildContext = (
): GameApiContext =>
({
auth: null,
profile: { id: 'che', scenario: 'default', name: 'che:default' },
db: {
worldState: {
findFirst: vi.fn(async () => ({
@@ -75,6 +76,7 @@ describe('lobby season state', () => {
buildContext(
{
serverId: 'che_260819_season',
gameIdx: 101,
preopenAt: '2026-08-19 22:00:00',
opentime: '2026-08-19 23:00:00',
scenarioMeta: { title: '【가상모드27-b】 아시아 명장전(비급)' },
@@ -103,6 +105,8 @@ describe('lobby season state', () => {
expect(result).toMatchObject({
serverId: 'che_260819_season',
profile: 'che',
gameIdx: 101,
preopenAt: '2026-08-19 22:00:00',
opentime: '2026-08-19 23:00:00',
scenarioTitle: '【가상모드27-b】 아시아 명장전(비급)',