feat: GlobalMenu API
- GlobalMenu 작성용 DTO(MenuItem, MenuMulti, MenuSplit) - d_setting에 GlobalMenu를 직접 작성 가능하도록 제공
This commit is contained in:
@@ -28,6 +28,7 @@ import type {
|
||||
GetDiplomacyResponse,
|
||||
GetFrontInfoResponse,
|
||||
GetHistoryResponse,
|
||||
GetMenuResponse,
|
||||
GetRecentRecordResponse,
|
||||
} from "./defs/API/Global";
|
||||
import type { CachedMapResult, CommandTableResponse, GeneralListResponse, ItemTypeKey, MapResult } from "./defs";
|
||||
@@ -158,6 +159,7 @@ const apiRealPath = {
|
||||
lastGeneralRecordID: number;
|
||||
lastWorldHistoryID: number;
|
||||
} | undefined, GetRecentRecordResponse>,
|
||||
GetGlobalMenu: GET as APICallT<undefined, GetMenuResponse>,
|
||||
},
|
||||
InheritAction: {
|
||||
BuyHiddenBuff: PUT as APICallT<{
|
||||
|
||||
@@ -218,3 +218,29 @@ export type GetFrontInfoResponse = {
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
export type MenuItem = {
|
||||
type: 'item';
|
||||
name: string;
|
||||
url: string;
|
||||
icon?: string;
|
||||
newTab?: boolean;
|
||||
condHightlightVar?: string;
|
||||
condShowVar?: string;
|
||||
}
|
||||
|
||||
export type MenuSplit = {
|
||||
type: 'split';
|
||||
main: MenuItem;
|
||||
subMenu: MenuItem[];
|
||||
}
|
||||
|
||||
export type MenuMulti = {
|
||||
type: 'multi';
|
||||
subMenu: MenuItem[];
|
||||
}
|
||||
|
||||
export type GetMenuResponse = {
|
||||
result: true;
|
||||
menu: (MenuItem | MenuSplit | MenuMulti)[];
|
||||
}
|
||||
Reference in New Issue
Block a user