diff --git a/duduji.xcodeproj/project.pbxproj b/duduji.xcodeproj/project.pbxproj index 8f8984d..c1281e3 100644 --- a/duduji.xcodeproj/project.pbxproj +++ b/duduji.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 24A07CE92A02730700F4ECA8 /* AddAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CE82A02730700F4ECA8 /* AddAccountView.swift */; }; 24A07CEB2A029C6A00F4ECA8 /* InstanceInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CEA2A029C6A00F4ECA8 /* InstanceInfo.swift */; }; 24A07CED2A029DF200F4ECA8 /* AccountListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CEC2A029DF200F4ECA8 /* AccountListView.swift */; }; + 24A07CF32A03E80200F4ECA8 /* TimeLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CF22A03E80200F4ECA8 /* TimeLineView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -26,6 +27,7 @@ 24A07CE82A02730700F4ECA8 /* AddAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountView.swift; sourceTree = ""; }; 24A07CEA2A029C6A00F4ECA8 /* InstanceInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstanceInfo.swift; sourceTree = ""; }; 24A07CEC2A029DF200F4ECA8 /* AccountListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountListView.swift; sourceTree = ""; }; + 24A07CF22A03E80200F4ECA8 /* TimeLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeLineView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -96,6 +98,7 @@ 24A07CE02A02702800F4ECA8 /* Core */ = { isa = PBXGroup; children = ( + 24A07CEE2A03E7BA00F4ECA8 /* Feeds */, 24A07CE42A02714000F4ECA8 /* Authentication */, 24A07CE32A02709900F4ECA8 /* Components */, ); @@ -142,6 +145,30 @@ path = ViewModels; sourceTree = ""; }; + 24A07CEE2A03E7BA00F4ECA8 /* Feeds */ = { + isa = PBXGroup; + children = ( + 24A07CF02A03E7D000F4ECA8 /* ViewModels */, + 24A07CEF2A03E7C800F4ECA8 /* Views */, + ); + path = Feeds; + sourceTree = ""; + }; + 24A07CEF2A03E7C800F4ECA8 /* Views */ = { + isa = PBXGroup; + children = ( + 24A07CF22A03E80200F4ECA8 /* TimeLineView.swift */, + ); + path = Views; + sourceTree = ""; + }; + 24A07CF02A03E7D000F4ECA8 /* ViewModels */ = { + isa = PBXGroup; + children = ( + ); + path = ViewModels; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -213,6 +240,7 @@ buildActionMask = 2147483647; files = ( 24A07CD22A026DDA00F4ECA8 /* ContentView.swift in Sources */, + 24A07CF32A03E80200F4ECA8 /* TimeLineView.swift in Sources */, 24A07CD02A026DDA00F4ECA8 /* dudujiApp.swift in Sources */, 24A07CEB2A029C6A00F4ECA8 /* InstanceInfo.swift in Sources */, 24A07CE92A02730700F4ECA8 /* AddAccountView.swift in Sources */, diff --git a/duduji/Core/Authentication/Views/AccountListView.swift b/duduji/Core/Authentication/Views/AccountListView.swift index 2519a67..c8e7641 100644 --- a/duduji/Core/Authentication/Views/AccountListView.swift +++ b/duduji/Core/Authentication/Views/AccountListView.swift @@ -11,29 +11,8 @@ struct AccountListView: View { var body: some View { NavigationView { Form { - Section { - HStack { - ZStack { - RoundedRectangle(cornerRadius: 3) - .stroke(Color.gray, lineWidth: 1.5) - .frame(width: 50, height: 50) - .background(.black) - Image(systemName: "checkmark.circle.fill") - .foregroundColor(.green) - .background(.white) - .clipShape(Circle()) - .offset(x: 15, y: -15) - .font(.title) - } - VStack(alignment: .leading) { - Text("科代") - .font(.title3) - Text(verbatim: "kedai@nofan.xyz") - .textContentType(.none) - .font(.subheadline) - .foregroundColor(.gray) - } - } + ForEach(0 ... 3, id: \.self) { _ in + accountRowView } Section { Button { @@ -62,3 +41,30 @@ struct AccountListView_Previews: PreviewProvider { AccountListView() } } + +extension AccountListView { + var accountRowView: some View { + HStack { + ZStack { + RoundedRectangle(cornerRadius: 3) + .stroke(Color.gray, lineWidth: 1.5) + .frame(width: 50, height: 50) + .background(.black) + Image(systemName: "checkmark.circle.fill") + .foregroundColor(.green) + .background(.white) + .clipShape(Circle()) + .offset(x: 15, y: -15) + .font(.title) + } + VStack(alignment: .leading) { + Text("科代") + .font(.title3) + Text(verbatim: "kedai@nofan.xyz") + .textContentType(.none) + .font(.subheadline) + .foregroundColor(.gray) + } + } + } +} diff --git a/duduji/Core/Feeds/Views/TimeLineView.swift b/duduji/Core/Feeds/Views/TimeLineView.swift new file mode 100644 index 0000000..e439ce2 --- /dev/null +++ b/duduji/Core/Feeds/Views/TimeLineView.swift @@ -0,0 +1,20 @@ +// +// TimeLineView.swift +// duduji +// +// Created by ching on 2023/5/4. +// + +import SwiftUI + +struct TimeLineView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +struct TimeLineView_Previews: PreviewProvider { + static var previews: some View { + TimeLineView() + } +}