From e55c653e405f77ff3e492f9b50ddbbe1ae09d687 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sat, 12 Sep 2026 02:20:08 +0000 Subject: [PATCH] =?UTF-8?q?=EB=B2=A0=ED=8C=85=20=EA=B8=88=EC=95=A1=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=EC=9D=84=20=EC=9E=A5=EC=88=98=EB=B3=84?= =?UTF-8?q?=EB=A1=9C=20=EB=8F=85=EB=A6=BD=EC=8B=9C=ED=82=A4=EA=B3=A0=20?= =?UTF-8?q?=EA=B3=B5=EC=9A=A9=20=EC=84=A4=EC=A0=95=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../e2e/tournamentBracket.spec.ts | 8 +++-- app/game-frontend/src/views/BettingView.vue | 33 ++++--------------- 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/app/game-frontend/e2e/tournamentBracket.spec.ts b/app/game-frontend/e2e/tournamentBracket.spec.ts index add07a4d..82d8cb27 100644 --- a/app/game-frontend/e2e/tournamentBracket.spec.ts +++ b/app/game-frontend/e2e/tournamentBracket.spec.ts @@ -1106,14 +1106,16 @@ for (const width of [1365, 390]) { const second = bracket.locator('.betting-candidate').nth(1); const input = first.getByRole('spinbutton'); await expect(input).toHaveValue('10'); - await page.getByLabel('기본 지정 금액').selectOption('20'); - await expect(input).toHaveValue('20'); + await expect(page.locator('input[type=number]:visible')).toHaveCount(16); + await expect(page.getByRole('region', { name: '베팅 한도' }).getByRole('spinbutton')).toHaveCount(0); await first.getByRole('combobox').selectOption('50'); await expect(input).toHaveValue('50'); - await expect(second.getByRole('spinbutton')).toHaveValue('20'); + await expect(second.getByRole('spinbutton')).toHaveValue('10'); await input.fill('37'); + await second.getByRole('spinbutton').fill('23'); await page.getByRole('button', { name: '갱신', exact: true }).click(); await expect(input).toHaveValue('37'); + await expect(second.getByRole('spinbutton')).toHaveValue('23'); for (const invalid of ['', '9', '10.5', '841']) { await input.fill(invalid); await expect(first.getByRole('button', { name: '관우에게 베팅하기' })).toBeDisabled(); diff --git a/app/game-frontend/src/views/BettingView.vue b/app/game-frontend/src/views/BettingView.vue index a43c99a4..d640a1df 100644 --- a/app/game-frontend/src/views/BettingView.vue +++ b/app/game-frontend/src/views/BettingView.vue @@ -12,13 +12,12 @@ import { trpc } from '../utils/trpc'; const tournamentPages = useTournamentPagesStore(); const { snapshot, betting: summary, rankings, loading, error } = storeToRefs(tournamentPages); -const defaultAmount = ref(10); const amounts = ref>({}); const pendingBets = ref>({}); const betMessages = ref>({}); const presetAmounts = [10, 20, 50, 100, 200, 500, 1000]; const activeRankingPrefix = ref('tt'); -const amountFor = (id: number): number | string => amounts.value[id] ?? defaultAmount.value; +const amountFor = (id: number): number | string => amounts.value[id] ?? 10; const remainingAmount = computed(() => Math.max(0, 1000 - myAmount.value)); const availableAmount = computed(() => Math.max(0, remainingAmount.value - Object.values(pendingBets.value).reduce((sum, amount) => sum + amount, 0)) @@ -105,15 +104,7 @@ const placeBet = async (target: TournamentBracketSlot) => { (전체 금액 : {{ totalAmount }} / 내 투자 금액 : {{ myAmount }}) -
- - +
남은 한도 {{ remainingAmount.toLocaleString('ko-KR') }}금 각 장수에게 추가할 금액입니다. 예상 환수금은 해당 장수 우승 시 금액이며, 최종 배당에 따라 @@ -378,7 +369,7 @@ select:disabled { cursor: not-allowed; opacity: 0.5; } -.bet-settings { +.bet-budget { display: flex; flex-wrap: wrap; align-items: center; @@ -386,16 +377,7 @@ select:disabled { padding: 8px; text-align: left; } -.bet-settings label { - display: flex; - align-items: center; - gap: 8px; -} -.bet-settings input, -.bet-settings select { - width: 90px; -} -.bet-settings small { +.bet-budget small { flex-basis: 100%; color: #c9c1b2; } @@ -407,9 +389,7 @@ select:disabled { } .inline-bet input, .inline-bet select, -.inline-bet button, -.bet-settings input, -.bet-settings select { +.inline-bet button { box-sizing: border-box; min-width: 0; height: 44px; @@ -425,8 +405,7 @@ select:disabled { background: #59400e; font-weight: 700; } -.inline-bet input:focus-visible, -.bet-settings input:focus-visible { +.inline-bet input:focus-visible { outline: 2px solid #f39c12; outline-offset: 1px; }