Use atproto actions with ease in iOS shortcuts
1//
2// ContentView.swift
3// shortcut
4//
5// Created by Bailey Townsend on 6/23/25.
6//
7
8import ATIdentityTools
9import ATProtoKit
10import AppIntents
11import SwiftData
12import SwiftUI
13
14struct ContentView: View {
15
16 @StateObject var atProtocolManager: AtProtocolManager
17
18 init(modelContext: ModelContext) {
19 let manager = AtProtocolManager(modelContext: modelContext)
20 _atProtocolManager = StateObject(wrappedValue: manager)
21
22 }
23
24 var body: some View {
25
26 TabView {
27
28 Tab("ATProto Accounts", systemImage: "at") {
29 AccountsView().environmentObject(atProtocolManager)
30 }
31 Tab("Documentation", systemImage: "document.on.document") {
32 DocumentationView().navigationTitle(Text("Documentation"))
33 }
34 Tab("Info", systemImage: "info.circle") {
35 SettingsView()
36 }
37 }
38
39 }
40}
41
42#Preview {
43 let configuration = ModelConfiguration(isStoredInMemoryOnly: true)
44 let container = try! ModelContainer(
45 for: UserSessionModel.self,
46 configurations: configuration
47 )
48 ContentView(modelContext: container.mainContext)
49}