feat(View): 增加 Timeline View

增加 Timeline View

Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
Ching 2023-05-05 23:50:22 +08:00
parent 5cf208a4c2
commit 9edef2eca1
2 changed files with 64 additions and 5 deletions

View File

@ -46,10 +46,13 @@ extension AccountListView {
var accountRowView: some View { var accountRowView: some View {
HStack { HStack {
ZStack { ZStack {
RoundedRectangle(cornerRadius: 3) RoundedRectangle(cornerRadius: 6)
.stroke(Color.gray, lineWidth: 1.5) .fill(Color.blue)
.frame(width: 50, height: 50) .frame(width: 48, height: 48)
.background(.black) .overlay(
RoundedRectangle(cornerRadius: 6)
.stroke(.gray.opacity(0.35), lineWidth: 1)
)
Image(systemName: "checkmark.circle.fill") Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green) .foregroundColor(.green)
.background(.white) .background(.white)

View File

@ -9,7 +9,63 @@ import SwiftUI
struct TimeLineView: View { struct TimeLineView: View {
var body: some View { var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) ScrollView {
LazyVStack {
HStack(alignment: .center, spacing: 2) {
Image(systemName: "arrow.rectanglepath")
Circle()
.fill(Color.blue)
.frame(width: 12, height: 12)
Text("小傻猪猪仔")
.bold()
Text("转发")
Spacer()
}
.font(.caption)
.foregroundColor(.gray)
.padding(.horizontal)
HStack {
RoundedRectangle(cornerRadius: 6)
.fill(Color.blue)
.frame(width: 48, height: 48)
.overlay(
RoundedRectangle(cornerRadius: 6)
.stroke(.gray.opacity(0.35), lineWidth: 1)
)
VStack(alignment: .leading, spacing: 4) {
HStack(alignment: .firstTextBaseline, spacing: 2) {
Text("科代")
.bold()
Text(verbatim: "@kedai@nofan.xyz")
.textContentType(.none)
.font(.subheadline)
.foregroundColor(.gray)
}
HStack {
Text("4分钟前")
Text("·")
Image(systemName: "globe.americas")
}
.foregroundColor(.gray)
.font(.subheadline)
}
Spacer()
// Image(systemName: "ellipsis")
// .font(.title2)
// .foregroundColor(.gray)
}
.padding(.horizontal)
HStack {
Text("偶然刷到一个 INS视频帅帅的藏族模特走\n 路,但配乐的一个蒙古歌,歌词还是汉语中文。\n 一群西方人在下面评论:多么美好的藏族文化啊!\n 一时间不知道说啥。。。\n 嗐,白人")
.multilineTextAlignment(.leading)
Spacer()
}
.padding(.horizontal)
Divider()
}
}
} }
} }