修复有线传图新拍照片不显示,并优化旅拍相册列表交互。
未绑定相册的新拍照片被错误过滤导致列表始终为空;同时调整入口卡片点击区域与详情素材网格布局。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -136,32 +136,54 @@ private struct TravelAlbumCard: View {
|
||||
let onOpenCode: () -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: AppMetrics.Spacing.small) {
|
||||
HStack(alignment: .top, spacing: AppMetrics.Spacing.medium) {
|
||||
RemoteImage(urlString: album.coverURL) {
|
||||
Color(hex: 0xE5E7EB)
|
||||
.overlay { Image(systemName: "photo").foregroundStyle(AppDesign.placeholder) }
|
||||
}
|
||||
NavigationLink {
|
||||
TravelAlbumDetailView(albumID: album.id)
|
||||
.onAppear { onOpenDetail() }
|
||||
} label: {
|
||||
VStack(alignment: .leading, spacing: AppMetrics.Spacing.small) {
|
||||
HStack(alignment: .top, spacing: AppMetrics.Spacing.medium) {
|
||||
RemoteImage(urlString: album.coverURL) {
|
||||
Color(hex: 0xE5E7EB)
|
||||
.overlay { Image(systemName: "photo").foregroundStyle(AppDesign.placeholder) }
|
||||
}
|
||||
.frame(width: 72, height: 72)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text(album.name)
|
||||
.font(.system(size: AppMetrics.FontSize.title3, weight: .semibold))
|
||||
.foregroundStyle(AppDesign.textPrimary)
|
||||
.lineLimit(1)
|
||||
if !album.displayPhone.isEmpty {
|
||||
Label(album.displayPhone, systemImage: "phone.fill")
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text(album.name)
|
||||
.font(.system(size: AppMetrics.FontSize.title3, weight: .semibold))
|
||||
.foregroundStyle(AppDesign.textPrimary)
|
||||
.lineLimit(1)
|
||||
if !album.displayPhone.isEmpty {
|
||||
Label(album.displayPhone, systemImage: "phone.fill")
|
||||
.font(.system(size: AppMetrics.FontSize.caption))
|
||||
.foregroundStyle(AppDesign.textSecondary)
|
||||
}
|
||||
Text(album.type == 1 ? "先拍再买" : "买了再拍")
|
||||
.font(.system(size: AppMetrics.FontSize.caption))
|
||||
.foregroundStyle(AppDesign.textSecondary)
|
||||
.foregroundStyle(AppDesign.primary)
|
||||
}
|
||||
Text(album.type == 1 ? "先拍再买" : "买了再拍")
|
||||
.font(.system(size: AppMetrics.FontSize.caption))
|
||||
.foregroundStyle(AppDesign.primary)
|
||||
Spacer()
|
||||
Image(systemName: "chevron.right")
|
||||
.font(.system(size: AppMetrics.FontSize.caption, weight: .semibold))
|
||||
.foregroundStyle(AppDesign.placeholder)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
||||
// 占位底部操作区高度,保证整卡可点进详情且布局与真实按钮对齐
|
||||
HStack(spacing: AppMetrics.Spacing.small) {
|
||||
actionChip(title: "拍传", systemImage: "cable.connector")
|
||||
actionChip(title: "相册码", systemImage: "qrcode")
|
||||
}
|
||||
.hidden()
|
||||
}
|
||||
.padding(AppMetrics.Spacing.large)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.background(Color.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: AppMetrics.CornerRadius.card))
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.overlay(alignment: .bottomLeading) {
|
||||
HStack(spacing: AppMetrics.Spacing.small) {
|
||||
NavigationLink {
|
||||
WiredCameraTransferView(context: WiredTransferContext(
|
||||
@ -178,18 +200,10 @@ private struct TravelAlbumCard: View {
|
||||
Button(action: onOpenCode) {
|
||||
actionChip(title: "相册码", systemImage: "qrcode")
|
||||
}
|
||||
|
||||
NavigationLink {
|
||||
TravelAlbumDetailView(albumID: album.id)
|
||||
.onAppear { onOpenDetail() }
|
||||
} label: {
|
||||
actionChip(title: "详情", systemImage: "info.circle")
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, AppMetrics.Spacing.large)
|
||||
.padding(.bottom, AppMetrics.Spacing.large)
|
||||
}
|
||||
.padding(AppMetrics.Spacing.large)
|
||||
.background(Color.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: AppMetrics.CornerRadius.card))
|
||||
}
|
||||
|
||||
private func actionChip(title: String, systemImage: String) -> some View {
|
||||
|
||||
Reference in New Issue
Block a user