From 6c837d417a9dface038948aaa29686ddb1577038 Mon Sep 17 00:00:00 2001
From: tisfeng
Date: Tue, 23 Jan 2024 16:39:31 +0800
Subject: [PATCH 1/4] perf: add new advanced tab
---
Easydict.xcodeproj/project.pbxproj | 4 ++
Easydict/App/Localizable.xcstrings | 19 ++++++++-
.../NewApp/View/SettingView/SettingView.swift | 6 +++
.../View/SettingView/Tabs/AdvancedTab.swift | 42 +++++++++++++++++++
.../View/SettingView/Tabs/GeneralTab.swift | 15 -------
5 files changed, 70 insertions(+), 16 deletions(-)
create mode 100644 Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift
diff --git a/Easydict.xcodeproj/project.pbxproj b/Easydict.xcodeproj/project.pbxproj
index 43ca6f7b7..0feacd3fa 100644
--- a/Easydict.xcodeproj/project.pbxproj
+++ b/Easydict.xcodeproj/project.pbxproj
@@ -70,6 +70,7 @@
037E006D2B3DC098006491C6 /* EZOpenAIService+EZPromptMessages.m in Sources */ = {isa = PBXBuildFile; fileRef = 03CF27FA2B3A787900E19B57 /* EZOpenAIService+EZPromptMessages.m */; };
038030952B4106800009230C /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = 038030942B4106800009230C /* CocoaLumberjack */; };
038030972B4106800009230C /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 038030962B4106800009230C /* CocoaLumberjackSwift */; };
+ 03832F542B5F6BE200D0DC64 /* AdvancedTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03832F532B5F6BE200D0DC64 /* AdvancedTab.swift */; };
0383914C292FBE120009828C /* Main.strings in Resources */ = {isa = PBXBuildFile; fileRef = 03839140292FBE120009828C /* Main.strings */; };
0383914D292FBE120009828C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03839143292FBE120009828C /* Assets.xcassets */; };
0383914E292FBE120009828C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 03839144292FBE120009828C /* ViewController.m */; };
@@ -421,6 +422,7 @@
037852B529588EDE00D0E2CF /* EZCustomTableRowView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZCustomTableRowView.m; sourceTree = ""; };
037852B7295D49F900D0E2CF /* EZTableRowView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EZTableRowView.h; sourceTree = ""; };
037852B8295D49F900D0E2CF /* EZTableRowView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZTableRowView.m; sourceTree = ""; };
+ 03832F532B5F6BE200D0DC64 /* AdvancedTab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedTab.swift; sourceTree = ""; };
03839141292FBE120009828C /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = ""; };
03839142292FBE120009828C /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
03839143292FBE120009828C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
@@ -2099,6 +2101,7 @@
0A8685C72B552A590022534F /* DisabledAppTab.swift */,
276742042B3DC230002A2C75 /* PrivacyTab.swift */,
276742052B3DC230002A2C75 /* AboutTab.swift */,
+ 03832F532B5F6BE200D0DC64 /* AdvancedTab.swift */,
);
path = Tabs;
sourceTree = "";
@@ -2831,6 +2834,7 @@
DC46DF802B4417B900DEAE3E /* Configuration.swift in Sources */,
036E7D7B293F4FC8002675DF /* EZOpenLinkButton.m in Sources */,
EAED41EC2B54AA920005FE0A /* ServiceConfigurationSection.swift in Sources */,
+ 03832F542B5F6BE200D0DC64 /* AdvancedTab.swift in Sources */,
276742092B3DC230002A2C75 /* AboutTab.swift in Sources */,
03008B2E2941956D0062B821 /* EZURLSchemeHandler.m in Sources */,
DC6D9C872B352EBC0055EFFC /* FontSizeHintView.swift in Sources */,
diff --git a/Easydict/App/Localizable.xcstrings b/Easydict/App/Localizable.xcstrings
index aacf0329e..d96c42854 100644
--- a/Easydict/App/Localizable.xcstrings
+++ b/Easydict/App/Localizable.xcstrings
@@ -2,7 +2,14 @@
"sourceLanguage" : "en",
"strings" : {
"" : {
-
+ "localizations" : {
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : ""
+ }
+ }
+ }
},
"about" : {
"comment" : "about",
@@ -37,6 +44,16 @@
}
}
},
+ "advanced" : {
+ "localizations" : {
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "高级"
+ }
+ }
+ }
+ },
"ali_translate" : {
"extractionState" : "manual",
"localizations" : {
diff --git a/Easydict/NewApp/View/SettingView/SettingView.swift b/Easydict/NewApp/View/SettingView/SettingView.swift
index f64f70efc..ec5c395ab 100644
--- a/Easydict/NewApp/View/SettingView/SettingView.swift
+++ b/Easydict/NewApp/View/SettingView/SettingView.swift
@@ -12,6 +12,7 @@ enum SettingTab: Int {
case general
case service
case disabled
+ case advanced
case privacy
case about
}
@@ -34,6 +35,9 @@ struct SettingView: View {
DisabledAppTab()
.tabItem { Label("disabled_app_list", systemImage: "nosign") }
.tag(SettingTab.disabled)
+ AdvancedTab()
+ .tabItem { Label("advanced", systemImage: "wrench.and.screwdriver") }
+ .tag(SettingTab.advanced)
PrivacyTab()
.tabItem { Label("privacy", systemImage: "hand.raised.square") }
@@ -71,6 +75,8 @@ struct SettingView: View {
320
case .about:
450
+ default:
+ 400
}
let newSize = CGSize(width: maxWidth, height: height)
diff --git a/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift b/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift
new file mode 100644
index 000000000..55b9da5c3
--- /dev/null
+++ b/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift
@@ -0,0 +1,42 @@
+//
+// AdvancedTab.swift
+// Easydict
+//
+// Created by tisfeng on 2024/1/23.
+// Copyright © 2024 izual. All rights reserved.
+//
+
+import Defaults
+import SwiftUI
+
+@available(macOS 13, *)
+struct AdvancedTab: View {
+ var body: some View {
+ Form {
+ Section {
+ Picker("setting.general.advance.default_tts_service", selection: $defaultTTSServiceType) {
+ ForEach(TTSServiceType.allCases, id: \.rawValue) { option in
+ Text(option.localizedStringResource)
+ .tag(option)
+ }
+ }
+ Toggle("setting.general.advance.enable_beta_feature", isOn: $enableBetaFeature)
+ Toggle(isOn: $enableBetaNewApp) {
+ Text("enable_beta_new_app")
+ }
+ } header: {
+ Text("setting.general.advance.header")
+ }
+ }
+ .formStyle(.grouped)
+ }
+
+ @Default(.defaultTTSServiceType) private var defaultTTSServiceType
+ @Default(.enableBetaFeature) private var enableBetaFeature
+ @Default(.enableBetaNewApp) private var enableBetaNewApp
+}
+
+@available(macOS 13, *)
+#Preview {
+ AdvancedTab()
+}
diff --git a/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift b/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift
index 84668e464..6471771c1 100644
--- a/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift
+++ b/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift
@@ -139,21 +139,6 @@ struct GeneralTab: View {
} header: {
Text("other")
}
-
- Section {
- Picker("setting.general.advance.default_tts_service", selection: $defaultTTSServiceType) {
- ForEach(TTSServiceType.allCases, id: \.rawValue) { option in
- Text(option.localizedStringResource)
- .tag(option)
- }
- }
- Toggle("setting.general.advance.enable_beta_feature", isOn: $enableBetaFeature)
- Toggle(isOn: $enableBetaNewApp) {
- Text("enable_beta_new_app")
- }
- } header: {
- Text("setting.general.advance.header")
- }
}
.formStyle(.grouped)
}
From c673f6ca1f33a259dfb34fe4d4740a5a502b9a0d Mon Sep 17 00:00:00 2001
From: phlpsong <103433299+phlpsong@users.noreply.github.com>
Date: Wed, 24 Jan 2024 11:50:19 +0800
Subject: [PATCH 2/4] fix add disable app drag lag issue (#355)
* fix: add disable app by dragging lag issue
* fix: revert default disable app workaround and disableAutoSelect
* fix: revert workarounds and fix by disableAutoSelect
---
Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift b/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift
index 7d70402ff..d45ba5a44 100644
--- a/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift
+++ b/Easydict/NewApp/View/SettingView/Tabs/DisabledAppTab.swift
@@ -12,8 +12,13 @@ import SwiftUI
private class DisabledAppViewModel: ObservableObject {
@Published var appModelList: [EZAppModel] = []
@Published var selectedAppModels: Set = []
- @Published var isImporting = false
@Published var isShowImportErrorAlert = false
+ @Published var isImporting = false {
+ didSet {
+ // https://github.com/tisfeng/Easydict/issues/346
+ Configuration.shared.disabledAutoSelect = isImporting
+ }
+ }
init() {
fetchDisabledApps()
From f0bfe0bd072a81d806c6c233157e647a28e21ab7 Mon Sep 17 00:00:00 2001
From: tisfeng
Date: Tue, 23 Jan 2024 23:25:12 +0800
Subject: [PATCH 3/4] docs: update sponsor list
---
README.md | 1 +
README_EN.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 2f0a8a952..dfb27f0b8 100644
--- a/README.md
+++ b/README.md
@@ -823,6 +823,7 @@ Easydict 作为一个免费开源的非盈利项目,目前主要是作者个
| 2024-01-09 | ㅤ Jack | 20 | 目前用过最好用的字典软件,谢谢! |
| 2024-01-15 | ㅤ | 20 | 感谢开源,感谢有你:) |
| 2024-01-16 | ㅤ sd | 5 | 大佬牛逼🐂🍺 |
+| 2024-01-23 | ㅤ | 5 | |
diff --git a/README_EN.md b/README_EN.md
index 026b259d3..369d47ec0 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -820,6 +820,7 @@ If you don't want your username to be displayed in the list, please choose anony
| 2024-01-09 | ㅤ Jack | 20 | 目前用过最好用的字典软件,谢谢! |
| 2024-01-15 | ㅤ | 20 | 感谢开源,感谢有你:) |
| 2024-01-16 | ㅤ sd | 5 | 大佬牛逼🐂🍺 |
+| 2024-01-23 | ㅤ | 5 | |
From 27c8eceeb36766031227e4fca82db00b7636348e Mon Sep 17 00:00:00 2001
From: tisfeng
Date: Wed, 24 Jan 2024 11:50:06 +0800
Subject: [PATCH 4/4] chore: update issue templates
---
.github/ISSUE_TEMPLATE/cn_bug_report_zh.yml | 20 +++++++++++++----
.github/ISSUE_TEMPLATE/cn_feature_request.yml | 8 +++++--
.github/ISSUE_TEMPLATE/en_bug_report.yml | 22 ++++++++++++++-----
.github/ISSUE_TEMPLATE/en_feature_request.yml | 8 +++++--
4 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/cn_bug_report_zh.yml b/.github/ISSUE_TEMPLATE/cn_bug_report_zh.yml
index de97b7dfe..c2d0f068a 100644
--- a/.github/ISSUE_TEMPLATE/cn_bug_report_zh.yml
+++ b/.github/ISSUE_TEMPLATE/cn_bug_report_zh.yml
@@ -1,6 +1,6 @@
name: 反馈问题
description: 反馈问题
-title: "🐞 反馈问题:"
+title: "🐞 反馈问题:{{请填写标题,不要留空}}"
labels: ["bug"]
body:
@@ -22,18 +22,30 @@ body:
id: description
attributes:
label: 问题描述
- description: 请详细描述你所遇到的问题,确保开发者能够理解、重现该问题。如果上下文信息不足,开发者无法定位,问题会被降低优先级或忽略。
+ description: 请详细描述你所遇到的问题,确保开发者能够理解、重现该问题。如果上下文信息不足,导致开发者无法定位,问题会被降低优先级或忽略。
placeholder: 问题描述
validations:
required: true
+ - type: dropdown
+ id: reproducible
+ attributes:
+ label: 该问题是否可以稳定重现?
+ multiple: false
+ options:
+ - 可重现
+ - 不可重现
+ validations:
+ required: true
+
- type: textarea
id: reproduce
attributes:
label: 重现步骤
description: |
- 请描述如何重现该问题。如果该问题是偶发性的,或者需要特定的操作步骤才能重现,请一定要详细提供重现步骤,否则开发者无法定位问题。
- (如果遇到一些很奇怪的问题,可以先尝试重启 Easydict,重启电脑,或卸载重装应用,看能否解决问题 🤔)
+ 如果该问题可重现,请一定要详细提供重现步骤,否则开发者无法定位问题。
+ 如果该问题是偶发性的,可以先尝试重启 Easydict,重启电脑,或卸载重装应用,看能否解决问题 🤔
+ 注意:鉴于开发者精力有限,目前只会处理可稳定重现的问题。对于不可重现的问题,当前只会简单记录下来,观察后续。
placeholder: 重现步骤
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/cn_feature_request.yml b/.github/ISSUE_TEMPLATE/cn_feature_request.yml
index 93baaa805..07b4f5297 100644
--- a/.github/ISSUE_TEMPLATE/cn_feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/cn_feature_request.yml
@@ -1,6 +1,6 @@
name: 功能建议
description: 功能建议
-title: "🚀 功能建议:"
+title: "🚀 功能建议:{{请填写标题,不要留空}}"
labels: ["enhancement"]
body:
@@ -15,6 +15,8 @@ body:
required: true
- label: Easydict 已升级到 [最新版本](https://github.com/tisfeng/Easydict/releases)
required: true
+ - label: 我理解并认可上述内容,并理解项目维护者精力有限,**不遵循规则的 issue 可能会被无视或直接关闭**
+ required: true
- type: textarea
id: feature_description
@@ -29,7 +31,9 @@ body:
id: feature_usecase
attributes:
label: 使用场景
- description: 请描述你希望功能的使用场景,有无其他类似可供参考的 App 功能等。
+ description: |
+ 请描述你希望功能的使用场景,有无其他类似可供参考的 App 功能等。
+ 如果该功能没有明确的使用场景,或是无法被开发者理解,可能会被降低优先级或忽略,因此请务必清晰描述。
placeholder: 使用场景
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/en_bug_report.yml b/.github/ISSUE_TEMPLATE/en_bug_report.yml
index fc13b2380..2f87973a8 100644
--- a/.github/ISSUE_TEMPLATE/en_bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/en_bug_report.yml
@@ -1,6 +1,6 @@
name: Bug report
description: Report an issue
-title: "🐞 Bug Report: "
+title: "🐞 Bug Report: {{Please fill in the title, don't leave it blank}} "
labels: ["bug"]
body:
@@ -27,14 +27,26 @@ body:
validations:
required: true
+ - type: dropdown
+ id: reproducible
+ attributes:
+ label: Is the issue consistently reproducible?
+ multiple: false
+ options:
+ - Reproducible
+ - Non-reproducible
+ validations:
+ required: true
+
- type: textarea
id: reproduce
attributes:
- label: Reproduction steps
+ label: Steps to Reproduce
description: |
- Please describe how to reproduce the problem. If the problem is episodic or requires specific action steps to reproduce, please describe it in as much detail as possible, otherwise the developer will not be able to locate the problem.
- (If the problem is episodic, try restarting Easydict, restarting the device, or uninstalling and reinstalling the app to see if that solves the problem 🤔)
- placeholder: Reproduction steps
+ If the issue is reproducible, please provide detailed steps to reproduce it. Otherwise, the developer may not be able to locate the issue.
+ If the issue is intermittent, you can try restarting Easydict, restarting your computer, or uninstalling and reinstalling the application to see if the problem can be resolved 🤔
+ Note: Given the limited resources of the developer, only issues that can be reliably reproduced will be addressed at this time. For non-reproducible issues, they will be simply recorded for future observation.
+ placeholder: Steps to Reproduce
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/en_feature_request.yml b/.github/ISSUE_TEMPLATE/en_feature_request.yml
index 5b50e36f2..f63be4bf5 100644
--- a/.github/ISSUE_TEMPLATE/en_feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/en_feature_request.yml
@@ -1,6 +1,6 @@
name: Feature request
description: Request a new feature
-title: "🚀 Feature Request: "
+title: "🚀 Feature Request: {{Please fill in the title, don't leave it blank}}"
labels: ["enhancement"]
body:
@@ -15,6 +15,8 @@ body:
required: true
- label: Easydict has been upgraded to the [latest version](https://github.com/tisfeng/Easydict/releases)
required: true
+ - label: I understand and agree to the above, and understand that the project maintainer has limited energy, **issues that do not follow the rules may be ignored or closed directly**
+ required: true
- type: textarea
id: feature_description
@@ -29,7 +31,9 @@ body:
id: feature_usecase
attributes:
label: Use case
- description: Please describe the use case of the feature you're requesting, and whether there are any similar app features for reference.
+ description: |
+ Please describe the use case of the feature you're requesting, and whether there are any similar app features for reference.
+ If the feature has no actual usage scenarios or is not well understood by the developers it might get deprioritized or even ignored, so be sure to describe it clearly.
placeholder: Use case
validations:
required: true