From 979aee1a3159d8927bed1ad3b1d8847810e26bce Mon Sep 17 00:00:00 2001 From: Sharker <1548742234@qq.com> Date: Mon, 5 Feb 2024 01:02:55 +0800 Subject: [PATCH] feat: add Divider --- Easydict/NewApp/Feature/Shortcut/Shortcut.swift | 2 +- Easydict/NewApp/View/MenuView/MainMenuShortcutCommand.swift | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Easydict/NewApp/Feature/Shortcut/Shortcut.swift b/Easydict/NewApp/Feature/Shortcut/Shortcut.swift index 26796f38f..d881d8350 100644 --- a/Easydict/NewApp/Feature/Shortcut/Shortcut.swift +++ b/Easydict/NewApp/Feature/Shortcut/Shortcut.swift @@ -52,7 +52,7 @@ class Shortcut: NSObject { @objc static func setupShortcut() { let shortcut = Shortcut.shared shortcut.restoreShortcut() - + if Defaults[.firstLaunch] { Defaults[.firstLaunch] = false // set defalut for app shortcut diff --git a/Easydict/NewApp/View/MenuView/MainMenuShortcutCommand.swift b/Easydict/NewApp/View/MenuView/MainMenuShortcutCommand.swift index a4a11f441..c185b7203 100644 --- a/Easydict/NewApp/View/MenuView/MainMenuShortcutCommand.swift +++ b/Easydict/NewApp/View/MenuView/MainMenuShortcutCommand.swift @@ -41,6 +41,11 @@ extension EasyDictMainMenu { Shortcut.shared.shortcutRetry() } .keyboardShortcut(.retry) + Button("toggle_languages") { + Shortcut.shared.shortcutToggle() + } + .keyboardShortcut(.toggle) + Divider() Button("pin") { Shortcut.shared.shortcutPin() } @@ -57,6 +62,7 @@ extension EasyDictMainMenu { Shortcut.shared.decreaseFontSize() } .keyboardShortcut(.decreaseFontSize) + Divider() Button("open_in_google") { Shortcut.shared.shortcutGoogle() }