优化相册管理与指定上传弹层展示逻辑。

相册详情网格仅对已购买素材显示角标;指定上传 Sheet 改用 NavigationStack 与系统 navigationTitle。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-30 14:00:46 +08:00
parent 5e620623eb
commit 28db8b3182
4 changed files with 44 additions and 49 deletions

View File

@ -25,7 +25,7 @@ Android 对照:`zhiflyfollow/.../TravelAlbumDetailScreen.kt`
```
TravelAlbumDetailInfoCard # 信息卡片:手机号 + 创建时间 + 拨号
TravelAlbumDetailPhotoManageCard # 白卡片Tab / 排序 / 批量选择 + 网格
TravelAlbumDetailMaterialGridItem# 缩略图 + 已上传角标 + 文件名 + 大小
TravelAlbumDetailMaterialGridItem# 缩略图 + 已购买角标(条件显示)+ 文件名 + 大小
BottomBar # 上传照片 + 条件删除选中
```

View File

@ -57,14 +57,16 @@ struct TravelAlbumDetailMaterialGridItem: View {
}
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.thumbnailCornerRadius))
.overlay(alignment: .topLeading) {
Text("已上传")
.font(.system(size: 10))
.foregroundStyle(.white)
.padding(.horizontal, 4)
.padding(.vertical, 2)
.background(TravelAlbumDetailDesign.uploadedGreen)
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.uploadedBadgeCornerRadius))
.padding(4)
if material.isPurchased {
Text("已购买")
.font(.system(size: 10))
.foregroundStyle(.white)
.padding(.horizontal, 4)
.padding(.vertical, 2)
.background(AppDesign.primary)
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.uploadedBadgeCornerRadius))
.padding(4)
}
}
.overlay(alignment: .topTrailing) {
if isSelectionMode {

View File

@ -141,7 +141,7 @@ struct WiredCameraTransferView: View {
)
}
}
.presentationDetents([.height(340)])
.presentationDetents([.height(360)])
.presentationDragIndicator(.hidden)
}
.sheet(isPresented: $viewModel.showHelpDoc) {

View File

@ -18,54 +18,47 @@ struct SpecifyUploadBottomSheet: View {
]
var body: some View {
VStack(spacing: 0) {
ZStack {
Button("取消") { isPresented = false }
.font(.system(size: 16))
.foregroundStyle(AppDesign.primary)
.frame(maxWidth: .infinity, alignment: .leading)
Text("指定上传")
.font(.system(size: 17, weight: .semibold))
.foregroundStyle(WiredTransferDesign.text333)
}
.padding(.horizontal, 16)
.frame(height: 52)
VStack(spacing: 12) {
ForEach(options, id: \.self) { option in
optionRow(option)
NavigationStack {
VStack(spacing: 0) {
VStack(spacing: 12) {
ForEach(options, id: \.self) { option in
optionRow(option)
}
}
}
.padding(.horizontal, 16)
.padding(.horizontal, 16)
.padding(.top, 12)
Spacer(minLength: 20)
Spacer(minLength: 20)
HStack(spacing: 12) {
Button("取消") { isPresented = false }
HStack(spacing: 12) {
Button("取消") { isPresented = false }
.font(.system(size: 16, weight: .medium))
.foregroundStyle(AppDesign.primary)
.frame(maxWidth: .infinity)
.frame(height: 48)
.background(Color.white)
.overlay {
RoundedRectangle(cornerRadius: 10)
.stroke(AppDesign.primary, lineWidth: 1)
}
Button("确认上传") {
onConfirm(selectedOption)
}
.font(.system(size: 16, weight: .medium))
.foregroundStyle(AppDesign.primary)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.frame(height: 48)
.background(Color.white)
.overlay {
RoundedRectangle(cornerRadius: 10)
.stroke(AppDesign.primary, lineWidth: 1)
}
Button("确认上传") {
onConfirm(selectedOption)
.background(AppDesign.primary)
.clipShape(RoundedRectangle(cornerRadius: 10))
}
.font(.system(size: 16, weight: .medium))
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.frame(height: 48)
.background(AppDesign.primary)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding(.horizontal, 16)
.padding(.vertical, 12)
}
.padding(.horizontal, 16)
.padding(.vertical, 12)
.background(WiredTransferDesign.pageBackground)
.navigationTitle("指定上传")
.navigationBarTitleDisplayMode(.inline)
}
.background(WiredTransferDesign.pageBackground)
.onAppear {
selectedOption = options.first ?? WiredCameraTransferViewModel.specifyUploadAllPending
}