Рефакторинг, работа над хоткеями
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<div class="item row" v-for="item in toolButtons" :key="item.name">
|
||||
<div class="label-3"></div>
|
||||
<div class="col row">
|
||||
<q-checkbox size="xs" @input="changeShowToolButton(item.name)" :value="showToolButton[item.name]" :label="item.text" />
|
||||
<q-checkbox size="xs" @input="changeShowToolButton(item.name)" :value="showToolButton[item.name]" :label="rstore.readerActions[item.name]" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,3 +6,8 @@
|
||||
<q-checkbox size="xs" v-model="clickControl" label="Включить управление кликом" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item row">
|
||||
<div class="label-4"></div>
|
||||
<q-btn class="button" dense no-caps @click="addHotKeyCode">{{ testCode }}</q-btn>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user