From 6e8931e96ba39d633e878376a3163c71f693acb1 Mon Sep 17 00:00:00 2001 From: pilot-773 <151336892+pilot-773@users.noreply.github.com> Date: Mon, 29 Sep 2025 21:39:35 +0100 Subject: [PATCH 01/11] stuff --- Promptly/Models/Script.swift | 22 +++++++++++++++-- .../LivePerforemanceView.swift | 24 +++++++++++-------- README.md | 6 +++++ 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index daceb75..9655d38 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -7,6 +7,7 @@ import Foundation import SwiftData +import SwiftUI @Model class Script: Identifiable { @@ -176,6 +177,7 @@ enum CueType: String, Codable, CaseIterable { case flyGo = "fly_go" case automationStandby = "automation_standby" case automationGo = "automation_go" + case setWarning = "set_warning" case setStandby = "set_standby" case setGo = "set_go" case cuelightStandby = "cuelight_standby" @@ -191,6 +193,7 @@ enum CueType: String, Codable, CaseIterable { case .flyGo: return "Fly GO" case .automationStandby: return "Auto Standby" case .automationGo: return "Auto GO" + case .setWarning: return "Set Warning" case .setStandby: return "Set Standby" case .setGo: return "Set GO" case .cuelightStandby: return "Cuelight Standby" @@ -198,16 +201,31 @@ enum CueType: String, Codable, CaseIterable { } } - var color: String { + var categoryColor: String { switch self { case .lightingStandby, .lightingGo: return "#FFD700" case .soundStandby, .soundGo: return "#FF6B6B" case .flyStandby, .flyGo: return "#4ECDC4" case .automationStandby, .automationGo: return "#45B7D1" - case .setStandby, .setGo: return "#944ECD" + case .setStandby, .setGo, .setWarning: return "#944ECD" case .cuelightStandby, .cuelightGo: return "#CD4EBC" } } + + var sideColor: String { + switch self { + case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .setStandby, .setWarning, .cuelightStandby: return Color.orange + case .lightingGo, .soundGo, .flyGo, .automationGo, .setGo, .cuelightGo: return Color.green + } + } + + var cueTypeDisplay: String { + switch self { + case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .setStandby, .cuelightStandby: return "STANDBY" + case .lightingGo, .soundGo, .flyGo, .automationGo, .setGo, .cuelightGo: return "GO" + case .setWarning: return "WARNING" + } + } } enum MarkColor: String, Codable, CaseIterable { diff --git a/Promptly/Views/Performance Mode/LivePerforemanceView.swift b/Promptly/Views/Performance Mode/LivePerforemanceView.swift index 2cad814..0d8811e 100644 --- a/Promptly/Views/Performance Mode/LivePerforemanceView.swift +++ b/Promptly/Views/Performance Mode/LivePerforemanceView.swift @@ -882,7 +882,7 @@ struct DSMScriptLineView: View { for cue in cues { var label = AttributedString("⬇︎ \(cue.label) ") - label.foregroundColor = calledCues.contains(cue.id) ? .secondary : Color(hex: cue.type.color) + label.foregroundColor = calledCues.contains(cue.id) ? .secondary : Color(hex: cue.type.categoryColor) label.inlinePresentationIntent = .emphasized if calledCues.contains(cue.id) { @@ -959,7 +959,7 @@ struct CueTagView: View { var body: some View { HStack(spacing: 4) { Circle() - .fill(Color(hex: cue.type.color)) + .fill(Color(hex: cue.type.categoryColor)) .frame(width: 8, height: 8) Text(cue.label) @@ -971,11 +971,11 @@ struct CueTagView: View { } .padding(.horizontal, 12) .padding(.vertical, 8) - .background(Color(hex: cue.type.color).opacity(isCalled ? 0.1 : 0.2)) + .background(Color(hex: cue.type.categoryColor).opacity(isCalled ? 0.1 : 0.2)) .cornerRadius(8) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(isCalled ? Color.gray : Color(hex: cue.type.color), lineWidth: 2) + .stroke(isCalled ? Color.gray : Color(hex: cue.type.categoryColor), lineWidth: 2) ) } } @@ -1036,7 +1036,7 @@ struct DSMCueBoxView: View { VStack(alignment: .leading, spacing: 8) { HStack { Circle() - .fill(Color(hex: cue.type.color)) + .fill(Color(hex: cue.type.categoryColor)) .frame(width: 10, height: 10) Text(cue.label) @@ -1077,7 +1077,7 @@ struct DSMCueBoxView: View { Spacer() - Button(cue.type.isStandby ? "STANDBY" : "GO") { + Button(cue.type.cueTypeDisplay) { onExecute() } .font(.caption) @@ -1085,7 +1085,7 @@ struct DSMCueBoxView: View { .foregroundColor(.white) .padding(.horizontal, 12) .padding(.vertical, 6) - .background(isCalled ? Color.gray : (cue.type.isStandby ? Color.orange : Color.green)) + .background(isCalled ? Color.gray : (cue.type.sideColor)) .cornerRadius(6) .disabled(isCalled) } @@ -1095,7 +1095,7 @@ struct DSMCueBoxView: View { .cornerRadius(8) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(isCalled ? Color.gray : Color(hex: cue.type.color), lineWidth: 1) + .stroke(isCalled ? Color.gray : Color(hex: cue.type.categoryColor), lineWidth: 1) ) } .buttonStyle(PlainButtonStyle()) @@ -1575,8 +1575,10 @@ extension DSMPerformanceView { } private func executeCue(_ cue: Cue) { - if cue.type.isStandby { + if cue.type.cueTypeDisplay == "STANDBY" { logCall("STANDBY: \(cue.label)", type: .call) + } else if cue.type.cueTypeDisplay == "WARNING" { + logCall("WARNING: \(cue.label)", type: .call) } else { logCall("GO: \(cue.label)", type: .action) } @@ -1635,8 +1637,10 @@ extension DSMPerformanceView { ) cueExecutions.append(execution) - if cue.type.isStandby { + if cue.type.cueTypeDisplay == "STANDBY" { logCall("REMOTE STANDBY: \(cue.label)", type: .call) + } else if cue.type.cueTypeDisplay == "WARNING" { + logCall("REMOTE WARNING: \(cue.label)", type: .call) } else { logCall("REMOTE GO: \(cue.label)", type: .action) } diff --git a/README.md b/README.md index c711b07..8e0bb02 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,14 @@ - CRUD cues - Run shows - Use an open source 3d ESP based project to go to next line +- Everything's local, so no worries about internet loss - And more! +## Planned Major Features +- Multi-user shows with informative views for Lighting, Sound, Props, Stage Crew (on Apple Watch) +- Automatic on-the-fly cue updates on the aforementioned devices +- Preshow checks from each user, ensuring everyone's ready, even off the comms link! + ## How do I contribute? - Please fork the repo, and commit to a new branch - Then PR into this repo with your feature From 1c940903b30a968f6d4954c5dc4b0949ba1b6627 Mon Sep 17 00:00:00 2001 From: pilot-773 <151336892+pilot-773@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:27:49 +0100 Subject: [PATCH 02/11] Update Script.swift --- Promptly/Models/Script.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index 9655d38..2b9acd9 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -201,7 +201,7 @@ enum CueType: String, Codable, CaseIterable { } } - var categoryColor: String { + var color: String { switch self { case .lightingStandby, .lightingGo: return "#FFD700" case .soundStandby, .soundGo: return "#FF6B6B" From e4c19a969f015cbaa8475c7842d57211f2e1eca0 Mon Sep 17 00:00:00 2001 From: pilot-773 <151336892+pilot-773@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:33:19 +0100 Subject: [PATCH 03/11] Update LivePerforemanceView.swift --- .../Performance Mode/LivePerforemanceView.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Promptly/Views/Performance Mode/LivePerforemanceView.swift b/Promptly/Views/Performance Mode/LivePerforemanceView.swift index 0d8811e..22a525c 100644 --- a/Promptly/Views/Performance Mode/LivePerforemanceView.swift +++ b/Promptly/Views/Performance Mode/LivePerforemanceView.swift @@ -1,4 +1,4 @@ -import SwiftUI +limport SwiftUI import SwiftData struct DSMPerformanceView: View { @@ -882,7 +882,7 @@ struct DSMScriptLineView: View { for cue in cues { var label = AttributedString("⬇︎ \(cue.label) ") - label.foregroundColor = calledCues.contains(cue.id) ? .secondary : Color(hex: cue.type.categoryColor) + label.foregroundColor = calledCues.contains(cue.id) ? .secondary : Color(hex: cue.type.color) label.inlinePresentationIntent = .emphasized if calledCues.contains(cue.id) { @@ -959,7 +959,7 @@ struct CueTagView: View { var body: some View { HStack(spacing: 4) { Circle() - .fill(Color(hex: cue.type.categoryColor)) + .fill(Color(hex: cue.type.color)) .frame(width: 8, height: 8) Text(cue.label) @@ -971,11 +971,11 @@ struct CueTagView: View { } .padding(.horizontal, 12) .padding(.vertical, 8) - .background(Color(hex: cue.type.categoryColor).opacity(isCalled ? 0.1 : 0.2)) + .background(Color(hex: cue.type.color).opacity(isCalled ? 0.1 : 0.2)) .cornerRadius(8) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(isCalled ? Color.gray : Color(hex: cue.type.categoryColor), lineWidth: 2) + .stroke(isCalled ? Color.gray : Color(hex: cue.type.color), lineWidth: 2) ) } } @@ -1036,7 +1036,7 @@ struct DSMCueBoxView: View { VStack(alignment: .leading, spacing: 8) { HStack { Circle() - .fill(Color(hex: cue.type.categoryColor)) + .fill(Color(hex: cue.type.color)) .frame(width: 10, height: 10) Text(cue.label) @@ -1095,7 +1095,7 @@ struct DSMCueBoxView: View { .cornerRadius(8) .overlay( RoundedRectangle(cornerRadius: 8) - .stroke(isCalled ? Color.gray : Color(hex: cue.type.categoryColor), lineWidth: 1) + .stroke(isCalled ? Color.gray : Color(hex: cue.type.color), lineWidth: 1) ) } .buttonStyle(PlainButtonStyle()) From 6debbbe3082a5e46793458c48215ffc384528cad Mon Sep 17 00:00:00 2001 From: pilot773 Date: Tue, 30 Sep 2025 17:46:31 +0100 Subject: [PATCH 04/11] wow my new cues are done --- .../Performance Mode/LivePerforemanceView.swift | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Promptly/Views/Performance Mode/LivePerforemanceView.swift b/Promptly/Views/Performance Mode/LivePerforemanceView.swift index 22a525c..0297de9 100644 --- a/Promptly/Views/Performance Mode/LivePerforemanceView.swift +++ b/Promptly/Views/Performance Mode/LivePerforemanceView.swift @@ -1723,16 +1723,3 @@ extension PerformanceState { } } } - -extension CueType { - var isStandby: Bool { - switch self { - case .lightingStandby, .soundStandby, .flyStandby, .automationStandby: - return true - default: - return false - } - } -} - - From b67460b0d9d56f93056c35f247a6e4239f4e1cec Mon Sep 17 00:00:00 2001 From: pilot773 Date: Tue, 30 Sep 2025 19:09:16 +0100 Subject: [PATCH 05/11] special execution settings --- Promptly/Models/Script.swift | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index 2b9acd9..925248c 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -168,6 +168,35 @@ enum CueOffset: String, Codable, CaseIterable { case after = "after" } +enum StageLocation: String, Codable, CaseIterable { + case leftWing = "left_wing" + case rightWing = "right_wing" + case upstage = "upstage" + case pit = "pit" +} + +struct CueHapticConfig: Codable { + var location: StageLocation + var number: Int +} + +struct OSCSettings: Codable { + var ip: UInt32 + var port: UInt16 + var address: String +} + +enum ExecutionType: String, Codable, CaseIterable { // not implemented yet for compatibility purposes, just putting it here for future + case osc = "osc" // execute osc cmd + case haptic = "haptic" // watch haptic +} + +struct ExecutionSettings: Codable { + var execution: ExecutionType + var osc: OSCSettings + var haptic: CueHapticConfig +} + enum CueType: String, Codable, CaseIterable { case lightingStandby = "lighting_standby" case lightingGo = "lighting_go" @@ -226,6 +255,20 @@ enum CueType: String, Codable, CaseIterable { case .setWarning: return "WARNING" } } + + var hapticAbility: Bool { + switch self { + case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .cuelightStandby, .lightingGo, .soundGo, .flyGo, .automationGo, .cuelightGo: return false + case .setWarning, .setStandby, .setGo: return true + } + } + + var hasSettings: Bool { + switch self { + case .lightingStandby, .soundStandby, .flyStandby, .cuelightStandby, .automationStandby, .lightingGo, .soundGo, .flyGo, .cuelightGo: return false + case .setWarning, .setStandby, .setGo, .automationGo: return true + } + } } enum MarkColor: String, Codable, CaseIterable { From 72a5d3142a85d1232a2221d6e7d3911a25454e44 Mon Sep 17 00:00:00 2001 From: pilot773 Date: Wed, 1 Oct 2025 18:03:13 +0100 Subject: [PATCH 06/11] remove osc --- Promptly/Models/Script.swift | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index 925248c..aa2ebe0 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -176,25 +176,8 @@ enum StageLocation: String, Codable, CaseIterable { } struct CueHapticConfig: Codable { - var location: StageLocation - var number: Int -} - -struct OSCSettings: Codable { - var ip: UInt32 - var port: UInt16 - var address: String -} - -enum ExecutionType: String, Codable, CaseIterable { // not implemented yet for compatibility purposes, just putting it here for future - case osc = "osc" // execute osc cmd - case haptic = "haptic" // watch haptic -} - -struct ExecutionSettings: Codable { - var execution: ExecutionType - var osc: OSCSettings - var haptic: CueHapticConfig + var location: StageLocation // where are they (if someone is away used for quick swapping) + var crewId: Int // unique id (goes from 0, 1, 2 etc) for the crew member, regardless of position } enum CueType: String, Codable, CaseIterable { From 3d4ce1a5471bde1947e22e78ff10963287a1fc7b Mon Sep 17 00:00:00 2001 From: pilot773 Date: Wed, 1 Oct 2025 19:25:07 +0100 Subject: [PATCH 07/11] remove osc #2 - forgot smth --- Promptly/Models/Script.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index aa2ebe0..8a03b49 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -245,13 +245,6 @@ enum CueType: String, Codable, CaseIterable { case .setWarning, .setStandby, .setGo: return true } } - - var hasSettings: Bool { - switch self { - case .lightingStandby, .soundStandby, .flyStandby, .cuelightStandby, .automationStandby, .lightingGo, .soundGo, .flyGo, .cuelightGo: return false - case .setWarning, .setStandby, .setGo, .automationGo: return true - } - } } enum MarkColor: String, Codable, CaseIterable { From 923fb97685c0b3676f72fb554ef02e33cce253a8 Mon Sep 17 00:00:00 2001 From: pilot-773 <151336892+pilot-773@users.noreply.github.com> Date: Thu, 2 Oct 2025 08:02:48 +0100 Subject: [PATCH 08/11] Update LivePerforemanceView.swift Co-authored-by: Sasha <110257462+Fluffik3666@users.noreply.github.com> --- Promptly/Views/Performance Mode/LivePerforemanceView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Promptly/Views/Performance Mode/LivePerforemanceView.swift b/Promptly/Views/Performance Mode/LivePerforemanceView.swift index 0297de9..d01f4a5 100644 --- a/Promptly/Views/Performance Mode/LivePerforemanceView.swift +++ b/Promptly/Views/Performance Mode/LivePerforemanceView.swift @@ -1,4 +1,4 @@ -limport SwiftUI +import SwiftUI import SwiftData struct DSMPerformanceView: View { From 5fc9ba27b72d77625eaebec8d339daa9b8d82b8e Mon Sep 17 00:00:00 2001 From: pilot-773 <151336892+pilot-773@users.noreply.github.com> Date: Thu, 2 Oct 2025 08:10:56 +0100 Subject: [PATCH 09/11] stage locations --- Promptly/Models/Script.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index 8a03b49..979eb9e 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -169,10 +169,19 @@ enum CueOffset: String, Codable, CaseIterable { } enum StageLocation: String, Codable, CaseIterable { + case pit = "pit" case leftWing = "left_wing" case rightWing = "right_wing" case upstage = "upstage" - case pit = "pit" + case downstage = "downstage" + case stageLeft = "stage_left" + case stageRight = "stage_right" + case upstageLeft = "upstage_left" + case upstageRight = "upstage_right" + case downstageLeft = "downstage_left" + case downstageRight = "downstage_right" + case centerStage = "center_stage" + } struct CueHapticConfig: Codable { From 1a0e5d5cd07085d6e23844f3d6a81637393c4d42 Mon Sep 17 00:00:00 2001 From: pilot-773 <151336892+pilot-773@users.noreply.github.com> Date: Thu, 2 Oct 2025 08:14:00 +0100 Subject: [PATCH 10/11] update cue.type naming --- Promptly/Models/Script.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index 979eb9e..72061c1 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -233,14 +233,14 @@ enum CueType: String, Codable, CaseIterable { } } - var sideColor: String { + var cueStackColor: String { switch self { case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .setStandby, .setWarning, .cuelightStandby: return Color.orange case .lightingGo, .soundGo, .flyGo, .automationGo, .setGo, .cuelightGo: return Color.green } } - var cueTypeDisplay: String { + var generalName: String { switch self { case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .setStandby, .cuelightStandby: return "STANDBY" case .lightingGo, .soundGo, .flyGo, .automationGo, .setGo, .cuelightGo: return "GO" @@ -248,7 +248,7 @@ enum CueType: String, Codable, CaseIterable { } } - var hapticAbility: Bool { + var canHaptic: Bool { switch self { case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .cuelightStandby, .lightingGo, .soundGo, .flyGo, .automationGo, .cuelightGo: return false case .setWarning, .setStandby, .setGo: return true From 7505d038ef450ee5698eb0ecf150e34892731fc4 Mon Sep 17 00:00:00 2001 From: pilot773 Date: Thu, 2 Oct 2025 18:05:15 +0100 Subject: [PATCH 11/11] finish sasha changes --- Promptly/Models/Script.swift | 7 +++++++ .../Performance Mode/LivePerforemanceView.swift | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Promptly/Models/Script.swift b/Promptly/Models/Script.swift index 72061c1..d22d50a 100644 --- a/Promptly/Models/Script.swift +++ b/Promptly/Models/Script.swift @@ -254,6 +254,13 @@ enum CueType: String, Codable, CaseIterable { case .setWarning, .setStandby, .setGo: return true } } + + var isStandby: Bool { + switch self { + case .lightingStandby, .soundStandby, .flyStandby, .automationStandby, .setStandby, .cuelightStandby, .setWarning: return true + case .lightingGo, .soundGo, .flyGo, .automationGo, .setGo, .cuelightGo: return false + } + } } enum MarkColor: String, Codable, CaseIterable { diff --git a/Promptly/Views/Performance Mode/LivePerforemanceView.swift b/Promptly/Views/Performance Mode/LivePerforemanceView.swift index d01f4a5..bf69e45 100644 --- a/Promptly/Views/Performance Mode/LivePerforemanceView.swift +++ b/Promptly/Views/Performance Mode/LivePerforemanceView.swift @@ -1077,7 +1077,7 @@ struct DSMCueBoxView: View { Spacer() - Button(cue.type.cueTypeDisplay) { + Button(cue.type.generalName) { onExecute() } .font(.caption) @@ -1085,7 +1085,7 @@ struct DSMCueBoxView: View { .foregroundColor(.white) .padding(.horizontal, 12) .padding(.vertical, 6) - .background(isCalled ? Color.gray : (cue.type.sideColor)) + .background(isCalled ? Color.gray : (cue.type.cueStackColor)) .cornerRadius(6) .disabled(isCalled) } @@ -1575,9 +1575,9 @@ extension DSMPerformanceView { } private func executeCue(_ cue: Cue) { - if cue.type.cueTypeDisplay == "STANDBY" { + if cue.type.generalName == "STANDBY" { logCall("STANDBY: \(cue.label)", type: .call) - } else if cue.type.cueTypeDisplay == "WARNING" { + } else if cue.type.generalName == "WARNING" { logCall("WARNING: \(cue.label)", type: .call) } else { logCall("GO: \(cue.label)", type: .action) @@ -1637,9 +1637,9 @@ extension DSMPerformanceView { ) cueExecutions.append(execution) - if cue.type.cueTypeDisplay == "STANDBY" { + if cue.type.generalName == "STANDBY" { logCall("REMOTE STANDBY: \(cue.label)", type: .call) - } else if cue.type.cueTypeDisplay == "WARNING" { + } else if cue.type.generalName == "WARNING" { logCall("REMOTE WARNING: \(cue.label)", type: .call) } else { logCall("REMOTE GO: \(cue.label)", type: .action)