From ca910e57fff92e849200c157d74825666c08a642 Mon Sep 17 00:00:00 2001 From: breadone Date: Sat, 22 Jun 2024 14:24:39 +1200 Subject: [PATCH] renaming stuff! --- OnCue/View/CardsView.swift | 18 ++++++++++++++++++ .../{ContentView.swift => View/MainView.swift} | 16 +++------------- .../MainViewPresenter.swift} | 4 ++-- 3 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 OnCue/View/CardsView.swift rename OnCue/{ContentView.swift => View/MainView.swift} (80%) rename OnCuePresenter Watch App/{ContentView.swift => View/MainViewPresenter.swift} (86%) diff --git a/OnCue/View/CardsView.swift b/OnCue/View/CardsView.swift new file mode 100644 index 0000000..9f1758d --- /dev/null +++ b/OnCue/View/CardsView.swift @@ -0,0 +1,18 @@ +// +// CardsView.swift +// OnCue +// +// Created by Pradyun Setti on 22/06/2024. +// + +import SwiftUI + +struct CardsView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + CardsView() +} diff --git a/OnCue/ContentView.swift b/OnCue/View/MainView.swift similarity index 80% rename from OnCue/ContentView.swift rename to OnCue/View/MainView.swift index e287cc3..f95a8dc 100644 --- a/OnCue/ContentView.swift +++ b/OnCue/View/MainView.swift @@ -1,5 +1,5 @@ // -// ContentView.swift +// MainView.swift // OnCue // // Created by Pradyun Setti on 22/06/2024. @@ -8,7 +8,7 @@ import SwiftUI import SwiftData -struct ContentView: View { +struct MainView: View { @Environment(\.modelContext) private var modelContext @Query private var items: [OCProject] @@ -25,8 +25,6 @@ struct ContentView: View { .font(.title2) .foregroundStyle(.blue) Text("\(item.cards.count) Cards") -// Text("Last Edited: \(item.lastEditedDate.formatted())") -// .font(.subheadline) } } .padding(.horizontal, 8) @@ -68,20 +66,12 @@ struct ContentView: View { } #Preview { - -// let config = ModelConfiguration(isStoredInMemoryOnly: true) -// let container = try! ModelContainer(for: User.self, configurations: config) -// -// let user = User(name: "Test User") -// return EditingView(user: user) -// .modelContainer(container) - let config = ModelConfiguration(isStoredInMemoryOnly: true) let container = try! ModelContainer(for: OCProject.self, configurations: config) let p = OCProject(name: "test project") container.mainContext.insert(p) - return ContentView() + return MainView() .modelContainer(container) } diff --git a/OnCuePresenter Watch App/ContentView.swift b/OnCuePresenter Watch App/View/MainViewPresenter.swift similarity index 86% rename from OnCuePresenter Watch App/ContentView.swift rename to OnCuePresenter Watch App/View/MainViewPresenter.swift index 4fb2cc6..7ce16e3 100644 --- a/OnCuePresenter Watch App/ContentView.swift +++ b/OnCuePresenter Watch App/View/MainViewPresenter.swift @@ -7,7 +7,7 @@ import SwiftUI -struct ContentView: View { +struct MainViewPresenter: View { var body: some View { VStack { Image(systemName: "globe") @@ -20,5 +20,5 @@ struct ContentView: View { } #Preview { - ContentView() + MainViewPresenter() }