Add Advanced Settings tab

This commit is contained in:
Alex Mazanov 2023-05-21 10:17:14 -04:00
parent 7a27825aa0
commit 868e626d7a
No known key found for this signature in database
GPG Key ID: FD35C3C7C1D34AB4
16 changed files with 155 additions and 95 deletions

View File

@ -126,6 +126,7 @@
FAA14A152728C6FC0052FDB8 /* DisablePluginIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA14A142728C6FC0052FDB8 /* DisablePluginIntentHandler.swift */; };
FAA14A172728C79B0052FDB8 /* GetPluginsIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA14A162728C79B0052FDB8 /* GetPluginsIntentHandler.swift */; };
FAA14A192728C7FC0052FDB8 /* AppDelegate+Intents.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA14A182728C7FC0052FDB8 /* AppDelegate+Intents.swift */; };
FAAFB2A52A1A567D00316F79 /* AdvancedPreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAAFB2A42A1A567D00316F79 /* AdvancedPreferencesView.swift */; };
FAC3F2ED2915D88300D8F346 /* ShortcutPluginsPreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC3F2EC2915D88300D8F346 /* ShortcutPluginsPreferencesView.swift */; };
FAC3F2F12916A61800D8F346 /* AboutSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC3F2F02916A61800D8F346 /* AboutSettingsView.swift */; };
FAC4AE4929722CD2000BED63 /* EphemeralPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC4AE4829722CD2000BED63 /* EphemeralPlugin.swift */; };
@ -219,6 +220,7 @@
FAA14A142728C6FC0052FDB8 /* DisablePluginIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisablePluginIntentHandler.swift; sourceTree = "<group>"; };
FAA14A162728C79B0052FDB8 /* GetPluginsIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetPluginsIntentHandler.swift; sourceTree = "<group>"; };
FAA14A182728C7FC0052FDB8 /* AppDelegate+Intents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Intents.swift"; sourceTree = "<group>"; };
FAAFB2A42A1A567D00316F79 /* AdvancedPreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdvancedPreferencesView.swift; sourceTree = "<group>"; };
FAC3F2EC2915D88300D8F346 /* ShortcutPluginsPreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutPluginsPreferencesView.swift; sourceTree = "<group>"; };
FAC3F2F02916A61800D8F346 /* AboutSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutSettingsView.swift; sourceTree = "<group>"; };
FAC4AE4829722CD2000BED63 /* EphemeralPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EphemeralPlugin.swift; sourceTree = "<group>"; };
@ -419,6 +421,7 @@
children = (
39641EA4254E096200713DAF /* PreferencesView.swift */,
FA64C9DE25CF691D00C4E5C5 /* GeneralPreferencesView.swift */,
FAAFB2A42A1A567D00316F79 /* AdvancedPreferencesView.swift */,
FA64C9E125CF696D00C4E5C5 /* PluginsPreferencesView.swift */,
FAD1BC9A25D22E9400B761E8 /* PluginDetailsView.swift */,
FAC3F2EC2915D88300D8F346 /* ShortcutPluginsPreferencesView.swift */,
@ -757,6 +760,7 @@
39AF7793254B5834001D76E5 /* NSColor.swift in Sources */,
FA136A542917EE0700A7D712 /* PluginUtilities.swift in Sources */,
398B86C4254DA85300DEA027 /* URL+Extension.swift in Sources */,
FAAFB2A52A1A567D00316F79 /* AdvancedPreferencesView.swift in Sources */,
FAC4AE4929722CD2000BED63 /* EphemeralPlugin.swift in Sources */,
FAA14A192728C7FC0052FDB8 /* AppDelegate+Intents.swift in Sources */,
39AF778D2548EBA3001D76E5 /* MenuLineParameters.swift in Sources */,
@ -992,7 +996,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 479;
CURRENT_PROJECT_VERSION = 500;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"SwiftBar/Preview Content\"";
DEVELOPMENT_TEAM = X93LWC49WV;
@ -1020,7 +1024,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 479;
CURRENT_PROJECT_VERSION = 500;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"SwiftBar/Preview Content\"";
DEVELOPMENT_TEAM = X93LWC49WV;

View File

@ -1,16 +1,68 @@
{
"object": {
"pins": [
{
"package": "ShellOut",
"repositoryURL": "https://github.com/JohnSundell/ShellOut",
"state": {
"branch": null,
"revision": "e1577acf2b6e90086d01a6d5e2b8efdaae033568",
"version": "2.3.0"
}
"pins" : [
{
"identity" : "appcenter-sdk-apple",
"kind" : "remoteSourceControl",
"location" : "https://github.com/microsoft/appcenter-sdk-apple.git",
"state" : {
"revision" : "b2dc99cfedead0bad4e6573d86c5228c89cff332",
"version" : "4.4.3"
}
]
},
"version": 1
},
{
"identity" : "hotkey",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftbar/HotKey",
"state" : {
"revision" : "c13662730cb5bc28de4a799854bbb018a90649bf",
"version" : "0.1.3"
}
},
{
"identity" : "launchatlogin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftbar/LaunchAtLogin",
"state" : {
"revision" : "0f39982b9d6993eef253b81219d3c39ba1e680f3",
"version" : "4.0.0"
}
},
{
"identity" : "plcrashreporter",
"kind" : "remoteSourceControl",
"location" : "https://github.com/microsoft/PLCrashReporter.git",
"state" : {
"revision" : "81cdec2b3827feb03286cb297f4c501a8eb98df1",
"version" : "1.10.2"
}
},
{
"identity" : "preferences",
"kind" : "remoteSourceControl",
"location" : "https://github.com/sindresorhus/Preferences",
"state" : {
"revision" : "2651cd144615009242c994b087508fef99e9275c",
"version" : "2.6.0"
}
},
{
"identity" : "sparkle",
"kind" : "remoteSourceControl",
"location" : "https://github.com/sparkle-project/Sparkle",
"state" : {
"revision" : "7907f058bcef1132c9b4af6c049cac598330a5f9",
"version" : "2.4.1"
}
},
{
"identity" : "swifcron",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftbar/SwifCron",
"state" : {
"revision" : "effe20321342705e66894d86720c5882e2f4095e",
"version" : "1.3.1"
}
}
],
"version" : 2
}

View File

@ -139,8 +139,10 @@ class PreferencesStore: ObservableObject {
PreferencesStore.getValue(key: .StreamablePluginDebugOutput) as? Bool ?? false
}
var stealthMode: Bool {
PreferencesStore.getValue(key: .StealthMode) as? Bool ?? false
@Published var stealthMode: Bool {
didSet {
PreferencesStore.setValue(value: stealthMode, key: .StealthMode)
}
}
var collectCrashReports: Bool {
@ -178,6 +180,7 @@ class PreferencesStore: ObservableObject {
swiftBarIconIsHidden = PreferencesStore.getValue(key: .HideSwiftBarIcon) as? Bool ?? false
includeBetaUpdates = PreferencesStore.getValue(key: .IncludeBetaUpdates) as? Bool ?? false
dimOnManualRefresh = PreferencesStore.getValue(key: .DimOnManualRefresh) as? Bool ?? true
stealthMode = PreferencesStore.getValue(key: .StealthMode) as? Bool ?? false
shortcutsPlugins = {
guard let data = PreferencesStore.getValue(key: .ShortcutPlugins) as? Data,
let plugins = try? PropertyListDecoder().decode([PersistentShortcutPlugin].self, from: data) else { return [] }

View File

@ -9,11 +9,11 @@
<key>INIntentDefinitionNamespace</key>
<string>pJtzyC</string>
<key>INIntentDefinitionSystemVersion</key>
<string>22C65</string>
<string>22E261</string>
<key>INIntentDefinitionToolsBuildVersion</key>
<string>14B47b</string>
<string>14E222b</string>
<key>INIntentDefinitionToolsVersion</key>
<string>14.1</string>
<string>14.3</string>
<key>INIntents</key>
<array>
<dict>
@ -110,6 +110,8 @@
<true/>
<key>INIntentDescriptionID</key>
<string>1uwPBT</string>
<key>INIntentIneligibleForSuggestions</key>
<true/>
<key>INIntentInput</key>
<string>plugin</string>
<key>INIntentKeyParameter</key>
@ -132,20 +134,6 @@
</dict>
<key>INIntentName</key>
<string>EnablePlugin</string>
<key>INIntentParameterCombinations</key>
<dict>
<key>plugin</key>
<dict>
<key>INIntentParameterCombinationIsLinked</key>
<true/>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>Enable${plugin}</string>
<key>INIntentParameterCombinationTitleID</key>
<string>zJ4uD7</string>
</dict>
</dict>
<key>INIntentParameters</key>
<array>
<dict>
@ -222,6 +210,8 @@
<true/>
<key>INIntentDescriptionID</key>
<string>Yg8Xr6</string>
<key>INIntentIneligibleForSuggestions</key>
<true/>
<key>INIntentInput</key>
<string>plugin</string>
<key>INIntentKeyParameter</key>
@ -244,20 +234,6 @@
</dict>
<key>INIntentName</key>
<string>DisablePlugin</string>
<key>INIntentParameterCombinations</key>
<dict>
<key>plugin</key>
<dict>
<key>INIntentParameterCombinationIsLinked</key>
<true/>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>Disable${plugin}</string>
<key>INIntentParameterCombinationTitleID</key>
<string>EO6dNz</string>
</dict>
</dict>
<key>INIntentParameters</key>
<array>
<dict>
@ -334,6 +310,8 @@
<true/>
<key>INIntentDescriptionID</key>
<string>ZumjNI</string>
<key>INIntentIneligibleForSuggestions</key>
<true/>
<key>INIntentInput</key>
<string>plugin</string>
<key>INIntentKeyParameter</key>
@ -356,20 +334,6 @@
</dict>
<key>INIntentName</key>
<string>ReloadPlugin</string>
<key>INIntentParameterCombinations</key>
<dict>
<key>plugin</key>
<dict>
<key>INIntentParameterCombinationIsLinked</key>
<true/>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>Reload${plugin}</string>
<key>INIntentParameterCombinationTitleID</key>
<string>uYj1Ro</string>
</dict>
</dict>
<key>INIntentParameters</key>
<array>
<dict>
@ -448,6 +412,8 @@
<string>Sets or updates the content of Ephemeral plugin</string>
<key>INIntentDescriptionID</key>
<string>fEqrq5</string>
<key>INIntentIneligibleForSuggestions</key>
<true/>
<key>INIntentInput</key>
<string>name</string>
<key>INIntentKeyParameter</key>
@ -470,20 +436,6 @@
</dict>
<key>INIntentName</key>
<string>SetEphemeralPlugin</string>
<key>INIntentParameterCombinations</key>
<dict>
<key>name,content,exitAfter</key>
<dict>
<key>INIntentParameterCombinationIsLinked</key>
<true/>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>Set ephemeral plugin named ${name}to ${content}</string>
<key>INIntentParameterCombinationTitleID</key>
<string>1wUwlk</string>
</dict>
</dict>
<key>INIntentParameters</key>
<array>
<dict>

View File

@ -37,6 +37,7 @@ enum Localizable {
enum Preferences: String {
case Preferences = "PF_PREFERENCES"
case General = "PF_GENERAL"
case Advanced = "PF_ADVANCED"
case Plugins = "PF_PLUGINS"
case ShortcutPlugins = "PF_SHORTCUT_PLUGINS"
case About = "PF_ABOUT"
@ -49,6 +50,7 @@ enum Localizable {
case LaunchAtLogin = "PR_LAUNCH_AT_LOGIN"
case IncludeBetaUpdates = "PR_INCLUDE_BETA_UPDATES"
case HideSwiftBarIcon = "PF_HIDE_SWIFTBAR_ICON"
case StealthMode = "PF_STEALTH_MODE"
case UpdateLabel = "PF_CHECK_FOR_UPDATE"
case CheckForUpdates = "PF_CHECK_FOR_UPDATES"
case NoPluginsMessage = "PF_NO_PLUGINS_MESSAGE"
@ -58,7 +60,7 @@ enum Localizable {
case DimOnManualRefresh = "PF_DIM_ON_MANUAL_REFRESH"
case ShortcutsColumnName = "PF_SHORTCUTS_COLUMN_NAME"
case ShortcutsColumnShortcut = "PF_SHORTCUTS_COLUMN_SHORTCUT"
case ShortcutsColumnRepeat = "PF_SHORTCUTS_COLUMN_REPEAT"
case ShortcutsColumnRefresh = "PF_SHORTCUTS_COLUMN_REFRESH"
case ShortcutsDeleteButton = "PF_SHORTCUTS_DELETE_BUTTON"
case ShortcutsDeleteConfirmation = "PF_SHORTCUTS_DELETE_CONFIRMATION"
case ShortcutsAddButton = "PF_SHORTCUTS_ADD_BUTTON"

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "Preferences";
"PF_GENERAL" = "General";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "Plugins";
"PF_SHORTCUT_PLUGINS" = "Shortcut Plugins";
"PF_ABOUT" = "About";
@ -32,6 +33,7 @@
"PF_SHELL" = "Shell";
"PF_TERMINAL" = "Terminal";
"PF_HIDE_SWIFTBAR_ICON" = "Hide SwiftBar Icon";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "Update";
"PF_CHECK_FOR_UPDATES" = "Check for updates";
"PR_INCLUDE_BETA_UPDATES" = "Enthalten Vorabversionen";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "Dim on Manual Refresh";
"PF_SHORTCUTS_COLUMN_NAME" = "Name";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "Shortcut";
"PF_SHORTCUTS_COLUMN_REPEAT" = "Repeat";
"PF_SHORTCUTS_COLUMN_REFRESH" = "Refresh";
"PF_SHORTCUTS_DELETE_BUTTON" = "Delete";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "Are you sure you want to delete '<selectedPlugin>'?";
"PF_SHORTCUTS_ADD_BUTTON" = "Add";

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "Preferences";
"PF_GENERAL" = "General";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "Code Plugins";
"PF_SHORTCUT_PLUGINS" = "Shortcut Plugins";
"PF_ABOUT" = "About";
@ -32,6 +33,7 @@
"PF_SHELL" = "Shell";
"PF_TERMINAL" = "Terminal";
"PF_HIDE_SWIFTBAR_ICON" = "Hide SwiftBar Icon";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "Update";
"PF_CHECK_FOR_UPDATES" = "Check for Updates";
"PR_INCLUDE_BETA_UPDATES" = "Include Pre-Release Versions";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "Dim on Manual Refresh";
"PF_SHORTCUTS_COLUMN_NAME" = "Name";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "Shortcut";
"PF_SHORTCUTS_COLUMN_REPEAT" = "Repeat";
"PF_SHORTCUTS_COLUMN_REFRESH" = "Refresh";
"PF_SHORTCUTS_DELETE_BUTTON" = "Delete";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "Are you sure you want to delete '<selectedPlugin>'?";
"PF_SHORTCUTS_ADD_BUTTON" = "Add";

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "Preferencias";
"PF_GENERAL" = "General";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "Complementos";
"PF_SHORTCUT_PLUGINS" = "Shortcut Plugins";
"PF_ABOUT" = "About";
@ -32,6 +33,7 @@
"PF_SHELL" = "Shell";
"PF_TERMINAL" = "Terminal";
"PF_HIDE_SWIFTBAR_ICON" = "Ocultar Ícono SwiftBar";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "Actualizar";
"PF_CHECK_FOR_UPDATES" = "Verificar Actualizaciones";
"PR_INCLUDE_BETA_UPDATES" = "Incluir Versiones Beta";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "Dim on Manual Refresh";
"PF_SHORTCUTS_COLUMN_NAME" = "Name";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "Shortcut";
"PF_SHORTCUTS_COLUMN_REPEAT" = "Repeat";
"PF_SHORTCUTS_COLUMN_REFRESH" = "Refresh";
"PF_SHORTCUTS_DELETE_BUTTON" = "Delete";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "Are you sure you want to delete '<selectedPlugin>'?";
"PF_SHORTCUTS_ADD_BUTTON" = "Add";

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "Postavke";
"PF_GENERAL" = "Opće";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "Dodatci";
"PF_SHORTCUT_PLUGINS" = "Shortcut Plugins";
"PF_ABOUT" = "About";
@ -32,6 +33,7 @@
"PF_SHELL" = "Naredbeni redak";
"PF_TERMINAL" = "Terminal";
"PF_HIDE_SWIFTBAR_ICON" = "Sakrij ikonu SwiftBara";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "Aktualiziraj";
"PF_CHECK_FOR_UPDATES" = "Traži nove verzije";
"PR_INCLUDE_BETA_UPDATES" = "Uključuju Verzije Prije Izdanja";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "Dim on Manual Refresh";
"PF_SHORTCUTS_COLUMN_NAME" = "Name";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "Shortcut";
"PF_SHORTCUTS_COLUMN_REPEAT" = "Repeat";
"PF_SHORTCUTS_COLUMN_REFRESH" = "Refresh";
"PF_SHORTCUTS_DELETE_BUTTON" = "Delete";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "Are you sure you want to delete '<selectedPlugin>'?";
"PF_SHORTCUTS_ADD_BUTTON" = "Add";

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "Voorkeuren";
"PF_GENERAL" = "Algemeen";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "Plug-ins";
"PF_SHORTCUT_PLUGINS" = "Shortcut Plugins";
"PF_ABOUT" = "About";
@ -32,6 +33,7 @@
"PF_SHELL" = "Shell";
"PF_TERMINAL" = "Shell-applicatie";
"PF_HIDE_SWIFTBAR_ICON" = "Verberg SwiftBar-icoon";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "Updates";
"PF_CHECK_FOR_UPDATES" = "Controleer op updates…";
"PR_INCLUDE_BETA_UPDATES" = "Pre-releaseversies Opnemen";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "Dim on Manual Refresh";
"PF_SHORTCUTS_COLUMN_NAME" = "Name";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "Shortcut";
"PF_SHORTCUTS_COLUMN_REPEAT" = "Repeat";
"PF_SHORTCUTS_COLUMN_REFRESH" = "Refresh";
"PF_SHORTCUTS_DELETE_BUTTON" = "Delete";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "Are you sure you want to delete '<selectedPlugin>'?";
"PF_SHORTCUTS_ADD_BUTTON" = "Add";

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "Настройки";
"PF_GENERAL" = "Общие";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "Плагины";
"PF_SHORTCUT_PLUGINS" = "Shortcut Plugins";
"PF_ABOUT" = "About";
@ -32,6 +33,7 @@
"PF_SHELL" = "Шелл";
"PF_TERMINAL" = "Терминал";
"PF_HIDE_SWIFTBAR_ICON" = "Скрыть иконку SwiftBar";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "Обновить";
"PF_CHECK_FOR_UPDATES" = "Проверить обновления";
"PR_INCLUDE_BETA_UPDATES" = "Включая бета версии";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "Dim on Manual Refresh";
"PF_SHORTCUTS_COLUMN_NAME" = "Name";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "Shortcut";
"PF_SHORTCUTS_COLUMN_REPEAT" = "Repeat";
"PF_SHORTCUTS_COLUMN_REFRESH" = "Refresh";
"PF_SHORTCUTS_DELETE_BUTTON" = "Delete";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "Are you sure you want to delete '<selectedPlugin>'?";
"PF_SHORTCUTS_ADD_BUTTON" = "Add";

View File

@ -21,6 +21,7 @@
//Preferences strings
"PF_PREFERENCES" = "偏好设置";
"PF_GENERAL" = "通用";
"PF_ADVANCED" = "Advanced";
"PF_PLUGINS" = "插件";
"PF_SHORTCUT_PLUGINS" = "快捷指令插件";
"PF_ABOUT" = "关于";
@ -32,6 +33,7 @@
"PF_SHELL" = "命令行解释器";
"PF_TERMINAL" = "终端";
"PF_HIDE_SWIFTBAR_ICON" = "隐藏 SwiftBar 图标";
"PF_STEALTH_MODE" = "Hide SwiftBar in the menu bar";
"PF_CHECK_FOR_UPDATE" = "更新";
"PF_CHECK_FOR_UPDATES" = "检查更新";
"PR_INCLUDE_BETA_UPDATES" = "包括预发布版本";
@ -42,7 +44,7 @@
"PF_DIM_ON_MANUAL_REFRESH" = "手动刷新时变暗";
"PF_SHORTCUTS_COLUMN_NAME" = "名称";
"PF_SHORTCUTS_COLUMN_SHORTCUT" = "快捷指令";
"PF_SHORTCUTS_COLUMN_REPEAT" = "重复";
"PF_SHORTCUTS_COLUMN_REFRESH" = "重复";
"PF_SHORTCUTS_DELETE_BUTTON" = "删除";
"PF_SHORTCUTS_DELETE_CONFIRMATION" = "你确定要删除 '<selectedPlugin>' 吗?";
"PF_SHORTCUTS_ADD_BUTTON" = "添加";

View File

@ -0,0 +1,27 @@
import LaunchAtLogin
import Preferences
import SwiftUI
struct AdvancedPreferencesView: View {
@EnvironmentObject var preferences: PreferencesStore
@State private var launchAtLogin = true
var body: some View {
Preferences.Container(contentWidth: 350) {
Preferences.Section(title: "\(Localizable.Preferences.Terminal.localized):", verticalAlignment: .top) {
EnumPicker(selected: $preferences.terminal, title: "")
.frame(width: 120.0)
}
Preferences.Section(title: "\(Localizable.Preferences.Shell.localized):", bottomDivider: true) {
EnumPicker(selected: $preferences.shell, title: "")
.frame(width: 120.0)
}
Preferences.Section(title: "\(Localizable.Preferences.HideSwiftBarIcon.localized):", verticalAlignment: .top) {
Toggle("", isOn: $preferences.swiftBarIconIsHidden)
}
Preferences.Section(title: "\(Localizable.Preferences.StealthMode.localized):", verticalAlignment: .top) {
Toggle("", isOn: $preferences.stealthMode)
}
}
}
}

View File

@ -23,17 +23,8 @@ struct GeneralPreferencesView: View {
}
Text(preferences.pluginDirectoryPath ?? Localizable.Preferences.PathIsNone.localized)
.preferenceDescription()
Spacer()
}
Preferences.Section(title: "\(Localizable.Preferences.Terminal.localized):", verticalAlignment: .top) {
EnumPicker(selected: $preferences.terminal, title: "")
.frame(width: 120.0)
}
Preferences.Section(title: "\(Localizable.Preferences.Shell.localized):", bottomDivider: true) {
EnumPicker(selected: $preferences.shell, title: "")
.frame(width: 120.0)
}
Preferences.Section(title: "\(Localizable.Preferences.UpdateLabel.localized):", verticalAlignment: .top) {
HStack {
Button(Localizable.Preferences.CheckForUpdates.localized) {

View File

@ -5,6 +5,7 @@ extension Preferences.PaneIdentifier {
static let general = Self("general")
static let plugins = Self("plugins")
static let shortcutPlugins = Self("shortcutPlugins")
static let advanced = Self("advanced")
static let about = Self("about")
var image: NSImage {
@ -27,6 +28,12 @@ extension Preferences.PaneIdentifier {
} else {
return NSImage(named: "AppIcon")!
}
case .advanced:
if #available(OSX 11.0, *) {
return NSImage(systemSymbolName: "gearshape.2", accessibilityDescription: nil)!
} else {
return NSImage(named: "AppIcon")!
}
case .about:
if #available(OSX 11.0, *) {
return NSImage(systemSymbolName: "info", accessibilityDescription: nil)!
@ -64,6 +71,14 @@ var preferencePanes: [PreferencePaneConvertible] = {
)
}
panes.append(
Preferences.Pane(
identifier: .advanced,
title: Localizable.Preferences.Advanced.localized,
toolbarIcon: Preferences.PaneIdentifier.advanced.image
) { AdvancedPreferencesView().environmentObject(PreferencesStore.shared) }
)
panes.append(
Preferences.Pane(
identifier: .about,

View File

@ -28,7 +28,7 @@ struct ShortcutPluginsPreferencesView: View {
TableColumn(Localizable.Preferences.ShortcutsColumnShortcut.localized, value: \.shortcut) { plugin in
Text("\(plugin.shortcut)").font(.body)
}
TableColumn(Localizable.Preferences.ShortcutsColumnRepeat.localized) { plugin in
TableColumn(Localizable.Preferences.ShortcutsColumnRefresh.localized) { plugin in
Text("\(plugin.repeatString)").font(.body)
}.width(60)