fix: 복구 2배속 베팅 마감을 게임 시각으로 판정
This commit is contained in:
@@ -63,6 +63,8 @@ export const clockSampleIsStale = (): boolean =>
|
||||
const projection = computed(() =>
|
||||
sample.value ? projectServerClock(sample.value, haltedAt.value ?? now.value) : null
|
||||
);
|
||||
// 마감 판정은 표시 모드와 무관하게 서버가 투영한 GAME 시각을 사용한다.
|
||||
const gameTime = computed(() => projection.value?.time ?? null);
|
||||
const accelerated = computed(() => projection.value?.rate === 2 && engineRunning.value !== false);
|
||||
const label = computed(() => (mode.value === 'real' ? '실제 시간 기준' : '게임 시간 기준'));
|
||||
const time = computed(() => {
|
||||
@@ -90,6 +92,7 @@ export const useClockDisplay = () => ({
|
||||
mode,
|
||||
label,
|
||||
time,
|
||||
gameTime,
|
||||
accelerated,
|
||||
toggle,
|
||||
projectTime,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { usePageExit } from '../composables/usePageExit';
|
||||
|
||||
import { useClockDisplay } from '../composables/useClockDisplay';
|
||||
const { formatTime: formatGameTime } = useClockDisplay();
|
||||
const { formatTime: formatGameTime, gameTime } = useClockDisplay();
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue';
|
||||
import TournamentBracket from '../components/tournament/TournamentBracket.vue';
|
||||
@@ -62,7 +62,7 @@ const bettingOpen = computed(() => {
|
||||
const state = snapshot.value?.state;
|
||||
if (!state || state.stage !== 6) return false;
|
||||
if (!state.bettingCloseAt) return true;
|
||||
return new Date(state.bettingCloseAt).getTime() > Date.now();
|
||||
return gameTime.value !== null && new Date(state.bettingCloseAt).getTime() > gameTime.value.getTime();
|
||||
});
|
||||
|
||||
const placeBet = async (target: TournamentBracketSlot) => {
|
||||
|
||||
Reference in New Issue
Block a user