From de81a402de468695c6cd969164ac1157fa5439b1 Mon Sep 17 00:00:00 2001 From: hided62 Date: Wed, 19 Aug 2026 06:09:54 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20RESET=20=EC=9E=90=EB=8F=99=ED=84=B4=20?= =?UTF-8?q?=EA=B3=A0=EA=B8=89=20=EC=A7=95=EB=B3=91=EA=B3=BC=20=EC=A4=91?= =?UTF-8?q?=EC=8B=A0=20=EC=98=B5=EC=85=98=20=EB=B3=B4=EC=A1=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../e2e/server-operations.spec.ts | 6 +++-- .../src/views/ServerOperationsView.vue | 27 +++++++++++++++++-- docs/admin-console.md | 2 ++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/app/gateway-frontend/e2e/server-operations.spec.ts b/app/gateway-frontend/e2e/server-operations.spec.ts index 7a98f76d..911b5c2b 100644 --- a/app/gateway-frontend/e2e/server-operations.spec.ts +++ b/app/gateway-frontend/e2e/server-operations.spec.ts @@ -955,7 +955,7 @@ test('loads server metadata defaults into the reset form and submits them', asyn showImgLevel: 1, tournamentTrig: false, joinMode: 'onlyRandom', - autorunUser: { limitMinutes: 720, options: ['develop', 'train'] }, + autorunUser: { limitMinutes: 720, options: ['develop', 'recruit_high', 'chief'] }, }, }; await installFixture(page, state); @@ -966,6 +966,8 @@ test('loads server metadata defaults into the reset form and submits them', asyn await page.getByText('고급 시나리오 옵션').click(); await expect(page.getByTestId('reset-defaults-source')).toContainText('서버의 메타'); await expect(page.getByTestId('reset-npc-mode')).toHaveValue('1'); + await expect(page.getByTestId('reset-autorun-recruit-high')).toBeChecked(); + await expect(page.getByTestId('reset-autorun-chief')).toBeChecked(); await page.getByTestId('request-reset').click(); await expect @@ -978,7 +980,7 @@ test('loads server metadata defaults into the reset form and submits them', asyn expect(request).toContain('"npcMode":1'); expect(request).toContain('"joinMode":"onlyRandom"'); expect(request).toContain('"limitMinutes":720'); - expect(request).toContain('"options":["develop","train"]'); + expect(request).toContain('"options":["develop","recruit_high","chief"]'); }); test('edits server reset defaults through profile metadata settings', async ({ page }, testInfo) => { diff --git a/app/gateway-frontend/src/views/ServerOperationsView.vue b/app/gateway-frontend/src/views/ServerOperationsView.vue index 8475bea0..b28c780f 100644 --- a/app/gateway-frontend/src/views/ServerOperationsView.vue +++ b/app/gateway-frontend/src/views/ServerOperationsView.vue @@ -9,6 +9,7 @@ import { normalizeProfileResetDefaults, SYSTEM_PROFILE_RESET_DEFAULTS, type ProfileResetDefaults, + type ResetAutorunOption, } from '../utils/resetDefaults'; import { directTrpc, trpc } from '../utils/trpc'; @@ -140,8 +141,10 @@ const form = reactive({ autorunDevelop: true, autorunWarp: true, autorunRecruit: true, + autorunRecruitHigh: true, autorunTrain: true, autorunBattle: true, + autorunChief: true, openAt: '', preopenAt: '', scheduledAt: '', @@ -259,8 +262,10 @@ const applyResetDefaults = (defaults: ProfileResetDefaults) => { form.autorunDevelop = autorunOptions.has('develop'); form.autorunWarp = autorunOptions.has('warp'); form.autorunRecruit = autorunOptions.has('recruit'); + form.autorunRecruitHigh = autorunOptions.has('recruit_high'); form.autorunTrain = autorunOptions.has('train'); form.autorunBattle = autorunOptions.has('battle'); + form.autorunChief = autorunOptions.has('chief'); }; const loadResetDefaults = async () => { @@ -569,13 +574,15 @@ const loadScenarios = async () => { } }; -const selectedAutorunOptions = (): Array<'develop' | 'warp' | 'recruit' | 'train' | 'battle'> => { - const options: Array<'develop' | 'warp' | 'recruit' | 'train' | 'battle'> = []; +const selectedAutorunOptions = (): ResetAutorunOption[] => { + const options: ResetAutorunOption[] = []; if (form.autorunDevelop) options.push('develop'); if (form.autorunWarp) options.push('warp'); if (form.autorunRecruit) options.push('recruit'); + if (form.autorunRecruitHigh) options.push('recruit_high'); if (form.autorunTrain) options.push('train'); if (form.autorunBattle) options.push('battle'); + if (form.autorunChief) options.push('chief'); return options; }; @@ -1101,8 +1108,24 @@ onBeforeUnmount(() => { + + diff --git a/docs/admin-console.md b/docs/admin-console.md index 0374a1ea..eeb26f28 100644 --- a/docs/admin-console.md +++ b/docs/admin-console.md @@ -71,6 +71,8 @@ Gateway 관리자 콘솔은 `/gateway/admin`에서 시작합니다. 공개 로 턴 간격, 동기화, 가상 장수, 연장, 가입 방식, 장수 생성 제한, NPC, 이미지, 토너먼트와 유저 자동턴 기본값을 저장합니다. 시나리오 초기화 화면은 대상 서버를 URL에서 결정한 뒤 이 메타를 별도 권한 검사로 읽어 폼에 적용합니다. + 유저 자동턴은 내정, 이동, 징병, 고급 징병, 훈련, 전투, 중신의 7개 동작을 + 각각 보존해 RESET payload로 전달합니다. 메타가 없거나 유효하지 않으면 기존 시스템 기본값을 사용합니다. 시나리오와 예약·가오픈·정식 오픈 시각은 매 실행마다 선택하므로 서버 기본값에 포함하지 않습니다.