feat: use <dl> for keyboard shortcuts
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
kolaente 2021-11-09 19:57:50 +01:00
parent ea67048eb6
commit 521a5c69b4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 20 additions and 10 deletions

View File

@ -6,16 +6,20 @@
<div class="message is-primary">
<div class="message-body">
{{ s.available($route) ? $t('keyboardShortcuts.currentPageOnly') : $t('keyboardShortcuts.allPages') }}
{{
s.available($route) ? $t('keyboardShortcuts.currentPageOnly') : $t('keyboardShortcuts.allPages')
}}
</div>
</div>
<p v-for="(sc, si) in s.shortcuts" :key="si">
<strong>{{ $t(sc.title) }}</strong>
<shortcut
:keys="sc.keys"
:combination="typeof sc.combination !== 'undefined' ? $t(`keyboardShortcuts.${sc.combination}`) : null"/>
</p>
<dl>
<template v-for="(sc, si) in s.shortcuts" :key="si">
<dt>{{ $t(sc.title) }}</dt>
<shortcut
:keys="sc.keys"
:combination="typeof sc.combination !== 'undefined' ? $t(`keyboardShortcuts.${sc.combination}`) : null"/>
</template>
</dl>
</template>
</card>
</modal>
@ -40,4 +44,10 @@ export default {
},
},
}
</script>
</script>
<style>
dt {
font-weight: bold;
}
</style>

View File

@ -1,10 +1,10 @@
<template>
<span class="shortcuts">
<dd class="shortcuts">
<template v-for="(k, i) in keys" :key="i">
<kbd>{{ k }}</kbd>
<span v-if="i < keys.length - 1">{{ combination }}</span>
</template>
</span>
</dd>
</template>
<script>