Add show in finder button

This commit is contained in:
Beingpax 2025-06-16 22:19:06 +05:45
parent 3bd3b7b35a
commit f0dee3069b

View File

@ -275,6 +275,19 @@ struct AudioPlayerView: View {
)
HStack(spacing: 20) {
Button(action: showInFinder) {
Circle()
.fill(Color.orange.opacity(0.1))
.frame(width: 44, height: 44)
.overlay(
Image(systemName: "folder")
.font(.system(size: 18, weight: .semibold))
.foregroundStyle(Color.orange)
)
}
.buttonStyle(.plain)
.help("Show in Finder")
Button(action: {
if playerManager.isPlaying {
playerManager.pause()
@ -387,6 +400,10 @@ struct AudioPlayerView: View {
return String(format: "%d:%02d", minutes, seconds)
}
private func showInFinder() {
NSWorkspace.shared.selectFile(url.path, inFileViewerRootedAtPath: url.deletingLastPathComponent().path)
}
private func retranscribeAudio() {
guard let currentTranscriptionModel = whisperState.currentTranscriptionModel else {
errorMessage = "No transcription model selected"