Add `GroupMenu` (#102)

This commit is contained in:
Piotr Rogowski 2022-09-26 16:59:09 +02:00 committed by GitHub
parent 43879b58db
commit 3ea78650a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 291 additions and 356 deletions

629
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@
},
"devDependencies": {
"@hyper-tuner/eslint-config": "^0.1.6",
"@types/node": "^18.7.18",
"@types/node": "^18.7.22",
"eslint-plugin-modules-newline": "^0.0.6",
"eslint-plugin-prettier": "^4.2.1",
"typescript": "^4.8.3"

View File

@ -37,16 +37,30 @@ export interface Dialogs {
[name: string]: Dialog;
}
export interface GroupChildMenu {
title: string;
condition: string;
}
export interface SubMenu {
type: 'subMenu',
title: string;
page: number;
condition: string;
}
export interface GroupMenu {
type: 'groupMenu',
title: string;
groupChildMenus: {
[name: string]: GroupChildMenu;
};
}
export interface Menu {
title: string;
subMenus: {
[name: string]: SubMenu;
[name: string]: SubMenu | GroupMenu;
};
}