misc: 기본 커맨드 검색모드 끔
This commit is contained in:
@@ -133,9 +133,9 @@
|
|||||||
<div class="row gx-0">
|
<div class="row gx-0">
|
||||||
<div class="col-2 d-grid">
|
<div class="col-2 d-grid">
|
||||||
<b-button
|
<b-button
|
||||||
:pressed="searchMode"
|
:pressed="searchModeOn"
|
||||||
@click="searchCommand()"
|
@click="toggleSearchCommand()"
|
||||||
:variant="searchMode ? 'info' : 'primary'"
|
:variant="searchModeOn ? 'info' : 'primary'"
|
||||||
v-b-tooltip.hover
|
v-b-tooltip.hover
|
||||||
title="검색 기능을 활성화합니다."
|
title="검색 기능을 활성화합니다."
|
||||||
><i class="bi bi-search"></i
|
><i class="bi bi-search"></i
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
deselectGroupLabel=""
|
deselectGroupLabel=""
|
||||||
placeholder="턴 선택"
|
placeholder="턴 선택"
|
||||||
:maxHeight="400"
|
:maxHeight="400"
|
||||||
:searchable="searchMode"
|
:searchable="searchModeOn"
|
||||||
>
|
>
|
||||||
<template v-slot:noResult>검색 결과가 없습니다.</template>
|
<template v-slot:noResult>검색 결과가 없습니다.</template>
|
||||||
<template v-slot:option="props"
|
<template v-slot:option="props"
|
||||||
@@ -284,7 +284,7 @@ function isDropdownChildren(e?: Event): boolean {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchModeKey = `sammo_${serverID}_searchMode`;
|
const searchModeKey = `sammo_searchModeOn`;
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "PartialReservedCommand",
|
name: "PartialReservedCommand",
|
||||||
@@ -478,10 +478,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
await this.reloadCommandList();
|
await this.reloadCommandList();
|
||||||
},
|
},
|
||||||
searchCommand() {
|
toggleSearchCommand() {
|
||||||
const searchMode = !this.searchMode;
|
const searchModeOn = !this.searchModeOn;
|
||||||
this.searchMode = searchMode;
|
this.searchModeOn = searchModeOn;
|
||||||
localStorage.setItem(searchModeKey, searchMode ? "1" : "0");
|
localStorage.setItem(searchModeKey, searchModeOn ? "1" : "0");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -507,7 +507,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchMode = (localStorage.getItem(searchModeKey) ?? "1") != "0";
|
const searchModeOn = (localStorage.getItem(searchModeKey) ?? "0") != "0";
|
||||||
|
|
||||||
const emptyTurn: TurnObjWithTime[] = Array.from<TurnObjWithTime>({
|
const emptyTurn: TurnObjWithTime[] = Array.from<TurnObjWithTime>({
|
||||||
length: maxTurn,
|
length: maxTurn,
|
||||||
@@ -536,7 +536,7 @@ export default defineComponent({
|
|||||||
selectedCommand,
|
selectedCommand,
|
||||||
reservedCommandList: emptyTurn,
|
reservedCommandList: emptyTurn,
|
||||||
autorun_limit: null as null | number,
|
autorun_limit: null as null | number,
|
||||||
searchMode,
|
searchModeOn,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
Reference in New Issue
Block a user