Окончание работы над хоткеями

This commit is contained in:
Book Pauk
2020-03-19 19:38:40 +07:00
parent e1b85e4a1b
commit 6f7ba1f9fc
3 changed files with 38 additions and 11 deletions

View File

@@ -43,8 +43,8 @@ const pages = {
const tabs = [ const tabs = [
['CommonHelpPage', 'Общее'], ['CommonHelpPage', 'Общее'],
['HotkeysHelpPage', 'Клавиатура'],
['MouseHelpPage', 'Мышь/тачскрин'], ['MouseHelpPage', 'Мышь/тачскрин'],
['HotkeysHelpPage', 'Клавиатура'],
['VersionHistoryPage', 'История версий'], ['VersionHistoryPage', 'История версий'],
['DonateHelpPage', 'Помочь проекту'], ['DonateHelpPage', 'Помочь проекту'],
]; ];

View File

@@ -1,8 +1,13 @@
<template> <template>
<div class="page"> <div class="page">
<span class="text-h6 text-bold">Управление с помощью горячих клавиш:</span> <div class="header">
<ul> <div class="text-h6 text-bold">Доступны следующие клавиатурные команды:</div>
</ul> <br>
</div>
<div class="table">
<div class="text-right text-italic" style="font-size: 80%">* Изменить сочетания клавиш можно в настройках</div>
<UserHotKeys v-model="userHotKeys" readonly/>
</div>
</div> </div>
</template> </template>
@@ -11,11 +16,25 @@
import Vue from 'vue'; import Vue from 'vue';
import Component from 'vue-class-component'; import Component from 'vue-class-component';
import UserHotKeys from '../../SettingsPage/UserHotKeys/UserHotKeys.vue';
export default @Component({ export default @Component({
components: {
UserHotKeys,
},
}) })
class HotkeysHelpPage extends Vue { class HotkeysHelpPage extends Vue {
created() { created() {
} }
get userHotKeys() {
return this.$store.state.reader.settings.userHotKeys;
}
set userHotKeys(value) {
//no setter
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
</script> </script>
@@ -24,7 +43,13 @@ class HotkeysHelpPage extends Vue {
.page { .page {
padding: 15px; padding: 15px;
overflow-y: auto; overflow-y: auto;
}
.header {
font-size: 120%; font-size: 120%;
line-height: 130%; }
.table {
width: 550px;
} }
</style> </style>

View File

@@ -4,13 +4,15 @@
<div class="table-row row"> <div class="table-row row">
<div class="desc q-pa-sm bg-green-4">Команда</div> <div class="desc q-pa-sm bg-green-4">Команда</div>
<div class="hotKeys col q-pa-sm bg-green-4 row no-wrap"> <div class="hotKeys col q-pa-sm bg-green-4 row no-wrap">
<span>Сочетание клавиш</span> <div style="width: 80px">Сочетание клавиш</div>
<q-input ref="input" outlined dense rounded bg-color="grey-4" <q-input ref="input" class="q-ml-sm col"
outlined dense rounded
bg-color="grey-4"
placeholder="Найти" placeholder="Найти"
v-model="search" v-model="search"
@click.stop @click.stop
/> />
<div class="q-ml-sm column justify-center"> <div v-show="!readonly" class="q-ml-sm column justify-center">
<q-btn class="bg-grey-4 text-grey-6" style="height: 35px; width: 35px" rounded flat icon="la la-broom" @click="defaultHotKeyAll"> <q-btn class="bg-grey-4 text-grey-6" style="height: 35px; width: 35px" rounded flat icon="la la-broom" @click="defaultHotKeyAll">
<q-tooltip :delay="1000" anchor="top middle" self="bottom middle" content-style="font-size: 80%"> <q-tooltip :delay="1000" anchor="top middle" self="bottom middle" content-style="font-size: 80%">
Установить все сочетания по умолчанию Установить все сочетания по умолчанию
@@ -26,14 +28,14 @@
<div class="hotKeys col q-pa-sm"> <div class="hotKeys col q-pa-sm">
<q-chip <q-chip
:color="collisions[code] ? 'red' : 'grey-7'" :color="collisions[code] ? 'red' : 'grey-7'"
removable :clickable="collisions[code] ? true : false" :removable="!readonly" :clickable="collisions[code] ? true : false"
text-color="white" v-for="(code, index) in value[action]" :key="index" @remove="removeCode(action, code)" text-color="white" v-for="(code, index) in value[action]" :key="index" @remove="removeCode(action, code)"
@click="collisionWarning(code)" @click="collisionWarning(code)"
> >
{{ code }} {{ code }}
</q-chip> </q-chip>
</div> </div>
<div class="column q-pa-xs"> <div v-show="!readonly" class="column q-pa-xs">
<q-icon <q-icon
name="la la-plus-circle" name="la la-plus-circle"
class="button bg-green-8 text-white" class="button bg-green-8 text-white"
@@ -71,7 +73,7 @@ import rstore from '../../../../store/modules/reader';
const UserHotKeysProps = Vue.extend({ const UserHotKeysProps = Vue.extend({
props: { props: {
value: Object, value: Object,
//prop: { type: Number, default: 0 }, readonly: Boolean,
} }
}); });