Ching 22eedb04a4 feat(View): 增加 MainTableView 和 ToolBar
增加 MainTableView 和 ToolBar

Signed-off-by: Ching <loooching@gmail.com>
2023-05-07 18:37:26 +08:00

88 lines
2.9 KiB
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// StatusRow.swift
// duduji
//
// Created by ching on 2023/5/7.
//
import SwiftUI
struct StatusRow: View {
var body: some View {
VStack {
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)
HStack {
RoundedRectangle(cornerRadius: 6)
.fill(Color.blue)
.frame(width: 192, height: 192)
.overlay(
RoundedRectangle(cornerRadius: 6)
.stroke(.gray.opacity(0.35), lineWidth: 1)
)
Spacer()
}
.padding(.horizontal)
}
Divider()
.padding(.vertical)
}
}
struct StatusRow_Previews: PreviewProvider {
static var previews: some View {
StatusRow()
}
}