Compare commits

...

2 Commits

Author SHA1 Message Date
Ching
5cf208a4c2 feat(View): 修改 AccountListView 样式
修改 AccountListView 样式

Signed-off-by: Ching <loooching@gmail.com>
2023-05-05 21:50:59 +08:00
Ching
d823520939 feat(View): 修改 AccountListView 样式
修改 AccountListView 样式

Signed-off-by: Ching <loooching@gmail.com>
2023-05-04 21:16:01 +08:00
3 changed files with 78 additions and 20 deletions

View File

@ -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 = "<group>"; };
24A07CEA2A029C6A00F4ECA8 /* InstanceInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstanceInfo.swift; sourceTree = "<group>"; };
24A07CEC2A029DF200F4ECA8 /* AccountListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountListView.swift; sourceTree = "<group>"; };
24A07CF22A03E80200F4ECA8 /* TimeLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeLineView.swift; sourceTree = "<group>"; };
/* 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 = "<group>";
};
24A07CEE2A03E7BA00F4ECA8 /* Feeds */ = {
isa = PBXGroup;
children = (
24A07CF02A03E7D000F4ECA8 /* ViewModels */,
24A07CEF2A03E7C800F4ECA8 /* Views */,
);
path = Feeds;
sourceTree = "<group>";
};
24A07CEF2A03E7C800F4ECA8 /* Views */ = {
isa = PBXGroup;
children = (
24A07CF22A03E80200F4ECA8 /* TimeLineView.swift */,
);
path = Views;
sourceTree = "<group>";
};
24A07CF02A03E7D000F4ECA8 /* ViewModels */ = {
isa = PBXGroup;
children = (
);
path = ViewModels;
sourceTree = "<group>";
};
/* 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 */,

View File

@ -11,25 +11,8 @@ 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)
}
}
ForEach(0 ... 3, id: \.self) { _ in
accountRowView
}
Section {
Button {
@ -46,7 +29,7 @@ struct AccountListView: View {
}
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("123") {}
Button("完成") {}
}
}
}
@ -58,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)
}
}
}
}

View File

@ -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()
}
}