Skip to content

Commit 898bcd8

Browse files
authored
Introduce modern UI (#262)
* Introduce new UI - Refactor StatusMenu.swift - Optimize performance for updating the network list - Optimize performance for highlighting menu items via private APIs * Fix items not properly hidden prior to macOS 14
1 parent 1c3fdb5 commit 898bcd8

23 files changed

Lines changed: 2245 additions & 822 deletions

.swiftlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ excluded:
44

55
identifier_name:
66
allowed_symbols: "_"
7+
8+
large_tuple:
9+
warning: 3
710

811
disabled_rules:
912
- function_body_length

HeliPort.xcodeproj/project.pbxproj

Lines changed: 74 additions & 12 deletions
Large diffs are not rendered by default.

HeliPort/AppDelegate.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
4141
}()
4242
_ = StatusBarIcon.shared(statusBar: statusBar, icons: iconProvider)
4343

44-
statusBar.menu = StatusMenu()
44+
if #available(macOS 11, *), !legacyUIEnabled {
45+
statusBar.menu = StatusMenuModern()
46+
} else {
47+
statusBar.menu = StatusMenuLegacy()
48+
}
4549
}
4650

4751
private var drv_info = ioctl_driver_info()

HeliPort/Appearance/Localizable.xcstrings

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4748,6 +4748,28 @@
47484748
}
47494749
}
47504750
},
4751+
"Known Network" : {
4752+
"extractionState" : "manual",
4753+
"localizations" : {
4754+
"zh-Hans" : {
4755+
"stringUnit" : {
4756+
"state" : "translated",
4757+
"value" : "已知网络"
4758+
}
4759+
}
4760+
}
4761+
},
4762+
"Known Networks" : {
4763+
"extractionState" : "manual",
4764+
"localizations" : {
4765+
"zh-Hans" : {
4766+
"stringUnit" : {
4767+
"state" : "translated",
4768+
"value" : "已知网络"
4769+
}
4770+
}
4771+
}
4772+
},
47514773
"Later" : {
47524774
"extractionState" : "manual",
47534775
"localizations" : {
@@ -5922,6 +5944,28 @@
59225944
}
59235945
}
59245946
},
5947+
"Other Networks" : {
5948+
"extractionState" : "manual",
5949+
"localizations" : {
5950+
"zh-Hans" : {
5951+
"stringUnit" : {
5952+
"state" : "translated",
5953+
"value" : "其他网络"
5954+
}
5955+
}
5956+
}
5957+
},
5958+
"Other..." : {
5959+
"extractionState" : "manual",
5960+
"localizations" : {
5961+
"zh-Hans" : {
5962+
"stringUnit" : {
5963+
"state" : "translated",
5964+
"value" : "其他..."
5965+
}
5966+
}
5967+
}
5968+
},
59255969
"Password" : {
59265970
"extractionState" : "manual",
59275971
"localizations" : {
@@ -8438,6 +8482,119 @@
84388482
}
84398483
}
84408484
},
8485+
"Wi-Fi" : {
8486+
"extractionState" : "manual",
8487+
"localizations" : {
8488+
"ar" : {
8489+
"stringUnit" : {
8490+
"state" : "translated",
8491+
"value" : "Wi-Fi"
8492+
}
8493+
},
8494+
"cs" : {
8495+
"stringUnit" : {
8496+
"state" : "translated",
8497+
"value" : "Wi-Fi"
8498+
}
8499+
},
8500+
"de" : {
8501+
"stringUnit" : {
8502+
"state" : "translated",
8503+
"value" : "Wi-Fi"
8504+
}
8505+
},
8506+
"el" : {
8507+
"stringUnit" : {
8508+
"state" : "translated",
8509+
"value" : "Wi-Fi"
8510+
}
8511+
},
8512+
"es" : {
8513+
"stringUnit" : {
8514+
"state" : "translated",
8515+
"value" : "Wi-Fi"
8516+
}
8517+
},
8518+
"fr" : {
8519+
"stringUnit" : {
8520+
"state" : "translated",
8521+
"value" : "Wi-Fi"
8522+
}
8523+
},
8524+
"id" : {
8525+
"stringUnit" : {
8526+
"state" : "translated",
8527+
"value" : "Wi-Fi"
8528+
}
8529+
},
8530+
"it" : {
8531+
"stringUnit" : {
8532+
"state" : "translated",
8533+
"value" : "Wi-Fi"
8534+
}
8535+
},
8536+
"ko" : {
8537+
"stringUnit" : {
8538+
"state" : "translated",
8539+
"value" : "Wi-Fi"
8540+
}
8541+
},
8542+
"pl" : {
8543+
"stringUnit" : {
8544+
"state" : "translated",
8545+
"value" : "Wi-Fi"
8546+
}
8547+
},
8548+
"pt-BR" : {
8549+
"stringUnit" : {
8550+
"state" : "translated",
8551+
"value" : "Wi-Fi"
8552+
}
8553+
},
8554+
"pt-PT" : {
8555+
"stringUnit" : {
8556+
"state" : "translated",
8557+
"value" : "Wi-Fi"
8558+
}
8559+
},
8560+
"ro" : {
8561+
"stringUnit" : {
8562+
"state" : "translated",
8563+
"value" : "Wi-Fi"
8564+
}
8565+
},
8566+
"ru" : {
8567+
"stringUnit" : {
8568+
"state" : "translated",
8569+
"value" : "Wi-Fi"
8570+
}
8571+
},
8572+
"tr" : {
8573+
"stringUnit" : {
8574+
"state" : "translated",
8575+
"value" : "Wi-Fi"
8576+
}
8577+
},
8578+
"uk" : {
8579+
"stringUnit" : {
8580+
"state" : "translated",
8581+
"value" : "Wi-Fi"
8582+
}
8583+
},
8584+
"vi" : {
8585+
"stringUnit" : {
8586+
"state" : "translated",
8587+
"value" : "Wi-Fi"
8588+
}
8589+
},
8590+
"zh-Hans" : {
8591+
"stringUnit" : {
8592+
"state" : "translated",
8593+
"value" : "Wi-Fi"
8594+
}
8595+
}
8596+
}
8597+
},
84418598
"Wi-Fi Network \"" : {
84428599
"extractionState" : "manual",
84438600
"localizations" : {
@@ -8551,6 +8708,17 @@
85518708
}
85528709
}
85538710
},
8711+
"Wi-Fi Settings..." : {
8712+
"extractionState" : "manual",
8713+
"localizations" : {
8714+
"zh-Hans" : {
8715+
"stringUnit" : {
8716+
"state" : "translated",
8717+
"value" : "Wi-Fi设置..."
8718+
}
8719+
}
8720+
}
8721+
},
85548722
"Wi-Fi: Connected" : {
85558723
"extractionState" : "manual",
85568724
"localizations" : {

0 commit comments

Comments
 (0)