对齐有线传图页 Android UI,并改用相对路径持久化本地照片。
还原顶栏、浮动卡片、时间侧栏与底部交互;照片路径改为 CameraDownloads 相对路径并兼容旧数据;格式 Chip 固定 JPG 且不可点击。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -0,0 +1,66 @@
|
||||
//
|
||||
// WiredTransferEmptyState.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// 有线传图空态,对齐 Android TransferEmptyState。
|
||||
struct WiredTransferEmptyState: View {
|
||||
var body: some View {
|
||||
VStack(spacing: 8) {
|
||||
WiredTransferEmptyIllustration()
|
||||
.frame(width: 200, height: 150)
|
||||
Text("暂无传输文件")
|
||||
.font(.system(size: 14))
|
||||
.foregroundStyle(WiredTransferDesign.text999)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.padding(.horizontal, 32)
|
||||
}
|
||||
}
|
||||
|
||||
/// 空态插图,对齐 Android ic_img_transfer 布局尺寸。
|
||||
private struct WiredTransferEmptyIllustration: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Ellipse()
|
||||
.fill(Color(hex: 0xE7E9EB))
|
||||
.frame(width: 180, height: 28)
|
||||
.offset(y: 52)
|
||||
RoundedRectangle(cornerRadius: 14)
|
||||
.fill(Color.white)
|
||||
.frame(width: 56, height: 96)
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.fill(Color(hex: 0xE7E9EB))
|
||||
.frame(width: 36, height: 36)
|
||||
.offset(y: -16)
|
||||
}
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: 14)
|
||||
.stroke(Color(hex: 0xDDE1E5), lineWidth: 2)
|
||||
}
|
||||
.offset(x: -36, y: -8)
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.fill(WiredTransferDesign.text333)
|
||||
.frame(width: 52, height: 34)
|
||||
.overlay {
|
||||
Circle()
|
||||
.fill(AppDesign.primary)
|
||||
.frame(width: 16, height: 16)
|
||||
.offset(x: 8)
|
||||
}
|
||||
.offset(x: 42, y: 4)
|
||||
HStack(spacing: 0) {
|
||||
Rectangle()
|
||||
.fill(AppDesign.primary)
|
||||
.frame(width: 18, height: 4)
|
||||
Image(systemName: "arrowtriangle.right.fill")
|
||||
.font(.system(size: 8))
|
||||
.foregroundStyle(AppDesign.primary)
|
||||
}
|
||||
.offset(x: 4, y: 4)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user