mirror of
https://github.com/swiftbar/SwiftBar.git
synced 2024-09-11 07:55:23 +03:00
Fix crash reports collection and add a setting
Signed-off-by: Alex Mazanov <alexandr.mazanov@gmail.com>
This commit is contained in:
parent
a0cf5ad13e
commit
6944166366
@ -74,7 +74,6 @@
|
||||
39641EB0254E163C00713DAF /* PreferencesStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39641EAF254E163C00713DAF /* PreferencesStore.swift */; };
|
||||
396E6CA9258E8C5C002C735D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 396E6CAB258E8C5C002C735D /* Localizable.strings */; };
|
||||
396E6CB0258E8D47002C735D /* Localizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396E6CAF258E8D47002C735D /* Localizable.swift */; };
|
||||
3989359625896DF9007CF2E8 /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = 3989359525896DF9007CF2E8 /* LaunchAtLogin */; };
|
||||
3989359E25896E29007CF2E8 /* HotKey in Frameworks */ = {isa = PBXBuildFile; productRef = 3989359D25896E29007CF2E8 /* HotKey */; };
|
||||
398B86C4254DA85300DEA027 /* URL+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 398B86C3254DA85300DEA027 /* URL+Extension.swift */; };
|
||||
398B86CA254DB5D200DEA027 /* DirectoryObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 398B86C9254DB5D200DEA027 /* DirectoryObserver.swift */; };
|
||||
@ -120,6 +119,7 @@
|
||||
FA8518CC258DAAAB008AD21C /* Binding+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8518CB258DAAAB008AD21C /* Binding+Extension.swift */; };
|
||||
FA8518F52598E786008AD21C /* SwifCron in Frameworks */ = {isa = PBXBuildFile; productRef = FA8518F42598E786008AD21C /* SwifCron */; };
|
||||
FA90185927C318A700D72E63 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = FA90185827C318A700D72E63 /* Sparkle */; };
|
||||
FA9CA6D72ABF152F009B72F4 /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = FA9CA6D62ABF152F009B72F4 /* LaunchAtLogin */; };
|
||||
FAA14A0E2728C65D0052FDB8 /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = FAA14A0D2728C65D0052FDB8 /* Intents.intentdefinition */; };
|
||||
FAA14A112728C6E90052FDB8 /* EnablePluginIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA14A102728C6E90052FDB8 /* EnablePluginIntentHandler.swift */; };
|
||||
FAA14A132728C6F20052FDB8 /* ReloadPluginIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA14A122728C6F20052FDB8 /* ReloadPluginIntentHandler.swift */; };
|
||||
@ -131,6 +131,7 @@
|
||||
FAC3F2F12916A61800D8F346 /* AboutSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC3F2F02916A61800D8F346 /* AboutSettingsView.swift */; };
|
||||
FAC4AE4929722CD2000BED63 /* EphemeralPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC4AE4829722CD2000BED63 /* EphemeralPlugin.swift */; };
|
||||
FAC4AE4B297304F4000BED63 /* SetEphemeralPluginIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC4AE4A297304F4000BED63 /* SetEphemeralPluginIntentHandler.swift */; };
|
||||
FACE7A482A7FE73500FCE84E /* AppCenterCrashes in Frameworks */ = {isa = PBXBuildFile; productRef = FACE7A472A7FE73500FCE84E /* AppCenterCrashes */; };
|
||||
FAD14C052585AE1800CB7BBE /* String+ANSIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAD14C042585AE1800CB7BBE /* String+ANSIColor.swift */; };
|
||||
FAD1BC9B25D22E9400B761E8 /* PluginDetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAD1BC9A25D22E9400B761E8 /* PluginDetailsView.swift */; };
|
||||
FAD1BC9E25D22EEA00B761E8 /* AnimatableWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAD1BC9D25D22EEA00B761E8 /* AnimatableWindow.swift */; };
|
||||
@ -237,8 +238,9 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FA9CA6D72ABF152F009B72F4 /* LaunchAtLogin in Frameworks */,
|
||||
FA90185927C318A700D72E63 /* Sparkle in Frameworks */,
|
||||
3989359625896DF9007CF2E8 /* LaunchAtLogin in Frameworks */,
|
||||
FACE7A482A7FE73500FCE84E /* AppCenterCrashes in Frameworks */,
|
||||
39B64C29260F70D900B7FA63 /* Preferences in Frameworks */,
|
||||
FA8518F52598E786008AD21C /* SwifCron in Frameworks */,
|
||||
3989359E25896E29007CF2E8 /* HotKey in Frameworks */,
|
||||
@ -479,11 +481,12 @@
|
||||
);
|
||||
name = SwiftBar;
|
||||
packageProductDependencies = (
|
||||
3989359525896DF9007CF2E8 /* LaunchAtLogin */,
|
||||
3989359D25896E29007CF2E8 /* HotKey */,
|
||||
FA8518F42598E786008AD21C /* SwifCron */,
|
||||
39B64C28260F70D900B7FA63 /* Preferences */,
|
||||
FA90185827C318A700D72E63 /* Sparkle */,
|
||||
FACE7A472A7FE73500FCE84E /* AppCenterCrashes */,
|
||||
FA9CA6D62ABF152F009B72F4 /* LaunchAtLogin */,
|
||||
);
|
||||
productName = SwiftBar;
|
||||
productReference = 3920747A25460FD000213DBE /* SwiftBar.app */;
|
||||
@ -546,12 +549,12 @@
|
||||
);
|
||||
mainGroup = 3920747125460FD000213DBE;
|
||||
packageReferences = (
|
||||
3989359425896DF9007CF2E8 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */,
|
||||
3989359C25896E29007CF2E8 /* XCRemoteSwiftPackageReference "HotKey" */,
|
||||
FA8518F32598E786008AD21C /* XCRemoteSwiftPackageReference "SwifCron" */,
|
||||
39B64C27260F70D900B7FA63 /* XCRemoteSwiftPackageReference "Preferences" */,
|
||||
FA90185727C318A700D72E63 /* XCRemoteSwiftPackageReference "Sparkle" */,
|
||||
FABE059528C4035200093A83 /* XCRemoteSwiftPackageReference "appcenter-sdk-apple" */,
|
||||
FA9CA6D52ABF152F009B72F4 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */,
|
||||
);
|
||||
productRefGroup = 3920747B25460FD000213DBE /* Products */;
|
||||
projectDirPath = "";
|
||||
@ -999,7 +1002,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 501;
|
||||
CURRENT_PROJECT_VERSION = 503;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"SwiftBar/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = X93LWC49WV;
|
||||
@ -1027,7 +1030,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 501;
|
||||
CURRENT_PROJECT_VERSION = 503;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"SwiftBar/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = X93LWC49WV;
|
||||
@ -1162,14 +1165,6 @@
|
||||
minimumVersion = 1.3.1;
|
||||
};
|
||||
};
|
||||
3989359425896DF9007CF2E8 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/swiftbar/LaunchAtLogin";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 4.0.0;
|
||||
};
|
||||
};
|
||||
3989359C25896E29007CF2E8 /* XCRemoteSwiftPackageReference "HotKey" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/swiftbar/HotKey";
|
||||
@ -1202,6 +1197,14 @@
|
||||
minimumVersion = 2.0.0;
|
||||
};
|
||||
};
|
||||
FA9CA6D52ABF152F009B72F4 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/sindresorhus/LaunchAtLogin";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 5.0.0;
|
||||
};
|
||||
};
|
||||
FABE059528C4035200093A83 /* XCRemoteSwiftPackageReference "appcenter-sdk-apple" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/microsoft/appcenter-sdk-apple.git";
|
||||
@ -1228,11 +1231,6 @@
|
||||
package = 39224DE925F4344600BABF21 /* XCRemoteSwiftPackageReference "SwifCron" */;
|
||||
productName = SwifCron;
|
||||
};
|
||||
3989359525896DF9007CF2E8 /* LaunchAtLogin */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3989359425896DF9007CF2E8 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */;
|
||||
productName = LaunchAtLogin;
|
||||
};
|
||||
3989359D25896E29007CF2E8 /* HotKey */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 3989359C25896E29007CF2E8 /* XCRemoteSwiftPackageReference "HotKey" */;
|
||||
@ -1258,6 +1256,16 @@
|
||||
package = FA90185727C318A700D72E63 /* XCRemoteSwiftPackageReference "Sparkle" */;
|
||||
productName = Sparkle;
|
||||
};
|
||||
FA9CA6D62ABF152F009B72F4 /* LaunchAtLogin */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = FA9CA6D52ABF152F009B72F4 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */;
|
||||
productName = LaunchAtLogin;
|
||||
};
|
||||
FACE7A472A7FE73500FCE84E /* AppCenterCrashes */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = FABE059528C4035200093A83 /* XCRemoteSwiftPackageReference "appcenter-sdk-apple" */;
|
||||
productName = AppCenterCrashes;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 3920747225460FD000213DBE /* Project object */;
|
||||
|
@ -34,7 +34,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, SPUStandardUserDriverDelegat
|
||||
|
||||
func applicationDidFinishLaunching(_: Notification) {
|
||||
if prefs.collectCrashReports {
|
||||
// Not cool to have the KEY here, but since this is for crash reporting I don't care
|
||||
// Not cool to have the KEY here, but since this is for crash reporting I don't care
|
||||
AppCenter.start(withAppSecret: "40e6c2fa-2383-40a7-bfbd-75662a7d92a9", services: [
|
||||
Crashes.self,
|
||||
])
|
||||
|
@ -103,6 +103,12 @@ class PreferencesStore: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
@Published var collectCrashReports: Bool {
|
||||
didSet {
|
||||
PreferencesStore.setValue(value: collectCrashReports, key: .CollectCrashReports)
|
||||
}
|
||||
}
|
||||
|
||||
@Published var dimOnManualRefresh: Bool {
|
||||
didSet {
|
||||
PreferencesStore.setValue(value: dimOnManualRefresh, key: .DimOnManualRefresh)
|
||||
@ -145,10 +151,6 @@ class PreferencesStore: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
var collectCrashReports: Bool {
|
||||
PreferencesStore.getValue(key: .CollectCrashReports) as? Bool ?? false
|
||||
}
|
||||
|
||||
var debugLoggingEnabled: Bool {
|
||||
PreferencesStore.getValue(key: .DebugLoggingEnabled) as? Bool ?? false
|
||||
}
|
||||
@ -179,6 +181,7 @@ class PreferencesStore: ObservableObject {
|
||||
shell = .Bash
|
||||
swiftBarIconIsHidden = PreferencesStore.getValue(key: .HideSwiftBarIcon) as? Bool ?? false
|
||||
includeBetaUpdates = PreferencesStore.getValue(key: .IncludeBetaUpdates) as? Bool ?? false
|
||||
collectCrashReports = PreferencesStore.getValue(key: .CollectCrashReports) as? Bool ?? true
|
||||
dimOnManualRefresh = PreferencesStore.getValue(key: .DimOnManualRefresh) as? Bool ?? true
|
||||
stealthMode = PreferencesStore.getValue(key: .StealthMode) as? Bool ?? false
|
||||
shortcutsPlugins = {
|
||||
|
@ -49,6 +49,7 @@ enum Localizable {
|
||||
case Shell = "PF_SHELL"
|
||||
case LaunchAtLogin = "PR_LAUNCH_AT_LOGIN"
|
||||
case IncludeBetaUpdates = "PR_INCLUDE_BETA_UPDATES"
|
||||
case ShareCrashReports = "PR_SHARE_CRASH_REPORTS"
|
||||
case HideSwiftBarIcon = "PF_HIDE_SWIFTBAR_ICON"
|
||||
case StealthMode = "PF_STEALTH_MODE"
|
||||
case UpdateLabel = "PF_CHECK_FOR_UPDATE"
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "Update";
|
||||
"PF_CHECK_FOR_UPDATES" = "Check for updates";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "Enthalten Vorabversionen";
|
||||
"PR_SHARE_CRASH_REPORTS" = "Fehlerberichte teilen";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "Plugins folder is empty";
|
||||
"PF_ENABLE_ALL" = "Enable All";
|
||||
"PF_PLUGINS_FOOTNOTE" = "Enabled plugins appear in the menu bar.";
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "Update";
|
||||
"PF_CHECK_FOR_UPDATES" = "Check for Updates";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "Include Pre-Release Versions";
|
||||
"PR_SHARE_CRASH_REPORTS" = "Share Crash Reports";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "Plugins folder is empty";
|
||||
"PF_ENABLE_ALL" = "Enable All";
|
||||
"PF_PLUGINS_FOOTNOTE" = "Enabled plugins appear in the menu bar.";
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "Actualizar";
|
||||
"PF_CHECK_FOR_UPDATES" = "Verificar Actualizaciones";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "Incluir Versiones Beta";
|
||||
"PR_SHARE_CRASH_REPORTS" = "Compartir informes de fallos";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "La carpeta de los complementos está vacía";
|
||||
"PF_ENABLE_ALL" = "Habilitar todo";
|
||||
"PF_PLUGINS_FOOTNOTE" = "Los complementos habilitados aparecen en la barra de menú.";
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "Aktualiziraj";
|
||||
"PF_CHECK_FOR_UPDATES" = "Traži nove verzije";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "Uključuju Verzije Prije Izdanja";
|
||||
"PR_SHARE_CRASH_REPORTS" = "Podijeli izvještaje o padovima";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "Mapa dodataka je prazna";
|
||||
"PF_ENABLE_ALL" = "Aktiviraj sve";
|
||||
"PF_PLUGINS_FOOTNOTE" = "Aktivirani dodaci će se pojaviti u traci izbornika.";
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "Updates";
|
||||
"PF_CHECK_FOR_UPDATES" = "Controleer op updates…";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "Pre-releaseversies Opnemen";
|
||||
"PR_SHARE_CRASH_REPORTS" = "Crashrapporten delen";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "Plug-insmap is leeg";
|
||||
"PF_ENABLE_ALL" = "Alle plug-ins inschakelen";
|
||||
"PF_PLUGINS_FOOTNOTE" = "Ingeschakelde plug-ins verschijnen in de menubalk.";
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "Обновить";
|
||||
"PF_CHECK_FOR_UPDATES" = "Проверить обновления";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "Включая бета версии";
|
||||
"PR_SHARE_CRASH_REPORTS" = "Поделиться отчётами о сбоях";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "Папка плагина пуста";
|
||||
"PF_ENABLE_ALL" = "Включить все";
|
||||
"PF_PLUGINS_FOOTNOTE" = "Включенные плагины видны в панели меню.";
|
||||
|
@ -37,6 +37,7 @@
|
||||
"PF_CHECK_FOR_UPDATE" = "更新";
|
||||
"PF_CHECK_FOR_UPDATES" = "检查更新";
|
||||
"PR_INCLUDE_BETA_UPDATES" = "包括预发布版本";
|
||||
"PR_SHARE_CRASH_REPORTS" = "分享崩溃报告";
|
||||
"PF_NO_PLUGINS_MESSAGE" = "插件目录是空的";
|
||||
"PF_ENABLE_ALL" = "开启所有";
|
||||
"PF_PLUGINS_FOOTNOTE" = "菜单栏中会显示已启用的插件。";
|
||||
|
@ -33,6 +33,7 @@ struct GeneralPreferencesView: View {
|
||||
}
|
||||
Toggle(Localizable.Preferences.IncludeBetaUpdates.localized, isOn: $preferences.includeBetaUpdates)
|
||||
Spacer()
|
||||
Toggle(Localizable.Preferences.ShareCrashReports.localized, isOn: $preferences.collectCrashReports)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user