fix(gateway): 일시정지 프로필을 로비에 표시

This commit is contained in:
2026-08-15 16:37:01 +00:00
parent 9eabf3003a
commit 3a6ef36d01
5 changed files with 79 additions and 17 deletions
+4 -3
View File
@@ -19,6 +19,7 @@ type LobbyProfile = GatewayOutput['lobby']['profiles'][number];
type LobbyInfo = GameOutput['lobby']['info'];
type PublicMap = GameOutput['public']['getCachedMap'];
type PublicMapLayout = GameOutput['public']['getMapLayout'];
const PROFILE_PUBLIC_STATUS_ORDER: LobbyProfile['status'][] = ['RUNNING', 'PREOPEN', 'PAUSED', 'COMPLETED'];
const router = useRouter();
const username = ref('');
@@ -52,9 +53,9 @@ const loadPublicStatus = async (): Promise<void> => {
try {
const profiles = await trpc.lobby.profiles.query();
profile.value =
profiles.find((entry) => entry.status === 'RUNNING') ??
profiles.find((entry) => entry.status === 'PREOPEN') ??
null;
PROFILE_PUBLIC_STATUS_ORDER.map((status) => profiles.find((entry) => entry.status === status)).find(
(entry) => entry !== undefined
) ?? null;
if (!profile.value) {
statusError.value = '현재 공개 중인 서버가 없습니다.';
return;