Add hover hint for power mode cards
This commit is contained in:
parent
e1c74439c2
commit
cad3b6b460
@ -88,6 +88,7 @@ struct ConfigurationRow: View {
|
||||
let onEditConfig: (PowerModeConfig) -> Void
|
||||
@EnvironmentObject var enhancementService: AIEnhancementService
|
||||
@EnvironmentObject var whisperState: WhisperState
|
||||
@State private var isHovering = false
|
||||
|
||||
private let maxAppIconsToShow = 5
|
||||
|
||||
@ -288,6 +289,34 @@ struct ConfigurationRow: View {
|
||||
}
|
||||
.background(CardBackground(isSelected: isEditing))
|
||||
.opacity(config.isEnabled ? 1.0 : 0.5)
|
||||
.overlay(
|
||||
Group {
|
||||
if isHovering {
|
||||
VStack {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "hand.tap")
|
||||
.font(.system(size: 10))
|
||||
Text("Right-click to edit/delete")
|
||||
.font(.caption2)
|
||||
}
|
||||
.foregroundColor(.secondary)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 4)
|
||||
.background(
|
||||
Capsule()
|
||||
.fill(Color(NSColor.controlBackgroundColor).opacity(0.9))
|
||||
)
|
||||
.padding(.top, 8)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
.onHover { hovering in
|
||||
withAnimation(.easeInOut(duration: 0.15)) {
|
||||
isHovering = hovering
|
||||
}
|
||||
}
|
||||
.contextMenu {
|
||||
Button(action: {
|
||||
onEditConfig(config)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user