feat: 사령부에서 다른 수뇌의 턴을 '복사하기' 기능

This commit is contained in:
2022-03-26 23:09:19 +09:00
parent 47a20cf550
commit c7bd18f307
6 changed files with 167 additions and 85 deletions
+3 -7
View File
@@ -289,7 +289,7 @@ toggleTurn(...$event);
<script lang="ts" setup>
import addMinutes from "date-fns/esm/addMinutes";
import { stringifyUrl } from "query-string";
import { defineProps, defineEmits, defineExpose, onMounted, ref, watch, type PropType } from "vue";
import { defineProps, defineEmits, defineExpose, onMounted, ref, watch, type PropType, inject } from "vue";
import { formatTime } from "@util/formatTime";
import { joinYearMonth } from "@util/joinYearMonth";
import { mb_strwidth } from "@util/mb_strwidth";
@@ -303,7 +303,7 @@ import { SammoAPI } from "@/SammoAPI";
import type { ChiefResponse, CommandItem, TurnObj } from "@/defs";
import { QueryActionHelper } from "@/util/QueryActionHelper";
import type { Args } from "@/processing/args";
import { StoredActionsHelper } from "@/util/StoredActionsHelper";
import type { StoredActionsHelper } from "@/util/StoredActionsHelper";
import { getNpcColor } from "@/common_legacy";
import { BButton, BDropdownItem, BDropdownText, BButtonGroup, BDropdownDivider, BDropdown } from "bootstrap-vue-3";
import addMilliseconds from "date-fns/addMilliseconds";
@@ -319,10 +319,6 @@ type TurnObjWithTime = TurnObj & {
};
const props = defineProps({
serverNick: VueTypes.string.isRequired,
mapName: VueTypes.string.isRequired,
unitSet: VueTypes.string.isRequired,
maxTurn: VueTypes.integer.isRequired,
maxPushTurn: VueTypes.integer.isRequired,
date: VueTypes.string.isRequired,
@@ -613,7 +609,7 @@ function chooseCommand(val?: string) {
const emptyTurnObj: TurnObj = { action: '휴식', brief: '휴식', arg: {} };
const storedActionsHelper = new StoredActionsHelper(props.serverNick, 'nation', props.mapName, props.unitSet);
const storedActionsHelper = inject('storedNationActionsHelper') as StoredActionsHelper;
const recentActions = storedActionsHelper.recentActions;
const storedActions = storedActionsHelper.storedActions;
+1 -1
View File
@@ -156,7 +156,7 @@ export default defineComponent({
document.addEventListener("touchmove", touchMove);
box.style.top = start.y + "px";
box.style.left = start.x + "px";
uContainer.prepend(box);
uContainer.append(box);
intersection();
isMine = true;
emit("dragStart");