2019-07-05 03:19:24 +08:00
|
|
|
import { leftPanelDisabled } from 'Common/Globals';
|
|
|
|
import { KeyState } from 'Common/Enums';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-01-24 17:25:23 +08:00
|
|
|
import { settingsMenuKeysHandler } from 'Knoin/Knoin';
|
|
|
|
import { AbstractViewLeft } from 'Knoin/AbstractViews';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-01-24 17:25:23 +08:00
|
|
|
class MenuSettingsAdminView extends AbstractViewLeft {
|
2016-08-17 06:01:20 +08:00
|
|
|
/**
|
|
|
|
* @param {?} screen
|
|
|
|
*/
|
|
|
|
constructor(screen) {
|
2021-01-24 17:25:23 +08:00
|
|
|
super('Admin/Settings/Menu', 'AdminMenu');
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
this.leftPanelDisabled = leftPanelDisabled;
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
this.menu = screen.menu;
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
link(route) {
|
|
|
|
return '#/' + route;
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
onBuild(dom) {
|
2020-09-26 16:20:24 +08:00
|
|
|
shortcuts.add('arrowup,arrowdown', '', KeyState.Settings,
|
2020-09-26 06:02:29 +08:00
|
|
|
settingsMenuKeysHandler(dom.querySelectorAll('.b-admin-menu .e-item')));
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-01-22 23:32:08 +08:00
|
|
|
export { MenuSettingsAdminView };
|