mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added No available widgets to configure text when no widgets are available to configure in the widget settings
This commit is contained in:
@@ -40,6 +40,7 @@ open class Settings: NSStackView, Settings_p {
|
||||
|
||||
return view
|
||||
}()
|
||||
private let noWidgetsView: EmptyView = EmptyView(msg: localizedString("No available widgets to configure"))
|
||||
|
||||
private var oneViewState: Bool {
|
||||
get {
|
||||
@@ -231,6 +232,7 @@ open class Settings: NSStackView, Settings_p {
|
||||
let list = self.widgets.filter({ $0.isActive && $0.type != .label })
|
||||
|
||||
guard !list.isEmpty else {
|
||||
self.widgetSettingsContainer?.addArrangedSubview(self.noWidgetsView)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user