fix(frontend): show next turn seconds in command clock

This commit is contained in:
2026-08-15 04:18:58 +00:00
parent 328ebf9887
commit d249ee121a
3 changed files with 62 additions and 10 deletions
@@ -44,7 +44,7 @@ const props = withDefaults(
mobile: false,
title: '',
name: null,
currentTime: '--:--',
currentTime: '--:--:--',
mapData: null,
mapLayout: null,
}
@@ -333,7 +333,7 @@ const clickOutsideMenu = (event: Event) => {
><span>{{ props.title }}</span>
</div>
<button type="button" @click="editMode = !editMode">{{ editMode ? '일반 모드' : '고급 모드' }}</button>
<div class="clock">{{ props.currentTime }}</div>
<div class="clock" data-command-current-time>{{ props.currentTime }}</div>
<details class="legacy-menu">
<summary>반복</summary>
<div class="menu-items">
@@ -2,6 +2,7 @@
import { computed } from 'vue';
import { addMinutes } from 'date-fns';
import ReservedCommandEditor from '../command/ReservedCommandEditor.vue';
import { formatSeoulTimeSeconds } from '../../utils/legacyDateTime';
import type {
CommandMapData,
CommandMapLayout,
@@ -61,6 +62,10 @@ const rows = computed<ReservedCommandRow[]>(() => {
};
});
});
const currentTurnTime = computed(() =>
props.general?.turnTime ? formatSeoulTimeSeconds(props.general.turnTime) : '--:--:--'
);
</script>
<template>
@@ -70,7 +75,7 @@ const rows = computed<ReservedCommandRow[]>(() => {
:command-table="props.commandTable"
:loading="props.loading"
:storage-key="props.storageKey ?? `core2026:general:${props.general?.id ?? 0}`"
:current-time="rows[0]?.time"
:current-time="currentTurnTime"
:map-data="props.mapData"
:map-layout="props.mapLayout"
@reserve-bulk="emit('set-general-turns', $event)"