ダークモードのキーボードショートカット追加
This commit is contained in:
parent
28cb9cae51
commit
8028c85c67
2 changed files with 11 additions and 2 deletions
|
|
@ -10,7 +10,8 @@ export default Vue.extend({
|
|||
computed: {
|
||||
keymap(): any {
|
||||
return {
|
||||
'h|slash': this.help
|
||||
'h|slash': this.help,
|
||||
'd': this.dark
|
||||
};
|
||||
}
|
||||
},
|
||||
|
|
@ -18,6 +19,13 @@ export default Vue.extend({
|
|||
methods: {
|
||||
help() {
|
||||
window.open(`${url}/docs/${lang}/keyboard-shortcut`, '_blank');
|
||||
},
|
||||
|
||||
dark() {
|
||||
this.$store.commit('device/set', {
|
||||
key: 'darkmode',
|
||||
value: !this.$store.state.device.darkmode
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue