对齐有线传图页 Android UI,并改用相对路径持久化本地照片。
还原顶栏、浮动卡片、时间侧栏与底部交互;照片路径改为 CameraDownloads 相对路径并兼容旧数据;格式 Chip 固定 JPG 且不可点击。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -0,0 +1,55 @@
|
||||
//
|
||||
// WiredTransferBottomBar.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// 有线传图底部操作栏。
|
||||
struct WiredTransferBottomBar: View {
|
||||
let selectUploadMode: Bool
|
||||
let selectedCount: Int
|
||||
let onBatchUploadClick: () -> Void
|
||||
let onSpecifyUploadClick: () -> Void
|
||||
|
||||
private var batchButtonTitle: String {
|
||||
if !selectUploadMode { return "批量上传" }
|
||||
if selectedCount > 0 { return "上传选中照片" }
|
||||
return "取消选择"
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
Divider().background(WiredTransferDesign.borderLight)
|
||||
HStack(spacing: 12) {
|
||||
Button(action: onBatchUploadClick) {
|
||||
Text(batchButtonTitle)
|
||||
.font(.system(size: 15))
|
||||
.foregroundStyle(.white)
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: WiredTransferDesign.bottomButtonHeight)
|
||||
.background(AppDesign.primary)
|
||||
.clipShape(RoundedRectangle(cornerRadius: WiredTransferDesign.bottomButtonCornerRadius))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
Button(action: onSpecifyUploadClick) {
|
||||
Text("指定上传")
|
||||
.font(.system(size: 15))
|
||||
.foregroundStyle(selectUploadMode ? WiredTransferDesign.text999 : AppDesign.primary)
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: WiredTransferDesign.bottomButtonHeight)
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: WiredTransferDesign.bottomButtonCornerRadius)
|
||||
.stroke(AppDesign.primary, lineWidth: 1)
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.disabled(selectUploadMode)
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 12)
|
||||
}
|
||||
.background(Color.white)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user