From 9edef2eca1d08dec321e89eab292b39f5c583b39 Mon Sep 17 00:00:00 2001 From: Ching Date: Fri, 5 May 2023 23:50:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(View):=20=E5=A2=9E=E5=8A=A0=20Timeline=20V?= =?UTF-8?q?iew?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加 Timeline View Signed-off-by: Ching --- .../Views/AccountListView.swift | 11 ++-- duduji/Core/Feeds/Views/TimeLineView.swift | 58 ++++++++++++++++++- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/duduji/Core/Authentication/Views/AccountListView.swift b/duduji/Core/Authentication/Views/AccountListView.swift index c8e7641..f9ee22a 100644 --- a/duduji/Core/Authentication/Views/AccountListView.swift +++ b/duduji/Core/Authentication/Views/AccountListView.swift @@ -46,10 +46,13 @@ extension AccountListView { var accountRowView: some View { HStack { ZStack { - RoundedRectangle(cornerRadius: 3) - .stroke(Color.gray, lineWidth: 1.5) - .frame(width: 50, height: 50) - .background(.black) + RoundedRectangle(cornerRadius: 6) + .fill(Color.blue) + .frame(width: 48, height: 48) + .overlay( + RoundedRectangle(cornerRadius: 6) + .stroke(.gray.opacity(0.35), lineWidth: 1) + ) Image(systemName: "checkmark.circle.fill") .foregroundColor(.green) .background(.white) diff --git a/duduji/Core/Feeds/Views/TimeLineView.swift b/duduji/Core/Feeds/Views/TimeLineView.swift index e439ce2..0855cab 100644 --- a/duduji/Core/Feeds/Views/TimeLineView.swift +++ b/duduji/Core/Feeds/Views/TimeLineView.swift @@ -9,7 +9,63 @@ import SwiftUI struct TimeLineView: 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() + } + } } }