From f8db397e0ca31f335785ebe4c763d7179d3ecc53 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Thu, 21 Dec 2023 19:26:02 +0100 Subject: [PATCH] Show keyboard shortcuts in status bar tooltips --- src/components/StatusBar.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/StatusBar.vue b/src/components/StatusBar.vue index 42c3fed..2320f52 100644 --- a/src/components/StatusBar.vue +++ b/src/components/StatusBar.vue @@ -38,6 +38,18 @@ const lang = LANGUAGE_MAP[this.language] return !!lang ? lang.supportsFormat : false }, + + cmdKey() { + return window.heynote.platform.isMac ? "⌘" : "Ctrl" + }, + + formatBlockTitle() { + return `Format Block Content (Alt + Shift + F)` + }, + + changeLanguageTitle() { + return `Change language for current block (${this.cmdKey} + L)` + }, }, } @@ -55,7 +67,7 @@
{{ languageName }} (auto) @@ -64,7 +76,7 @@ v-if="supportsFormat" @click="$emit('formatCurrentBlock')" class="status-block format clickable" - title="Format Block Content" + :title="formatBlockTitle" >