Update project view
This commit is contained in:
parent
77d9ef6578
commit
ee3b924afc
Binary file not shown.
Binary file not shown.
@ -11,7 +11,7 @@ import SwiftUI
|
|||||||
|
|
||||||
extension ContentView {
|
extension ContentView {
|
||||||
@_dynamicReplacement(for: deleteItems(offsets:)) private func __preview__deleteItems(offsets: IndexSet) {
|
@_dynamicReplacement(for: deleteItems(offsets:)) private func __preview__deleteItems(offsets: IndexSet) {
|
||||||
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 59)
|
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 62)
|
||||||
withAnimation {
|
withAnimation {
|
||||||
for index in offsets {
|
for index in offsets {
|
||||||
modelContext.delete(items[index])
|
modelContext.delete(items[index])
|
||||||
@ -24,7 +24,7 @@ extension ContentView {
|
|||||||
|
|
||||||
extension ContentView {
|
extension ContentView {
|
||||||
@_dynamicReplacement(for: addItem()) private func __preview__addItem() {
|
@_dynamicReplacement(for: addItem()) private func __preview__addItem() {
|
||||||
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 52)
|
#sourceLocation(file: "/Users/pradyun/Code/Apps/OnCue/OnCue/ContentView.swift", line: 55)
|
||||||
withAnimation {
|
withAnimation {
|
||||||
let newProject = OCProject(name: __designTimeString("#3092.[2].[3].[0].arg[0].value.[0].value.arg[0].value", fallback: "Gaming!"))
|
let newProject = OCProject(name: __designTimeString("#3092.[2].[3].[0].arg[0].value.[0].value.arg[0].value", fallback: "Gaming!"))
|
||||||
modelContext.insert(newProject)
|
modelContext.insert(newProject)
|
||||||
@ -45,24 +45,27 @@ extension ContentView {
|
|||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("\(item.name)")
|
Text("\(item.name)")
|
||||||
.font(.system(.title2, design: .default, weight: .medium))
|
.bold()
|
||||||
|
.font(.title2)
|
||||||
.foregroundStyle(.blue)
|
.foregroundStyle(.blue)
|
||||||
Text("\(item.cards.count) Cards")
|
Text("\(item.cards.count) Cards")
|
||||||
|
// Text("Last Edited: \(item.lastEditedDate.formatted())")
|
||||||
|
// .font(.subheadline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(__designTimeInteger("#3092.[2].[2].property.[0].[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0].modifier[0].arg[0].value", fallback: 12))
|
.padding(.horizontal, __designTimeInteger("#3092.[2].[2].property.[0].[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0].modifier[0].arg[1].value", fallback: 8))
|
||||||
|
.padding(.vertical, __designTimeInteger("#3092.[2].[2].property.[0].[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0].modifier[1].arg[1].value", fallback: 3))
|
||||||
}
|
}
|
||||||
.onDelete(perform: deleteItems)
|
.onDelete(perform: deleteItems)
|
||||||
|
|
||||||
}
|
}
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
// ToolbarItem(placement: .navigationBarTrailing) {
|
||||||
ToolbarItem(placement: .navigationBarTrailing) {
|
// EditButton()
|
||||||
EditButton()
|
// }
|
||||||
}
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Button(action: addItem) {
|
Button(action: addItem) {
|
||||||
Label(__designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value.[1].arg[0].value.[0].arg[1].value.[0].arg[0].value", fallback: "Add Item"), systemImage: __designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value.[1].arg[0].value.[0].arg[1].value.[0].arg[1].value", fallback: "plus"))
|
Label(__designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0].arg[0].value", fallback: "Add Item"), systemImage: __designTimeString("#3092.[2].[2].property.[0].[0].arg[0].value.[0].modifier[0].arg[0].value.[0].arg[0].value.[0].arg[1].value.[0].arg[1].value", fallback: "plus"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -21,21 +21,24 @@ struct ContentView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("\(item.name)")
|
Text("\(item.name)")
|
||||||
.font(.system(.title2, design: .default, weight: .medium))
|
.bold()
|
||||||
|
.font(.title2)
|
||||||
.foregroundStyle(.blue)
|
.foregroundStyle(.blue)
|
||||||
Text("\(item.cards.count) Cards")
|
Text("\(item.cards.count) Cards")
|
||||||
|
// Text("Last Edited: \(item.lastEditedDate.formatted())")
|
||||||
|
// .font(.subheadline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(12)
|
.padding(.horizontal, 8)
|
||||||
|
.padding(.vertical, 3)
|
||||||
}
|
}
|
||||||
.onDelete(perform: deleteItems)
|
.onDelete(perform: deleteItems)
|
||||||
|
|
||||||
}
|
}
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
// ToolbarItem(placement: .navigationBarTrailing) {
|
||||||
ToolbarItem(placement: .navigationBarTrailing) {
|
// EditButton()
|
||||||
EditButton()
|
// }
|
||||||
}
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Button(action: addItem) {
|
Button(action: addItem) {
|
||||||
Label("Add Item", systemImage: "plus")
|
Label("Add Item", systemImage: "plus")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user