Mini recorder: sparkle fallback; popover empty-state; dim disabled prompts
This commit is contained in:
parent
b9fa45bac9
commit
6ff9ea8eda
@ -60,7 +60,8 @@ class ActiveWindowService: ObservableObject {
|
||||
PowerModeManager.shared.setActiveConfiguration(config)
|
||||
}
|
||||
await PowerModeSessionManager.shared.beginSession(with: config)
|
||||
} else {
|
||||
// If no config found, keep the current active configuration (don't clear it)
|
||||
}
|
||||
// If no config found, keep the current active configuration (don't clear it)
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,17 +16,33 @@ struct PowerModePopover: View {
|
||||
.background(Color.white.opacity(0.1))
|
||||
|
||||
ScrollView {
|
||||
let enabledConfigs = powerModeManager.configurations.filter { $0.isEnabled }
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
ForEach(powerModeManager.configurations.filter { $0.isEnabled }) { config in
|
||||
PowerModeRow(
|
||||
config: config,
|
||||
isSelected: selectedConfig?.id == config.id,
|
||||
action: {
|
||||
powerModeManager.setActiveConfiguration(config)
|
||||
selectedConfig = config
|
||||
applySelectedConfiguration()
|
||||
}
|
||||
)
|
||||
if enabledConfigs.isEmpty {
|
||||
VStack(alignment: .center, spacing: 8) {
|
||||
Image(systemName: "sparkles")
|
||||
.foregroundColor(.white.opacity(0.6))
|
||||
.font(.system(size: 16))
|
||||
Text("No Power Modes Available")
|
||||
.foregroundColor(.white.opacity(0.8))
|
||||
.font(.system(size: 13))
|
||||
.lineLimit(1)
|
||||
.truncationMode(.tail)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 16)
|
||||
} else {
|
||||
ForEach(enabledConfigs) { config in
|
||||
PowerModeRow(
|
||||
config: config,
|
||||
isSelected: selectedConfig?.id == config.id,
|
||||
action: {
|
||||
powerModeManager.setActiveConfiguration(config)
|
||||
selectedConfig = config
|
||||
applySelectedConfiguration()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
|
||||
@ -72,10 +72,10 @@ struct EnhancementPromptRow: View {
|
||||
// Use the icon from the prompt
|
||||
Image(systemName: prompt.icon.rawValue)
|
||||
.font(.system(size: 14))
|
||||
.foregroundColor(isDisabled ? .white.opacity(0.6) : .white.opacity(0.7))
|
||||
.foregroundColor(isDisabled ? .white.opacity(0.4) : .white.opacity(0.7))
|
||||
|
||||
Text(prompt.title)
|
||||
.foregroundColor(isDisabled ? .white.opacity(0.7) : .white.opacity(0.9))
|
||||
.foregroundColor(isDisabled ? .white.opacity(0.4) : .white.opacity(0.9))
|
||||
.font(.system(size: 13))
|
||||
.lineLimit(1)
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ struct RecorderPowerModeButton: View {
|
||||
var body: some View {
|
||||
RecorderToggleButton(
|
||||
isEnabled: !powerModeManager.enabledConfigurations.isEmpty,
|
||||
icon: powerModeManager.currentActiveConfiguration?.emoji ?? "✨",
|
||||
icon: powerModeManager.enabledConfigurations.isEmpty ? "✨" : (powerModeManager.currentActiveConfiguration?.emoji ?? "✨"),
|
||||
color: .orange,
|
||||
disabled: powerModeManager.enabledConfigurations.isEmpty
|
||||
) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user