优化相册管理与指定上传弹层展示逻辑。
相册详情网格仅对已购买素材显示角标;指定上传 Sheet 改用 NavigationStack 与系统 navigationTitle。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user