mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 15:49:16 +02:00
Resolve "Add new keyboard shortcuts"
This commit is contained in:
parent
dc26da8874
commit
f4365f68c2
5 changed files with 137 additions and 27 deletions
|
@ -4,18 +4,36 @@
|
|||
<translate translate-context="*/*/*/Noun">Keyboard shortcuts</translate>
|
||||
</header>
|
||||
<section class="scrolling content">
|
||||
<table
|
||||
class="ui compact collapsing basic table"
|
||||
v-for="section in sections"
|
||||
:key="section.title">
|
||||
<caption>{{ section.title }}</caption>
|
||||
<tbody>
|
||||
<tr v-for="shortcut in section.shortcuts" :key="shortcut.summary">
|
||||
<td>{{ shortcut.summary }}</td>
|
||||
<td><span class="ui label">{{ shortcut.key }}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="ui stackable two column grid">
|
||||
<div class="column">
|
||||
<table
|
||||
class="ui compact basic table"
|
||||
v-for="section in player"
|
||||
:key="section.title">
|
||||
<caption>{{ section.title }}</caption>
|
||||
<tbody>
|
||||
<tr v-for="shortcut in section.shortcuts" :key="shortcut.summary">
|
||||
<td>{{ shortcut.summary }}</td>
|
||||
<td><span class="ui label">{{ shortcut.key }}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="column">
|
||||
<table
|
||||
class="ui compact basic table"
|
||||
v-for="section in general"
|
||||
:key="section.title">
|
||||
<caption>{{ section.title }}</caption>
|
||||
<tbody>
|
||||
<tr v-for="shortcut in section.shortcuts" :key="shortcut.summary">
|
||||
<td>{{ shortcut.summary }}</td>
|
||||
<td><span class="ui label">{{ shortcut.key }}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="actions">
|
||||
<div class="ui cancel button"><translate translate-context="Popup/Keyboard shortcuts/Button.Label/Verb">Close</translate></div>
|
||||
|
@ -32,7 +50,7 @@ export default {
|
|||
Modal,
|
||||
},
|
||||
computed: {
|
||||
sections () {
|
||||
general () {
|
||||
return [
|
||||
{
|
||||
title: this.$pgettext('Popup/Keyboard shortcuts/Title', 'General shortcuts'),
|
||||
|
@ -40,17 +58,36 @@ export default {
|
|||
{
|
||||
key: 'h',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Show available keyboard shortcuts')
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'shift + f',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Focus searchbar')
|
||||
},
|
||||
{
|
||||
key: 'esc',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Unfocus searchbar')
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
// space.prevent.exact="togglePlay"
|
||||
// ctrl.left.prevent.exact="previous"
|
||||
// ctrl.right.prevent.exact="next"
|
||||
// ctrl.down.prevent.exact="$store.commit('player/incrementVolume', -0.1)"
|
||||
// ctrl.up.prevent.exact="$store.commit('player/incrementVolume', 0.1)"
|
||||
// ctrl.shift.left.prevent.exact="previous"
|
||||
// ctrl.shift.right.prevent.exact="next"
|
||||
// shift.down.prevent.exact="$store.commit('player/incrementVolume', -0.1)"
|
||||
// shift.up.prevent.exact="$store.commit('player/incrementVolume', 0.1)"
|
||||
// right.prevent.exact="seek (5)"
|
||||
// left.prevent.exact="seek (-5)"
|
||||
// shift.right.prevent.exact="seek (30)"
|
||||
// shift.left.prevent.exact="seek (-30)"
|
||||
// m.prevent.exact="toggleMute"
|
||||
// l.prevent.exact="$store.commit('player/toggleLooping')"
|
||||
// s.prevent.exact="shuffle"
|
||||
// f.prevent.exact="$store.dispatch('favorites/toggle', currentTrack.id)"
|
||||
// q.prevent.exact="clean"
|
||||
|
||||
player () {
|
||||
return [
|
||||
{
|
||||
title: this.$pgettext('Popup/Keyboard shortcuts/Title', 'Audio player shortcuts'),
|
||||
shortcuts: [
|
||||
|
@ -59,21 +96,41 @@ export default {
|
|||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Pause/play the current track')
|
||||
},
|
||||
{
|
||||
key: 'ctrl left',
|
||||
key: 'left',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Seek backwards 5s')
|
||||
},
|
||||
{
|
||||
key: 'right',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Seek forwards 5s')
|
||||
},
|
||||
{
|
||||
key: 'shift + left',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Seek backwards 30s')
|
||||
},
|
||||
{
|
||||
key: 'shift + right',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Seek forwards 30s')
|
||||
},
|
||||
{
|
||||
key: 'ctrl + shift + left',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Play previous track')
|
||||
},
|
||||
{
|
||||
key: 'ctrl right',
|
||||
key: 'ctrl + shift + right',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Play next track')
|
||||
},
|
||||
{
|
||||
key: 'ctrl up',
|
||||
key: 'shift + up',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Increase volume')
|
||||
},
|
||||
{
|
||||
key: 'ctrl down',
|
||||
key: 'shift + down',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Decrease volume')
|
||||
},
|
||||
{
|
||||
key: 'm',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Toggle mute')
|
||||
},
|
||||
{
|
||||
key: 'l',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Toggle queue looping')
|
||||
|
@ -82,6 +139,14 @@ export default {
|
|||
key: 's',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Shuffle queue')
|
||||
},
|
||||
{
|
||||
key: 'q',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Clear queue')
|
||||
},
|
||||
{
|
||||
key: 'f',
|
||||
summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Toggle favorite')
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue