Improved the app for watch

This commit is contained in:
breadone
2024-06-22 21:35:40 +12:00
parent 79c6422630
commit 49338c216e
630 changed files with 1430 additions and 1068 deletions

View File

@@ -2,6 +2,10 @@
"source": "/Users/pradyun/Code/Apps/OnCue/Build/Intermediates.noindex/Previews/iphonesimulator/OnCue/Intermediates.noindex/OnCue.build/Debug-iphonesimulator/OnCue.build/Objects-normal/arm64/CardsView.1.preview-thunk.swift",
"tables": {
"Localizable": [
{
"comment": "",
"key": "Card %lld"
},
{
"comment": "",
"key": "Add Item"

View File

@@ -8,26 +8,9 @@ import struct SwiftUI.EmptyView
import protocol SwiftUI.View
import SwiftUI
extension CardView {
@_dynamicReplacement(for: body) private var __preview__body: some View {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 73)
VStack(alignment: .trailing) {
Text(card.content)
}
.frame(minHeight: __designTimeInteger("#6455.[2].[2].property.[0].[0].modifier[0].arg[0].value", fallback: 80))
// .padding()
// .background(Color(hex: proj.color) ?? .blue)
// .clipShape(.rect(cornerRadius: 12))
// .padding(.horizontal)
// .padding(.vertical)
#sourceLocation()
}
}
extension CardsView {
@_dynamicReplacement(for: deleteItems(offsets:)) private func __preview__deleteItems(offsets: IndexSet) {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 60)
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 67)
withAnimation {
project.cards.remove(atOffsets: offsets)
try! ctx.save()
@@ -39,8 +22,8 @@ extension CardsView {
extension CardsView {
@_dynamicReplacement(for: addNewCard(txt:)) private func __preview__addNewCard(txt: String) {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 54)
let card = OCCard(content: txt, index: (project.cards.last?.index ?? __designTimeInteger("#6455.[1].[6].[0].value.arg[1].value.[0]", fallback: -1)) + __designTimeInteger("#6455.[1].[6].[0].value.arg[1].value.[1]", fallback: 1)) // adds one to the index, unless there arent any cards in which case default to 0
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 61)
let card = OCCard(content: txt, index: (project.sortedCards.last?.index ?? __designTimeInteger("#6455.[1].[6].[0].value.arg[1].value.[0]", fallback: -1)) + __designTimeInteger("#6455.[1].[6].[0].value.arg[1].value.[1]", fallback: 1)) // adds one to the index, unless there arent any cards in which case default to 0
project.cards.append(card)
try! ctx.save()
@@ -53,11 +36,18 @@ extension CardsView {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 19)
List {
ForEach(project.sortedCards) { card in
CardView(proj: project, card: card)
Section {
VStack(alignment: .trailing) {
Text(card.content)
}
.frame(minHeight: __designTimeInteger("#6455.[1].[5].property.[0].[0].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].modifier[0].arg[0].value", fallback: 150))
} header: {
Text("Card \(card.index + __designTimeInteger("#6455.[1].[5].property.[0].[0].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value.[1].value.arg[0].value.[0]", fallback: 1))")
}
}
.onDelete(perform: deleteItems)
}
.listStyle(.inset)
.listStyle(.sidebar)
.navigationTitle(project.name)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
@@ -69,7 +59,7 @@ extension CardsView {
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(destination: {ProjectSlideshowView(project: project)}) {
Label(title: { Text(__designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[0].value", fallback: "Cue Cards"))}, icon: {Image(systemName: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "rectangle.stack.fill")) })
Label(title: { Text(__designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[0].value", fallback: "Cue Cards"))}, icon: {Image(systemName: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "rectangle.stack")) })
}
NavigationLink(destination: {TeleprompterView(project: project)}) {
Label(title: { Text(__designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[0].value", fallback: "Teleprompter"))}, icon: {Image(systemName: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[1].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "note.text")) })
@@ -89,7 +79,6 @@ extension CardsView {
}
import struct OnCue.CardsView
import struct OnCue.CardView
#Preview {
return CardsView(project: OCProject(name: "Test", color: "FF00FF"))
}

View File

@@ -2,6 +2,10 @@
"source": "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift",
"tables": {
"Localizable": [
{
"comment": "",
"key": "Card %lld"
},
{
"comment": "",
"key": "Add Item"

View File

@@ -3,7 +3,7 @@
"-sdk"
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk"
"-target"
"arm64-apple-ios17.5-simulator"
"arm64-apple-ios17.0-simulator"
"-enable-bare-slash-regex"
"-module-cache-path"
"/Users/pradyun/Library/Developer/Xcode/DerivedData/ModuleCache.noindex"

View File

@@ -40,7 +40,7 @@ extension OCProject {
@_dynamicReplacement(for: script) private var __preview__script: String {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/Model/OCProject.swift", line: 20)
var txt = __designTimeString("#7544.[2].[5].property.[0].[0].value", fallback: "")
cards.forEach { txt.append("\($0.content)\n---\n") }
sortedCards.forEach { txt.append("\($0.content)\n---\n") }
return txt
#sourceLocation()

View File

@@ -8,37 +8,40 @@ import struct SwiftUI.EmptyView
import protocol SwiftUI.View
import SwiftUI
extension CueCardView {
@_dynamicReplacement(for: body) private var __preview__body: some View {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/ProjectSlideshowView.swift", line: 36)
VStack(alignment: .leading) {
Text(card.content)
.foregroundColor(.primary)
.font(.system(size: __designTimeInteger("#6525.[2].[1].property.[0].[0].arg[1].value.[0].modifier[1].arg[0].value.arg[0].value", fallback: 25)))
.padding()
.frame(height: __designTimeInteger("#6525.[2].[1].property.[0].[0].arg[1].value.[0].modifier[3].arg[0].value", fallback: 550))
Spacer()
}
#sourceLocation()
}
}
extension ProjectSlideshowView {
@_dynamicReplacement(for: body) private var __preview__body: some View {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/ProjectSlideshowView.swift", line: 14)
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/ProjectSlideshowView.swift", line: 15)
TabView() {
ForEach(project.sortedCards) { card in
CueCardView(card: card)
.navigationTitle("\(card.index)")
VStack(alignment: .leading) {
Text(card.content)
.foregroundColor(.primary)
.font(.system(size: textSize))
.padding()
.frame(height: __designTimeInteger("#6525.[1].[2].property.[0].[0].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].modifier[3].arg[0].value", fallback: 550))
Spacer()
}
.navigationTitle("\(card.index+__designTimeInteger("#6525.[1].[2].property.[0].[0].arg[0].value.[0].arg[1].value.[0].modifier[0].arg[0].value.[1].value.arg[0].value.[0]", fallback: 1))")
.navigationBarTitleDisplayMode(.inline)
}
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Menu {
Menu {
Slider(value: $textSize, in: __designTimeInteger("#6525.[1].[2].property.[0].[0].modifier[1].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0]", fallback: 12)...__designTimeInteger("#6525.[1].[2].property.[0].[0].modifier[1].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[1]", fallback: 80), step: __designTimeInteger("#6525.[1].[2].property.[0].[0].modifier[1].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[0].value.[0].arg[2].value", fallback: 1))
} label: {
Image(systemName: __designTimeString("#6525.[1].[2].property.[0].[0].modifier[1].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[0].value", fallback: "textformat.size"))
}
} label: {
Image(systemName: __designTimeString("#6525.[1].[2].property.[0].[0].modifier[1].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "ellipsis.circle"))
}
}
ToolbarItem(placement: .topBarTrailing) {
NavigationLink(destination: { CardsView(project: project) }) {
Image(systemName: __designTimeString("#6525.[1].[1].property.[0].[0].modifier[1].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "stop.fill"))
Image(systemName: __designTimeString("#6525.[1].[2].property.[0].[0].modifier[1].arg[0].value.[1].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "stop.fill"))
}
}
}
@@ -48,7 +51,6 @@ extension ProjectSlideshowView {
}
import struct OnCue.ProjectSlideshowView
import struct OnCue.CueCardView
#Preview {
ProjectSlideshowView(project: PreviewData.project)
}

View File

@@ -1,7 +1,7 @@
{
"source" : "ExtractedAppShortcutsMetadata",
"tables" : {
},
"version" : 1,
"source" : "ExtractedAppShortcutsMetadata"
"version" : 1
}

View File

@@ -18,7 +18,7 @@
</data>
<key>Watch/OnCuePresenter Watch App.app/OnCuePresenter Watch App</key>
<data>
8LR+ptLeM+CrDLpkImrH6wB/PHU=
jRAJk4v+6uLayucTSuxJlkboGto=
</data>
<key>Watch/OnCuePresenter Watch App.app/PkgInfo</key>
<data>
@@ -42,7 +42,7 @@
<dict>
<key>hash2</key>
<data>
Mdm7GHsokW0XQmP5MbpsMCVpf/nSvjhU68984lt9JOc=
OMGr7eqZKHzYak+5XndWGLOgMQEH4VBkp9mdoUntsz4=
</data>
</dict>
<key>Watch/OnCuePresenter Watch App.app/PkgInfo</key>

View File

@@ -3,7 +3,7 @@
"-sdk"
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk"
"-target"
"arm64-apple-ios17.5-simulator"
"arm64-apple-ios17.0-simulator"
"-enable-bare-slash-regex"
"-module-cache-path"
"/Users/pradyun/Library/Developer/Xcode/DerivedData/ModuleCache.noindex"

View File

@@ -4,7 +4,19 @@
"Localizable": [
{
"comment": "",
"key": "Hello, World!"
"key": "Card %lld"
},
{
"comment": "",
"key": "Add Item"
},
{
"comment": "",
"key": "Cue Cards"
},
{
"comment": "",
"key": "Teleprompter"
}
]
},

View File

@@ -8,10 +8,71 @@ import struct SwiftUI.EmptyView
import protocol SwiftUI.View
import SwiftUI
extension CardsView {
@_dynamicReplacement(for: deleteItems(offsets:)) private func __preview__deleteItems(offsets: IndexSet) {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 67)
withAnimation {
project.cards.remove(atOffsets: offsets)
try! ctx.save()
}
#sourceLocation()
}
}
extension CardsView {
@_dynamicReplacement(for: addNewCard(txt:)) private func __preview__addNewCard(txt: String) {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 61)
let card = OCCard(content: txt, index: (project.sortedCards.last?.index ?? __designTimeInteger("#6455.[1].[6].[0].value.arg[1].value.[0]", fallback: -1)) + __designTimeInteger("#6455.[1].[6].[0].value.arg[1].value.[1]", fallback: 1)) // adds one to the index, unless there arent any cards in which case default to 0
project.cards.append(card)
try! ctx.save()
#sourceLocation()
}
}
extension CardsView {
@_dynamicReplacement(for: body) private var __preview__body: some View {
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 14)
Text(/*@START_MENU_TOKEN@*/__designTimeString("#16575.[1].[1].property.[0].[0].arg[0].value", fallback: "Hello, World!")/*@END_MENU_TOKEN@*/)
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift", line: 19)
List {
ForEach(project.sortedCards) { card in
Section {
VStack(alignment: .trailing) {
Text(card.content)
}
.frame(minHeight: __designTimeInteger("#6455.[1].[5].property.[0].[0].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].modifier[0].arg[0].value", fallback: 150))
} header: {
Text("Card \(card.index + __designTimeInteger("#6455.[1].[5].property.[0].[0].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value.[1].value.arg[0].value.[0]", fallback: 1))")
}
}
.onDelete(perform: deleteItems)
}
.listStyle(.sidebar)
.navigationTitle(project.name)
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button(action: { addNewCard.toggle() }) {
Label(__designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "Add Item"), systemImage: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[1].value", fallback: "plus"))
}
}
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(destination: {ProjectSlideshowView(project: project)}) {
Label(title: { Text(__designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[0].value.[0].arg[0].value", fallback: "Cue Cards"))}, icon: {Image(systemName: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "rectangle.stack")) })
}
NavigationLink(destination: {TeleprompterView(project: project)}) {
Label(title: { Text(__designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[1].arg[1].value.[0].arg[0].value.[0].arg[0].value", fallback: "Teleprompter"))}, icon: {Image(systemName: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[0].value.[1].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "note.text")) })
}
} label: {
Image(systemName: __designTimeString("#6455.[1].[5].property.[0].[0].modifier[3].arg[0].value.[1].arg[1].value.[0].arg[1].value.[0].arg[0].value", fallback: "play.fill"))
}
}
}
.sheet(isPresented: $addNewCard) {
AddNewCardView(completionHandler: addNewCard)
}
#sourceLocation()
}
@@ -19,9 +80,7 @@ extension CardsView {
import struct OnCue.CardsView
#Preview {
let project = OCProject(name: "Test Project")
return CardsView(project: project)
return CardsView(project: OCProject(name: "Test", color: "FF00FF"))
}

View File

@@ -2,6 +2,10 @@
"source": "/Users/pradyun/Code/Apps/OnCue/OnCue/View/CardsView.swift",
"tables": {
"Localizable": [
{
"comment": "",
"key": "Card %lld"
},
{
"comment": "",
"key": "Add Item"

View File

@@ -1,5 +1,12 @@
{
"source": "/Users/pradyun/Code/Apps/OnCue/OnCue/View/ProjectSlideshowView.swift",
"tables": {},
"tables": {
"Localizable": [
{
"comment": "",
"key": "%lld"
}
]
},
"version": 1
}

Some files were not shown because too many files have changed in this diff Show More