diff --git a/VoiceInk/PowerMode/ActiveWindowService.swift b/VoiceInk/PowerMode/ActiveWindowService.swift index 8c898f2..d093af5 100644 --- a/VoiceInk/PowerMode/ActiveWindowService.swift +++ b/VoiceInk/PowerMode/ActiveWindowService.swift @@ -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) } } diff --git a/VoiceInk/PowerMode/PowerModePopover.swift b/VoiceInk/PowerMode/PowerModePopover.swift index 3bbb992..ff552b9 100644 --- a/VoiceInk/PowerMode/PowerModePopover.swift +++ b/VoiceInk/PowerMode/PowerModePopover.swift @@ -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) diff --git a/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift b/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift index 0db6ed5..3aefce5 100644 --- a/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift +++ b/VoiceInk/Views/Recorder/EnhancementPromptPopover.swift @@ -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) diff --git a/VoiceInk/Views/Recorder/RecorderComponents.swift b/VoiceInk/Views/Recorder/RecorderComponents.swift index 6d8104c..221d351 100644 --- a/VoiceInk/Views/Recorder/RecorderComponents.swift +++ b/VoiceInk/Views/Recorder/RecorderComponents.swift @@ -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 ) {