Temporarily disable Power Mode UI

This commit is contained in:
Beingpax 2025-08-05 18:59:58 +05:45
parent 800cb75f7f
commit 1db6716539
3 changed files with 38 additions and 32 deletions

View File

@ -173,6 +173,8 @@ class MiniRecorderShortcutManager: ObservableObject {
guard let self = self,
await self.whisperState.isMiniRecorderVisible else { return }
// TODO: Power Mode shortcut handling will be re-implemented later.
/*
let powerModeManager = PowerModeManager.shared
if !powerModeManager.enabledConfigurations.isEmpty {
@ -183,6 +185,7 @@ class MiniRecorderShortcutManager: ObservableObject {
await PowerModeSessionManager.shared.beginSession(with: selectedConfig)
}
} else {
*/
guard let enhancementService = await self.whisperState.getEnhancementService() else { return }
let availablePrompts = enhancementService.allPrompts
@ -193,7 +196,9 @@ class MiniRecorderShortcutManager: ObservableObject {
enhancementService.setActivePrompt(availablePrompts[index])
}
/*
}
*/
}
}
}

View File

@ -136,7 +136,7 @@ struct PowerModeView: View {
.font(.system(size: 20, weight: .medium))
.foregroundColor(.primary)
Text("Create your first power mode to automate your VoiceInk workflow based on apps/website you are using")
Text("Create first power mode to automate your VoiceInk workflow based on apps/website you are using")
.font(.system(size: 14))
.foregroundColor(.secondary)
.multilineTextAlignment(.center)

View File

@ -53,39 +53,40 @@ struct NotchRecorderView: View {
}
private var rightToggleButton: some View {
Group {
if !powerModeManager.enabledConfigurations.isEmpty {
RecorderToggleButton(
isEnabled: !powerModeManager.enabledConfigurations.isEmpty,
icon: powerModeManager.currentActiveConfiguration?.emoji ?? "⚙️",
color: .orange,
disabled: false
) {
showPowerModePopover.toggle()
}
.frame(width: 22)
.popover(isPresented: $showPowerModePopover, arrowEdge: .bottom) {
PowerModePopover()
}
} else {
RecorderToggleButton(
isEnabled: enhancementService.isEnhancementEnabled,
icon: enhancementService.activePrompt?.icon.rawValue ?? "brain",
color: .blue,
disabled: false
) {
if enhancementService.isEnhancementEnabled {
showEnhancementPromptPopover.toggle()
} else {
enhancementService.isEnhancementEnabled = true
}
}
.frame(width: 22)
.popover(isPresented: $showEnhancementPromptPopover, arrowEdge: .bottom) {
EnhancementPromptPopover()
.environmentObject(enhancementService)
HStack(spacing: 4) {
// TODO: PowerMode button will be implemented in the future
/*
RecorderToggleButton(
isEnabled: !powerModeManager.enabledConfigurations.isEmpty,
icon: powerModeManager.currentActiveConfiguration?.emoji ?? "⚙️",
color: .orange,
disabled: false
) {
showPowerModePopover.toggle()
}
.frame(width: 22)
.popover(isPresented: $showPowerModePopover, arrowEdge: .bottom) {
PowerModePopover()
}
*/
RecorderToggleButton(
isEnabled: enhancementService.isEnhancementEnabled,
icon: enhancementService.activePrompt?.icon.rawValue ?? "brain",
color: .blue,
disabled: false
) {
if enhancementService.isEnhancementEnabled {
showEnhancementPromptPopover.toggle()
} else {
enhancementService.isEnhancementEnabled = true
}
}
.frame(width: 22)
.popover(isPresented: $showEnhancementPromptPopover, arrowEdge: .bottom) {
EnhancementPromptPopover()
.environmentObject(enhancementService)
}
}
}