Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Shortcut #388

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6e1fb9b
feat: add shortcut
AkaShark Jan 20, 2024
89b0144
feat: add shortcut
AkaShark Jan 20, 2024
c7a524d
feat: binding shortcut
AkaShark Jan 20, 2024
ab7b30b
feat: shortcut in setting page
AkaShark Jan 20, 2024
6e36970
fix: move shortcut setup into appdelegate
AkaShark Jan 20, 2024
7a802e6
feat: add show mini window
AkaShark Jan 20, 2024
4afb37f
chore: try add shortcut in menu item
AkaShark Jan 20, 2024
8fe2167
chore: remove unuse code
AkaShark Jan 20, 2024
af7addf
Merge branch 'dev' into shortcut
tisfeng Jan 21, 2024
72f8ed3
chore: add menu shortcut
AkaShark Jan 21, 2024
89e59ab
Merge branch 'shortcut' of github.com:AkaShark/Easydict into shortcut
AkaShark Jan 21, 2024
3540c79
fix: use old shortcut key cuase crash in new settings
tisfeng Jan 21, 2024
52aa0cd
Merge branch 'shortcut' of github.com:AkaShark/Easydict into shortcut
AkaShark Jan 21, 2024
c9a4cd5
feat: add shortcut tab page
AkaShark Jan 21, 2024
17e264b
feat: add shortcut into menu item
AkaShark Jan 21, 2024
f693368
fix: unable to delete shortcut & menubar shortcut update & refactor u…
CanglongCl Jan 21, 2024
6444614
feat: add shortcut into new page
AkaShark Jan 27, 2024
1ea12a2
feat: add shortcut confict validator
AkaShark Jan 29, 2024
1d6aa55
feat: shortcut confict alter
AkaShark Jan 30, 2024
1354628
feat: shortcut confict msg
AkaShark Jan 30, 2024
d653d67
Merge branch 'dev' into shortcut
AkaShark Jan 30, 2024
4a937a3
fix: string formate
AkaShark Jan 30, 2024
a4add69
fix: unused string in xcstrings
AkaShark Jan 30, 2024
41afc5e
fix: add advanced en string
AkaShark Jan 30, 2024
560be05
pref: UI optimize
AkaShark Jan 31, 2024
4f8944a
Merge branch 'dev' into shortcut
tisfeng Jan 31, 2024
b5169dc
fix: marked the localized as reviewed
AkaShark Jan 31, 2024
9c00a4a
Merge branch 'shortcut' of github.com:AkaShark/Easydict into shortcut
AkaShark Jan 31, 2024
55b454e
Merge branch 'dev' into shortcut
tisfeng Jan 31, 2024
6ccdfc6
Merge branch 'dev' into shortcut
tisfeng Feb 1, 2024
a496ff5
fix: review problem
AkaShark Feb 1, 2024
d497caa
fix: optimize the shortcut confict alter message
AkaShark Feb 1, 2024
8d1e68a
fix: optimize alter message
AkaShark Feb 1, 2024
e3c5aa4
fix: remove the duplicate package.resloved
AkaShark Feb 1, 2024
0e6154a
Merge branch 'dev' into shortcut
AkaShark Feb 4, 2024
ae4a14e
feat: split global shortcut
AkaShark Feb 4, 2024
97538c5
fix: restore app shortcut
AkaShark Feb 4, 2024
3fee66c
feat: add main menu shortcut part
AkaShark Feb 4, 2024
0b577f4
feat: add default app shortcut
AkaShark Feb 4, 2024
f9c9229
feat: change add default app shortcut place
AkaShark Feb 4, 2024
979aee1
feat: add Divider
AkaShark Feb 4, 2024
f42b3c4
Merge branch 'dev' into shortcut
AkaShark Feb 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: change add default app shortcut place
  • Loading branch information
AkaShark committed Feb 4, 2024
commit f9c9229ce913c05790c725465c636b4dee1279aa
8 changes: 8 additions & 0 deletions Easydict/NewApp/Feature/Shortcut/Shortcut.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ class Shortcut: NSObject {
@objc static func setupShortcut() {
let shortcut = Shortcut.shared
shortcut.restoreShortcut()

if Defaults[.firstLaunch] {
Defaults[.firstLaunch] = false
// set defalut for app shortcut
shortcut.setDefaultForAppShortcut()
} else {
// do nothing
}
}

// Make sure the class has only one instance
Expand Down
13 changes: 0 additions & 13 deletions Easydict/NewApp/View/SettingView/Tabs/ShortcutTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ struct ShortcutTab: View {
AppShortcutSettingView()
}
.formStyle(.grouped)
.onAppear {
setDefaultAppShortcut()
}
}

func setDefaultAppShortcut() {
if Defaults[.firstLaunch] {
Defaults[.firstLaunch] = false
// set defalut for app shortcut
Shortcut.shared.setDefaultForAppShortcut()
} else {
// do nothing
}
}
}

Expand Down