mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Add alpha tags
This commit is contained in:
parent
1f0eea3cc6
commit
4e0659d4cc
3 changed files with 83 additions and 8 deletions
|
|
@ -2813,6 +2813,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ALPHA" : {
|
||||||
|
"comment" : "A label indicating a feature that is still in development.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Alpha Feature Warning" : {
|
||||||
|
"comment" : "The title of an alert that warns users about an alpha feature.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Always hide in fullscreen" : {
|
"Always hide in fullscreen" : {
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"ar" : {
|
"ar" : {
|
||||||
|
|
@ -6246,6 +6254,13 @@
|
||||||
"Custom OSD" : {
|
"Custom OSD" : {
|
||||||
"comment" : "The title of the settings screen for customizing the OSD.",
|
"comment" : "The title of the settings screen for customizing the OSD.",
|
||||||
"isCommentAutoGenerated" : true
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Custom OSD feature requires macOS 15 or later." : {
|
||||||
|
"comment" : "A description of the Custom OSD feature, visible only on macOS 15 or later.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
|
"Custom OSD is an experimental alpha feature and may contain bugs or unexpected behavior.\n\nThis feature requires macOS 15 or later and is still under active development. It's recommended to keep it disabled unless you want to help test it." : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Custom OSD is disabled because HUDs are enabled. Disable HUDs in the HUDs tab to use Custom OSD." : {
|
"Custom OSD is disabled because HUDs are enabled. Disable HUDs in the HUDs tab to use Custom OSD." : {
|
||||||
"comment" : "A message displayed below the toggle to inform the user that they cannot enable Custom OSD if HUDs are enabled.",
|
"comment" : "A message displayed below the toggle to inform the user that they cannot enable Custom OSD if HUDs are enabled.",
|
||||||
|
|
@ -7613,6 +7628,10 @@
|
||||||
"comment" : "A description of the media panel settings in the lock screen settings view.",
|
"comment" : "A description of the media panel settings in the lock screen settings view.",
|
||||||
"isCommentAutoGenerated" : true
|
"isCommentAutoGenerated" : true
|
||||||
},
|
},
|
||||||
|
"Enable Anyway" : {
|
||||||
|
"comment" : "A button that enables the Custom OSD feature despite the warning.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Enable Built-in System HUD" : {
|
"Enable Built-in System HUD" : {
|
||||||
"extractionState" : "stale",
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|
@ -11154,6 +11173,10 @@
|
||||||
"Mac battery at %d percent" : {
|
"Mac battery at %d percent" : {
|
||||||
"comment" : "Mac battery gauge accessibility label"
|
"comment" : "Mac battery gauge accessibility label"
|
||||||
},
|
},
|
||||||
|
"macOS 15 or later required" : {
|
||||||
|
"comment" : "A message displayed when the Custom OSD feature is unavailable on this version of macOS.",
|
||||||
|
"isCommentAutoGenerated" : true
|
||||||
|
},
|
||||||
"Made with ❤️ by Ebullioscopic" : {
|
"Made with ❤️ by Ebullioscopic" : {
|
||||||
"comment" : "A footer text that credits the developer of the app.",
|
"comment" : "A footer text that credits the developer of the app.",
|
||||||
"isCommentAutoGenerated" : true
|
"isCommentAutoGenerated" : true
|
||||||
|
|
|
||||||
|
|
@ -261,6 +261,18 @@ struct SettingsView: View {
|
||||||
sidebarIcon(for: tab)
|
sidebarIcon(for: tab)
|
||||||
Text(tab.title)
|
Text(tab.title)
|
||||||
.foregroundStyle(Color.primary)
|
.foregroundStyle(Color.primary)
|
||||||
|
if tab == .osd {
|
||||||
|
Spacer()
|
||||||
|
Text("ALPHA")
|
||||||
|
.font(.system(size: 9, weight: .bold))
|
||||||
|
.foregroundStyle(.white)
|
||||||
|
.padding(.horizontal, 6)
|
||||||
|
.padding(.vertical, 2)
|
||||||
|
.background(
|
||||||
|
Capsule()
|
||||||
|
.fill(Color.orange)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.padding(.vertical, 4)
|
.padding(.vertical, 4)
|
||||||
}
|
}
|
||||||
|
|
@ -728,7 +740,25 @@ struct SettingsView: View {
|
||||||
}
|
}
|
||||||
case .osd:
|
case .osd:
|
||||||
SettingsForm(tab: .osd) {
|
SettingsForm(tab: .osd) {
|
||||||
CustomOSDSettings()
|
if #available(macOS 15.0, *) {
|
||||||
|
CustomOSDSettings()
|
||||||
|
} else {
|
||||||
|
VStack(spacing: 16) {
|
||||||
|
Image(systemName: "exclamationmark.triangle.fill")
|
||||||
|
.font(.system(size: 48))
|
||||||
|
.foregroundStyle(.orange)
|
||||||
|
|
||||||
|
Text("macOS 15 or later required")
|
||||||
|
.font(.headline)
|
||||||
|
|
||||||
|
Text("Custom OSD feature requires macOS 15 or later.")
|
||||||
|
.font(.subheadline)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
}
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
|
.padding()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case .battery:
|
case .battery:
|
||||||
SettingsForm(tab: .battery) {
|
SettingsForm(tab: .battery) {
|
||||||
|
|
@ -4362,6 +4392,7 @@ struct ColorPickerSettings: View {
|
||||||
|
|
||||||
struct CustomOSDSettings: View {
|
struct CustomOSDSettings: View {
|
||||||
@Default(.enableCustomOSD) var enableCustomOSD
|
@Default(.enableCustomOSD) var enableCustomOSD
|
||||||
|
@Default(.hasSeenOSDAlphaWarning) var hasSeenOSDAlphaWarning
|
||||||
@Default(.enableOSDVolume) var enableOSDVolume
|
@Default(.enableOSDVolume) var enableOSDVolume
|
||||||
@Default(.enableOSDBrightness) var enableOSDBrightness
|
@Default(.enableOSDBrightness) var enableOSDBrightness
|
||||||
@Default(.enableOSDKeyboardBacklight) var enableOSDKeyboardBacklight
|
@Default(.enableOSDKeyboardBacklight) var enableOSDKeyboardBacklight
|
||||||
|
|
@ -4369,6 +4400,7 @@ struct CustomOSDSettings: View {
|
||||||
@Default(.osdIconColorStyle) var osdIconColorStyle
|
@Default(.osdIconColorStyle) var osdIconColorStyle
|
||||||
@Default(.enableSystemHUD) var enableSystemHUD
|
@Default(.enableSystemHUD) var enableSystemHUD
|
||||||
|
|
||||||
|
@State private var showAlphaWarning = false
|
||||||
@State private var previewValue: CGFloat = 0.65
|
@State private var previewValue: CGFloat = 0.65
|
||||||
@State private var previewType: SneakContentType = .volume
|
@State private var previewType: SneakContentType = .volume
|
||||||
|
|
||||||
|
|
@ -4379,15 +4411,22 @@ struct CustomOSDSettings: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
Section {
|
Section {
|
||||||
Toggle("Enable Custom OSD", isOn: $enableCustomOSD)
|
Toggle("Enable Custom OSD", isOn: Binding(
|
||||||
.settingsHighlight(id: highlightID("Enable Custom OSD"))
|
get: { enableCustomOSD },
|
||||||
.disabled(enableSystemHUD)
|
set: { newValue in
|
||||||
.onChange(of: enableCustomOSD) { _, enabled in
|
if newValue && !hasSeenOSDAlphaWarning {
|
||||||
if enabled {
|
showAlphaWarning = true
|
||||||
// Disable System HUD when OSD is enabled
|
} else {
|
||||||
enableSystemHUD = false
|
enableCustomOSD = newValue
|
||||||
|
if newValue {
|
||||||
|
// Disable System HUD when OSD is enabled
|
||||||
|
enableSystemHUD = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
))
|
||||||
|
.settingsHighlight(id: highlightID("Enable Custom OSD"))
|
||||||
|
.disabled(enableSystemHUD)
|
||||||
} header: {
|
} header: {
|
||||||
Text("General")
|
Text("General")
|
||||||
} footer: {
|
} footer: {
|
||||||
|
|
@ -4501,6 +4540,18 @@ struct CustomOSDSettings: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.alert("Alpha Feature Warning", isPresented: $showAlphaWarning) {
|
||||||
|
Button("Cancel", role: .cancel) {
|
||||||
|
enableCustomOSD = false
|
||||||
|
}
|
||||||
|
Button("Enable Anyway") {
|
||||||
|
hasSeenOSDAlphaWarning = true
|
||||||
|
enableCustomOSD = true
|
||||||
|
enableSystemHUD = false
|
||||||
|
}
|
||||||
|
} message: {
|
||||||
|
Text("Custom OSD is an experimental alpha feature and may contain bugs or unexpected behavior.\n\nThis feature requires macOS 15 or later and is still under active development. It's recommended to keep it disabled unless you want to help test it.")
|
||||||
|
}
|
||||||
.navigationTitle("Custom OSD")
|
.navigationTitle("Custom OSD")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -589,6 +589,7 @@ extension Defaults.Keys {
|
||||||
|
|
||||||
// MARK: Custom OSD Window Feature
|
// MARK: Custom OSD Window Feature
|
||||||
static let enableCustomOSD = Key<Bool>("enableCustomOSD", default: false)
|
static let enableCustomOSD = Key<Bool>("enableCustomOSD", default: false)
|
||||||
|
static let hasSeenOSDAlphaWarning = Key<Bool>("hasSeenOSDAlphaWarning", default: false)
|
||||||
static let enableOSDVolume = Key<Bool>("enableOSDVolume", default: true)
|
static let enableOSDVolume = Key<Bool>("enableOSDVolume", default: true)
|
||||||
static let enableOSDBrightness = Key<Bool>("enableOSDBrightness", default: true)
|
static let enableOSDBrightness = Key<Bool>("enableOSDBrightness", default: true)
|
||||||
static let enableOSDKeyboardBacklight = Key<Bool>("enableOSDKeyboardBacklight", default: true)
|
static let enableOSDKeyboardBacklight = Key<Bool>("enableOSDKeyboardBacklight", default: true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue