From 9244062989215d5a81966c214b29431816956f7c Mon Sep 17 00:00:00 2001 From: Hide_D Date: Thu, 29 Jan 2026 17:49:27 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=8B=A4=EC=9D=8C=20=EC=8B=9C=EC=A6=8C?= =?UTF-8?q?=20=EB=B2=88=ED=98=B8=20=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20=EB=B0=8F=20=ED=94=84=EB=A1=9C=ED=95=84=20=EB=A9=94=ED=83=80?= =?UTF-8?q?=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gateway-api/src/adminRouter.ts | 1 + app/gateway-frontend/src/views/AdminView.vue | 26 ++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/app/gateway-api/src/adminRouter.ts b/app/gateway-api/src/adminRouter.ts index c0d40d22..a86fb2d2 100644 --- a/app/gateway-api/src/adminRouter.ts +++ b/app/gateway-api/src/adminRouter.ts @@ -650,6 +650,7 @@ export const adminRouter = router({ color: z.string().min(1).max(32).nullable().optional(), inGameNotice: z.string().max(4000).nullable().optional(), profileImageUrl: z.string().max(2048).nullable().optional(), + nextSeasonIdx: z.number().int().min(0).nullable().optional(), }), }) ) diff --git a/app/gateway-frontend/src/views/AdminView.vue b/app/gateway-frontend/src/views/AdminView.vue index a61fcfb7..2b9fe6bf 100644 --- a/app/gateway-frontend/src/views/AdminView.vue +++ b/app/gateway-frontend/src/views/AdminView.vue @@ -204,6 +204,7 @@ type AdminClient = { color?: string | null; inGameNotice?: string | null; profileImageUrl?: string | null; + nextSeasonIdx?: number | null; }; }) => Promise; }; @@ -279,6 +280,7 @@ const profileEdits = ref< color: string; inGameNotice: string; profileImageUrl: string; + nextSeasonIdx: string; } > >({}); @@ -398,6 +400,10 @@ const ensureProfileBuffers = (profile: AdminProfile) => { color: String(meta.color ?? '#ffffff'), inGameNotice: String(meta.inGameNotice ?? ''), profileImageUrl: String(meta.profileImageUrl ?? ''), + nextSeasonIdx: + typeof meta.nextSeasonIdx === 'number' && Number.isFinite(meta.nextSeasonIdx) + ? String(Math.floor(meta.nextSeasonIdx)) + : '', }; } if (!profileActions.value[profile.profileName]) { @@ -624,11 +630,21 @@ const updateProfileMeta = async (profileName: string) => { if (!edit) { return; } + const nextSeasonRaw = edit.nextSeasonIdx.trim(); + const nextSeasonIdx = nextSeasonRaw === '' ? null : Number(nextSeasonRaw); + if (nextSeasonIdx !== null && (!Number.isFinite(nextSeasonIdx) || nextSeasonIdx < 0)) { + profileActionStatus.value = { + ...profileActionStatus.value, + [profileName]: '다음 시즌 번호는 0 이상 숫자여야 합니다.', + }; + return; + } const patch = { korName: edit.korName.trim() || null, color: edit.color.trim() || null, inGameNotice: edit.inGameNotice.trim() || null, profileImageUrl: edit.profileImageUrl.trim() || null, + nextSeasonIdx: nextSeasonIdx === null ? null : Math.floor(nextSeasonIdx), }; try { const updated = await adminClient.profiles.updateMeta.mutate({ @@ -1372,6 +1388,16 @@ onMounted(() => { type="text" class="w-full bg-zinc-950 border border-zinc-700 rounded px-3 py-2 text-sm text-white" /> + + +
리셋 시 적용할 시즌 번호를 지정합니다.