broken changes

This commit is contained in:
Mark Gregory
2026-11-05 13:01:47 +00:00
parent abee603250
commit d5b24bff29
6 changed files with 150 additions and 5 deletions
+14 -3
View File
@@ -674,6 +674,7 @@ struct LibraryView: View {
@ObservedObject var model: AppModel
@State var showDJ = true
@State private var djSongSettings = false
@State private var studioSettingsModal = false
@State private var selected: Int64?
@State private var tableSelection = Set<Int64>()
@State private var waveformDetails = false
@@ -738,7 +739,15 @@ struct LibraryView: View {
Spacer()
if showDJ,["Library","Singer Songs","Playlists"].contains(source) {
Button("Song Settings") { djSongSettings = true }
.popover(isPresented:$djSongSettings) { detailPanel.frame(width:900,height:135).padding(12) }
.sheet(isPresented:$djSongSettings) {
VStack(spacing:0) {
HStack { VStack(alignment:.leading,spacing:4) { Text("Song Settings").font(.title2.bold());Text(selectedSong?.title ?? "Select a karaoke track to adjust its settings").font(.callout).foregroundStyle(.secondary) };Spacer() }.padding(24)
Divider()
detailPanel.frame(height:150).padding(16)
Divider()
HStack { Text("Changes save automatically").font(.caption).foregroundStyle(.secondary);Spacer();Button("Done") { djSongSettings = false }.keyboardShortcut(.defaultAction) }.padding(20)
}.frame(width:920).background(Color(nsColor:.windowBackgroundColor))
}
}
if source == "Library" {
Button { importing = true } label: { Label("Import Music",systemImage:"plus") }.buttonStyle(.bordered)
@@ -774,12 +783,14 @@ struct LibraryView: View {
.background(StudioTheme.frame)
.tint(.accentColor)
.focusedSceneValue(\.nameReinterpretation,NameReinterpretationCommands(perform:{beginReinterpretation()},enabled:["Library","Singer Songs"].contains(source) && (selectedSong != nil || !tableSelection.isEmpty)))
.focusedSceneValue(\.libraryCommands,LibraryCommands(importMusic:{importing = true},songInfo:{editingSong = selectedSong},canEdit:selectedSong != nil,play:playSelected,next:playNext,video:{openWindow(id:"lyrics")},settings:{source = "Settings"}))
.focusedSceneValue(\.libraryCommands,LibraryCommands(importMusic:{importing = true},songInfo:{editingSong = selectedSong},canEdit:selectedSong != nil,play:playSelected,next:playNext,video:{openWindow(id:"lyrics")},settings:{studioSettingsModal = true}))
.sheet(isPresented:$studioSettingsModal) { StudioSettingsDialog(model:model) }
.navigationTitle(source == "Singer Songs" ? (model.singers.first { $0.id == model.selectedSinger }?.name ?? "Singer") : source)
.navigationSubtitle(model.currentVenueName)
.searchable(text:$search,placement:.toolbar,prompt:"Search Music")
.toolbar {
ToolbarItemGroup {
Button { studioSettingsModal = true } label: { Label("Settings",systemImage:"gearshape") }
Button { showDJ.toggle() } label: { Label(showDJ ? "Hide DJ" : "Show DJ",systemImage:"waveform.path") }.help("Show or hide the DJ workspace; playback continues")
Menu {
Button("Import Files or Folder…") { importing = true }
@@ -924,7 +935,7 @@ struct LibraryView: View {
navigationRow("ShowScreens",symbol:"rectangle.on.rectangle")
navigationRow("Singer Web",symbol:"network")
navigationRow("Music Stores",symbol:"bag")
navigationRow("Settings",symbol:"gearshape")
Button { studioSettingsModal = true } label: { Label("Settings…",systemImage:"gearshape").frame(maxWidth:.infinity,alignment:.leading).padding(9) }.buttonStyle(.plain)
}.font(.body).listRowSeparator(.hidden).listRowInsets(EdgeInsets(top:1,leading:8,bottom:1,trailing:8))
}.listStyle(.sidebar)
Divider().padding(.horizontal,14)