mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
v2.6.1
This commit is contained in:
@@ -21,6 +21,8 @@ struct event: Codable {
|
||||
var device: String
|
||||
var os: String
|
||||
var language: String
|
||||
|
||||
var omit: Bool
|
||||
}
|
||||
|
||||
public class Server {
|
||||
@@ -41,7 +43,7 @@ public class Server {
|
||||
}
|
||||
}
|
||||
|
||||
public func sendEvent(modules: [String]) {
|
||||
public func sendEvent(modules: [String], omit: Bool = false) {
|
||||
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
|
||||
let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
|
||||
let systemVersion = ProcessInfo().operatingSystemVersion
|
||||
@@ -52,7 +54,8 @@ public class Server {
|
||||
build: build ?? "unknown",
|
||||
modules: modules, device: SystemKit.shared.modelName() ?? "unknown",
|
||||
os: systemVersion.getFullVersion(),
|
||||
language: Locale.current.languageCode ?? "unknown"
|
||||
language: Locale.current.languageCode ?? "unknown",
|
||||
omit: omit
|
||||
)
|
||||
|
||||
var request = URLRequest(url: self.url)
|
||||
|
||||
@@ -2000,7 +2000,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MARKETING_VERSION = 2.6.0;
|
||||
MARKETING_VERSION = 2.6.1;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -2033,7 +2033,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MARKETING_VERSION = 2.6.0;
|
||||
MARKETING_VERSION = 2.6.1;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -60,6 +60,10 @@
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
argument = "--omit"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "--reset"
|
||||
isEnabled = "NO">
|
||||
|
||||
@@ -54,7 +54,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
|
||||
self.defaultValues()
|
||||
self.updateCron()
|
||||
info("Stats started in \((startingPoint.timeIntervalSinceNow * -1).rounded(toPlaces: 4)) seconds")
|
||||
Server.shared.sendEvent(modules: modules.filter({ $0.enabled != false && $0.available != false }).map({ $0.config.name }))
|
||||
|
||||
Server.shared.sendEvent(
|
||||
modules: modules.filter({ $0.enabled != false && $0.available != false }).map({ $0.config.name }),
|
||||
omit: CommandLine.arguments.contains("--omit")
|
||||
)
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ aNotification: Notification) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>289</string>
|
||||
<string>290</string>
|
||||
<key>Description</key>
|
||||
<string>Simple macOS system monitor in your menu bar</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
||||
Reference in New Issue
Block a user