ReadKeep/readeck/UI/Menu/PlayerQueueResumeButton.swift
Ilyas Hallak 387a026e7d Translate UI and error messages from German to English
- BookmarkDetail: All user-facing texts and error messages in BookmarkDetailView, BookmarkDetailViewModel, BookmarkLabelsView, and BookmarkLabelsViewModel translated to English.
- Bookmarks: All UI strings, swipe actions, and error messages in BookmarkCardView, BookmarksView, BookmarksViewModel, and related enums translated to English.
- Labels: All UI and error messages in LabelsView and LabelsViewModel translated to English.
- Menu: All sidebar/tab names, navigation titles, and queue texts in BookmarkState, PhoneTabView, PlayerQueueResumeButton, SidebarTab updated to English.
- Settings: All section headers, toggle labels, button texts, and error/success messages in FontSettingsView, FontSettingsViewModel, SettingsContainerView, SettingsGeneralView, SettingsGeneralViewModel, SettingsServerView, SettingsServerViewModel translated to English.
- SpeechPlayer: All player UI texts, progress, and queue messages in SpeechPlayerView translated to English.

This commit unifies the app language to English for all user-facing areas.
2025-07-18 14:57:45 +02:00

52 lines
2.0 KiB
Swift

import SwiftUI
struct PlayerQueueResumeButton: View {
@ObservedObject private var queue = SpeechQueue.shared
@EnvironmentObject var playerUIState: PlayerUIState
private let playerViewModel = SpeechPlayerViewModel()
var body: some View {
if queue.hasItems, !playerUIState.isPlayerVisible {
Button(action: {
playerViewModel.resume()
playerUIState.showPlayer()
}) {
HStack(spacing: 12) {
VStack(alignment: .leading, spacing: 2) {
Text("Read-aloud Queue")
.font(.caption2)
.foregroundColor(.secondary)
Text("\(queue.queueItems.count) articles in the queue")
.font(.subheadline)
.foregroundColor(.primary)
}
Spacer()
Button(action: {
playerViewModel.resume()
playerUIState.showPlayer()
}) {
Text("Resume listening")
.font(.subheadline)
.fontWeight(.semibold)
.padding(.horizontal, 14)
.padding(.vertical, 6)
.background(Color.accentColor.opacity(0.15))
.foregroundColor(.accentColor)
.cornerRadius(8)
}
.buttonStyle(PlainButtonStyle())
}
.padding(.vertical, 14)
.padding(.horizontal, 20)
}
.buttonStyle(PlainButtonStyle())
.background(Color(.systemBackground))
.listRowInsets(EdgeInsets())
.listRowBackground(Color(.systemBackground))
.padding(.bottom, 8)
.transition(.opacity)
.animation(.spring(), value: queue.hasItems)
}
}
}