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
|
|
|
|
2019-07-05 03:19:24 +08:00
|
|
|
import { view, ViewType, settingsMenuKeysHandler } from 'Knoin/Knoin';
|
|
|
|
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
@view({
|
|
|
|
name: 'View/Admin/Settings/Menu',
|
|
|
|
type: ViewType.Left,
|
|
|
|
templateID: 'AdminMenu'
|
|
|
|
})
|
2019-07-05 03:19:24 +08:00
|
|
|
class MenuSettingsAdminView extends AbstractViewNext {
|
2016-08-17 06:01:20 +08:00
|
|
|
/**
|
|
|
|
* @param {?} screen
|
|
|
|
*/
|
|
|
|
constructor(screen) {
|
|
|
|
super();
|
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 06:02:29 +08:00
|
|
|
shortcuts.add(['arrowup','arrowdown'], '', KeyState.Settings,
|
|
|
|
settingsMenuKeysHandler(dom.querySelectorAll('.b-admin-menu .e-item')));
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2019-07-05 03:19:24 +08:00
|
|
|
export { MenuSettingsAdminView, MenuSettingsAdminView as default };
|