Рефакторинг, работа над хоткеями

This commit is contained in:
Book Pauk
2020-03-15 20:58:06 +07:00
parent 8f6201b0f7
commit 2db8876c66
6 changed files with 76 additions and 32 deletions

View File

@@ -152,12 +152,15 @@ class SettingsPage extends Vue {
serverStorageKeyVisible = false;
toolButtons = [];
rstore = {};
testCode = 'Добавить сочетание';
created() {
this.commit = this.$store.commit;
this.reader = this.$store.state.reader;
this.form = {};
this.rstore = rstore;
this.toolButtons = rstore.toolButtons;
this.settingsChanged();
}
@@ -359,6 +362,17 @@ class SettingsPage extends Vue {
this.showToolButton = Object.assign({}, this.showToolButton, {[buttonName]: !this.showToolButton[buttonName]});
}
async addHotKeyCode() {
try {
const result = await this.$root.stdDialog.getHotKey('Нажмите сочетание клавиш:', '');
if (result) {
this.testCode = result;
}
} catch (e) {
//
}
}
async addProfile() {
try {
if (Object.keys(this.profiles).length >= 100) {