misc: storedActionHelper 저장 키에 map, unit 지정
This commit is contained in:
@@ -392,6 +392,8 @@ export default defineComponent({
|
||||
autorun_limit: undefined,
|
||||
officerLevel: undefined,
|
||||
commandList: undefined,
|
||||
mapName: undefined,
|
||||
unitSet: undefined,
|
||||
});
|
||||
|
||||
async function reloadTable(): Promise<void> {
|
||||
|
||||
@@ -223,6 +223,8 @@ export type ChiefResponse = {
|
||||
category: string;
|
||||
values: CommandItem[];
|
||||
}[];
|
||||
mapName: string,
|
||||
unitSet: string,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { TurnObj } from '@/defs';
|
||||
import { clone } from 'lodash';
|
||||
import { ref } from 'vue';
|
||||
|
||||
|
||||
@@ -9,9 +8,9 @@ export class StoredActionsHelper {
|
||||
public readonly recentActionsKey: string;
|
||||
public readonly storedActionsKey: string;
|
||||
|
||||
constructor(protected serverNick: string, protected type: 'general' | 'nation', protected maxRecent = 10) {
|
||||
this.recentActionsKey = `${serverNick}_${type}RecentActions`;
|
||||
this.storedActionsKey = `${serverNick}_${type}StoredActions`;
|
||||
constructor(protected serverNick: string, protected type: 'general' | 'nation', protected mapName: string, protected unitSet: string, protected maxRecent = 10) {
|
||||
this.recentActionsKey = `${serverNick}_${mapName}_${unitSet}_${type}RecentActions`;
|
||||
this.storedActionsKey = `${serverNick}_${mapName}_${unitSet}_${type}StoredActions`;
|
||||
this.loadRecentActions();
|
||||
this.loadStoredActions();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user