forked from gotson/komga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(webreader): add shortcut information menu
- Loading branch information
1 parent
40c1ca5
commit 1885f32
Showing
3 changed files
with
223 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<template> | ||
<v-menu offset-y :max-height="$vuetify.breakpoint.height"> | ||
<template v-slot:activator="{ on, attrs }"> | ||
<v-btn | ||
icon | ||
v-on="on" | ||
> | ||
<v-icon>mdi-information</v-icon> | ||
</v-btn> | ||
</template> | ||
<v-card> | ||
<v-card-text> | ||
<v-row no-gutters> | ||
<template v-for="(item,i) in shortcutHelp.items()"> | ||
<v-col :key="i" cols="12" md="4"> | ||
<div class="text-center"> | ||
{{ item.key }} | ||
</div> | ||
<v-simple-table> | ||
<template v-slot:default> | ||
<thead> | ||
<tr> | ||
<th class="text-left">Key</th> | ||
<th class="text-left">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr v-for="(s,i) in item.value" :key="i"> | ||
<td> | ||
<kbd style="height: 24px;" class="text-truncate"> | ||
<v-icon class="white--text text-capitalize" style="font-size: 1rem;"> | ||
{{ s.key }} | ||
</v-icon> | ||
</kbd> | ||
</td> | ||
<td>{{ s.desc }}</td> | ||
</tr> | ||
</tbody> | ||
</template> | ||
</v-simple-table> | ||
</v-col> | ||
</template> | ||
</v-row> | ||
</v-card-text> | ||
</v-card> | ||
</v-menu> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
import { shortcutHelp } from '@/functions/shortcuts' | ||
export default Vue.extend({ | ||
name: 'ShortcutHelpMenu', | ||
data: () => { | ||
return { | ||
shortcutHelp: shortcutHelp, | ||
} | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters