From a1e95529bf5b472c1584a576f85a12850a0d924b Mon Sep 17 00:00:00 2001 From: Ching Date: Thu, 4 May 2023 21:02:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(View):=20=E5=A2=9E=E5=8A=A0=20AccountListV?= =?UTF-8?q?iew?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加 AccountListView Signed-off-by: Ching --- duduji.xcodeproj/project.pbxproj | 4 ++ .../Views/AccountListView.swift | 60 +++++++++++++++++++ duduji/dudujiApp.swift | 2 +- 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 duduji/Core/Authentication/Views/AccountListView.swift diff --git a/duduji.xcodeproj/project.pbxproj b/duduji.xcodeproj/project.pbxproj index d1ecdc1..8f8984d 100644 --- a/duduji.xcodeproj/project.pbxproj +++ b/duduji.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 24A07CD82A026DDB00F4ECA8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24A07CD72A026DDB00F4ECA8 /* Preview Assets.xcassets */; }; 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 */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -24,6 +25,7 @@ 24A07CD72A026DDB00F4ECA8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -128,6 +130,7 @@ isa = PBXGroup; children = ( 24A07CE82A02730700F4ECA8 /* AddAccountView.swift */, + 24A07CEC2A029DF200F4ECA8 /* AccountListView.swift */, ); path = Views; sourceTree = ""; @@ -213,6 +216,7 @@ 24A07CD02A026DDA00F4ECA8 /* dudujiApp.swift in Sources */, 24A07CEB2A029C6A00F4ECA8 /* InstanceInfo.swift in Sources */, 24A07CE92A02730700F4ECA8 /* AddAccountView.swift in Sources */, + 24A07CED2A029DF200F4ECA8 /* AccountListView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/duduji/Core/Authentication/Views/AccountListView.swift b/duduji/Core/Authentication/Views/AccountListView.swift new file mode 100644 index 0000000..87011ad --- /dev/null +++ b/duduji/Core/Authentication/Views/AccountListView.swift @@ -0,0 +1,60 @@ +// +// AccountListView.swift +// duduji +// +// Created by ching on 2023/5/3. +// + +import SwiftUI + +struct AccountListView: View { + var body: some View { + NavigationView { + Form { + Section { + HStack { + ZStack { + RoundedRectangle(cornerRadius: 3) + .frame(width: 50, height: 50) + Image(systemName: "checkmark.circle.fill") + .foregroundColor(.green) + .offset(x: 15, y: -15) + .font(.title) + } + VStack(alignment: .leading) { + Text("科代") + .font(.title3) + Text(verbatim: "kedai@nofan.xyz") + .textContentType(.none) + .font(.subheadline) + .foregroundColor(.gray) + } + } + } + Section { + Button { + // + } label: { + Label("添加账户", systemImage: "person.badge.plus") + } + Button { + // + } label: { + Label("设置", systemImage: "gear") + } + } + } + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Button("123") {} + } + } + } + } +} + +struct AccountListView_Previews: PreviewProvider { + static var previews: some View { + AccountListView() + } +} diff --git a/duduji/dudujiApp.swift b/duduji/dudujiApp.swift index 30d053f..ca40328 100644 --- a/duduji/dudujiApp.swift +++ b/duduji/dudujiApp.swift @@ -12,7 +12,7 @@ struct dudujiApp: App { var body: some Scene { WindowGroup { // ContentView() - AddAccountView() + AccountListView() } } }