优化相册管理与指定上传弹层展示逻辑。
相册详情网格仅对已购买素材显示角标;指定上传 Sheet 改用 NavigationStack 与系统 navigationTitle。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -25,7 +25,7 @@ Android 对照:`zhiflyfollow/.../TravelAlbumDetailScreen.kt`
|
|||||||
```
|
```
|
||||||
TravelAlbumDetailInfoCard # 信息卡片:手机号 + 创建时间 + 拨号
|
TravelAlbumDetailInfoCard # 信息卡片:手机号 + 创建时间 + 拨号
|
||||||
TravelAlbumDetailPhotoManageCard # 白卡片:Tab / 排序 / 批量选择 + 网格
|
TravelAlbumDetailPhotoManageCard # 白卡片:Tab / 排序 / 批量选择 + 网格
|
||||||
TravelAlbumDetailMaterialGridItem# 缩略图 + 已上传角标 + 文件名 + 大小
|
TravelAlbumDetailMaterialGridItem# 缩略图 + 已购买角标(条件显示)+ 文件名 + 大小
|
||||||
BottomBar # 上传照片 + 条件删除选中
|
BottomBar # 上传照片 + 条件删除选中
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -57,14 +57,16 @@ struct TravelAlbumDetailMaterialGridItem: View {
|
|||||||
}
|
}
|
||||||
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.thumbnailCornerRadius))
|
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.thumbnailCornerRadius))
|
||||||
.overlay(alignment: .topLeading) {
|
.overlay(alignment: .topLeading) {
|
||||||
Text("已上传")
|
if material.isPurchased {
|
||||||
.font(.system(size: 10))
|
Text("已购买")
|
||||||
.foregroundStyle(.white)
|
.font(.system(size: 10))
|
||||||
.padding(.horizontal, 4)
|
.foregroundStyle(.white)
|
||||||
.padding(.vertical, 2)
|
.padding(.horizontal, 4)
|
||||||
.background(TravelAlbumDetailDesign.uploadedGreen)
|
.padding(.vertical, 2)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.uploadedBadgeCornerRadius))
|
.background(AppDesign.primary)
|
||||||
.padding(4)
|
.clipShape(RoundedRectangle(cornerRadius: TravelAlbumDetailDesign.uploadedBadgeCornerRadius))
|
||||||
|
.padding(4)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.overlay(alignment: .topTrailing) {
|
.overlay(alignment: .topTrailing) {
|
||||||
if isSelectionMode {
|
if isSelectionMode {
|
||||||
|
|||||||
@ -141,7 +141,7 @@ struct WiredCameraTransferView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.presentationDetents([.height(340)])
|
.presentationDetents([.height(360)])
|
||||||
.presentationDragIndicator(.hidden)
|
.presentationDragIndicator(.hidden)
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $viewModel.showHelpDoc) {
|
.sheet(isPresented: $viewModel.showHelpDoc) {
|
||||||
|
|||||||
@ -18,54 +18,47 @@ struct SpecifyUploadBottomSheet: View {
|
|||||||
]
|
]
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
NavigationStack {
|
||||||
ZStack {
|
VStack(spacing: 0) {
|
||||||
Button("取消") { isPresented = false }
|
VStack(spacing: 12) {
|
||||||
.font(.system(size: 16))
|
ForEach(options, id: \.self) { option in
|
||||||
.foregroundStyle(AppDesign.primary)
|
optionRow(option)
|
||||||
.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)
|
|
||||||
}
|
}
|
||||||
}
|
.padding(.horizontal, 16)
|
||||||
.padding(.horizontal, 16)
|
.padding(.top, 12)
|
||||||
|
|
||||||
Spacer(minLength: 20)
|
Spacer(minLength: 20)
|
||||||
|
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
Button("取消") { isPresented = false }
|
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))
|
.font(.system(size: 16, weight: .medium))
|
||||||
.foregroundStyle(AppDesign.primary)
|
.foregroundStyle(.white)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.frame(height: 48)
|
.frame(height: 48)
|
||||||
.background(Color.white)
|
.background(AppDesign.primary)
|
||||||
.overlay {
|
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||||
RoundedRectangle(cornerRadius: 10)
|
|
||||||
.stroke(AppDesign.primary, lineWidth: 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
Button("确认上传") {
|
|
||||||
onConfirm(selectedOption)
|
|
||||||
}
|
}
|
||||||
.font(.system(size: 16, weight: .medium))
|
.padding(.horizontal, 16)
|
||||||
.foregroundStyle(.white)
|
.padding(.vertical, 12)
|
||||||
.frame(maxWidth: .infinity)
|
|
||||||
.frame(height: 48)
|
|
||||||
.background(AppDesign.primary)
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 16)
|
.background(WiredTransferDesign.pageBackground)
|
||||||
.padding(.vertical, 12)
|
.navigationTitle("指定上传")
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
}
|
}
|
||||||
.background(WiredTransferDesign.pageBackground)
|
|
||||||
.onAppear {
|
.onAppear {
|
||||||
selectedOption = options.first ?? WiredCameraTransferViewModel.specifyUploadAllPending
|
selectedOption = options.first ?? WiredCameraTransferViewModel.specifyUploadAllPending
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user