feat: use <dl> for keyboard shortcuts
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
ea67048eb6
commit
521a5c69b4
|
@ -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>
|
|
@ -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>
|
||||
|
|
Reference in New Issue
Block a user