From 3257566781731daf81af9d063cf189b9ab74069b Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 13 Jun 2024 20:39:10 +0800 Subject: [PATCH] enhance: add hotkeys to commit buttons (#176) --- src/Resources/Locales/en_US.axaml | 2 ++ src/Resources/Locales/zh_CN.axaml | 2 ++ src/Resources/Locales/zh_TW.axaml | 2 ++ src/Views/Hotkeys.axaml | 12 +++++++++--- src/Views/WorkingCopy.axaml | 6 +++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index fd962463..ccedbe84 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -243,6 +243,8 @@ Create new page Open preference dialog REPOSITORY + Commit staged changes + Commit and push staged changes Force to reload this repository Stage/Unstage selected changes Open commit search diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 60868f16..faaeb2e5 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -246,6 +246,8 @@ 新建页面 打开偏好设置面板 仓库页面快捷键 + 提交暂存区更改 + 提交暂存区更改并推送 重新加载仓库状态 将选中的变更暂存或从暂存列表中移除 打开历史搜索 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 4ad5108d..86c6781b 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -246,6 +246,8 @@ 新建頁面 開啟偏好設定面板 倉庫頁面快捷鍵 + 提交暫存區變更 + 提交暫存區變更併推送 重新載入倉庫狀態 將選中的變更暫存或從暫存列表中移除 開啟歷史搜尋 diff --git a/src/Views/Hotkeys.axaml b/src/Views/Hotkeys.axaml index ae6dc89d..bf633bff 100644 --- a/src/Views/Hotkeys.axaml +++ b/src/Views/Hotkeys.axaml @@ -84,7 +84,7 @@ FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize, Converter={x:Static c:FontSizeModifyConverters.Increase}}" Margin="0,8"/> - + @@ -100,8 +100,14 @@ - - + + + + + + + + + Command="{Binding Commit}" + HotKey="{OnPlatform Ctrl+Enter, macOS=⌘+Enter}" + ToolTip.Tip="{OnPlatform Ctrl+Enter, macOS=⌘+Enter}"/>