import server from "../../../services/server.js";
import utils from "../../../services/utils.js";
import dialogService from "../../dialog.js";
import OptionsTab from "./options_tab.js";
const TPL = `
Keyboard shortcuts
Multiple shortcuts for the same action can be separated by comma.
Action name
Shortcuts
Default shortcuts
Description
`;
let globActions;
export default class KeyboardShortcutsOptions extends OptionsTab {
get tabTitle() { return "Shortcuts" }
lazyRender() {
this.$widget = $(TPL);
this.$widget.find("#options-keyboard-shortcuts-reload-app").on("click", () => utils.reloadFrontendApp());
const $table = this.$widget.find("#keyboard-shortcut-table tbody");
server.get('keyboard-actions').then(actions => {
globActions = actions;
for (const action of actions) {
const $tr = $("