完善账号切换展示、首页菜单图标与有线传输设置 chip。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -55,7 +55,6 @@ final class TravelAlbumEntryViewController: BaseViewController {
|
||||
cell.apply(album: album)
|
||||
cell.onShootUpload = { [weak self] in self?.pushWiredTransfer(album: album) }
|
||||
cell.onAlbumCode = { [weak self] in self?.loadAlbumCode(album) }
|
||||
cell.onShare = { [weak self] in self?.showShareSheet() }
|
||||
return cell
|
||||
}
|
||||
|
||||
@ -162,18 +161,6 @@ final class TravelAlbumEntryViewController: BaseViewController {
|
||||
present(controller, animated: true)
|
||||
}
|
||||
|
||||
private func showShareSheet() {
|
||||
let sheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
|
||||
sheet.addAction(UIAlertAction(title: "微信好友", style: .default) { [weak self] _ in
|
||||
self?.showToast("已选择微信好友")
|
||||
})
|
||||
sheet.addAction(UIAlertAction(title: "QQ好友", style: .default) { [weak self] _ in
|
||||
self?.showToast("已选择QQ好友")
|
||||
})
|
||||
sheet.addAction(UIAlertAction(title: "取消", style: .cancel))
|
||||
present(sheet, animated: true)
|
||||
}
|
||||
|
||||
private func pushWiredTransfer(album: TravelAlbum) {
|
||||
let controller = WiredCameraTransferViewController(
|
||||
viewModel: WiredCameraTransferViewModel(
|
||||
@ -272,7 +259,6 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
|
||||
var onShootUpload: (() -> Void)?
|
||||
var onAlbumCode: (() -> Void)?
|
||||
var onShare: (() -> Void)?
|
||||
|
||||
private let cardView = UIView()
|
||||
private let coverView = UIImageView()
|
||||
@ -280,7 +266,6 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
private let nameLabel = UILabel()
|
||||
private let timeLabel = UILabel()
|
||||
private let phoneLabel = UILabel()
|
||||
private let shareButton = UIButton(type: .system)
|
||||
private let codeButton = UIButton(type: .system)
|
||||
private let uploadButton = UIButton(type: .system)
|
||||
|
||||
@ -314,8 +299,6 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
phoneLabel.numberOfLines = 1
|
||||
phoneLabel.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
|
||||
shareButton.setImage(UIImage(systemName: "square.and.arrow.up"), for: .normal)
|
||||
shareButton.tintColor = AppColor.primary
|
||||
codeButton.setImage(UIImage(systemName: "qrcode"), for: .normal)
|
||||
codeButton.tintColor = .black
|
||||
uploadButton.setImage(UIImage(systemName: "camera.fill"), for: .normal)
|
||||
@ -332,7 +315,6 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
cardView.addSubview(nameLabel)
|
||||
cardView.addSubview(timeLabel)
|
||||
cardView.addSubview(phoneLabel)
|
||||
cardView.addSubview(shareButton)
|
||||
cardView.addSubview(codeButton)
|
||||
cardView.addSubview(uploadButton)
|
||||
|
||||
@ -347,20 +329,15 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
make.center.equalToSuperview()
|
||||
make.size.equalTo(42)
|
||||
}
|
||||
shareButton.snp.makeConstraints { make in
|
||||
make.top.equalToSuperview().offset(12)
|
||||
make.trailing.equalTo(codeButton.snp.leading).offset(-8)
|
||||
make.size.equalTo(26)
|
||||
}
|
||||
codeButton.snp.makeConstraints { make in
|
||||
make.top.equalTo(shareButton)
|
||||
make.top.equalToSuperview().offset(12)
|
||||
make.trailing.equalToSuperview().offset(-10)
|
||||
make.size.equalTo(26)
|
||||
}
|
||||
nameLabel.snp.makeConstraints { make in
|
||||
make.top.equalToSuperview().offset(14)
|
||||
make.leading.equalTo(coverView.snp.trailing).offset(12)
|
||||
make.trailing.equalTo(shareButton.snp.leading).offset(-8)
|
||||
make.trailing.equalTo(codeButton.snp.leading).offset(-8)
|
||||
}
|
||||
timeLabel.snp.makeConstraints { make in
|
||||
make.top.equalTo(nameLabel.snp.bottom).offset(7)
|
||||
@ -381,7 +358,6 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
}
|
||||
|
||||
uploadButton.addTarget(self, action: #selector(uploadTapped), for: .touchUpInside)
|
||||
shareButton.addTarget(self, action: #selector(shareTapped), for: .touchUpInside)
|
||||
codeButton.addTarget(self, action: #selector(codeTapped), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@ -404,7 +380,6 @@ private final class TravelAlbumTaskCell: UITableViewCell {
|
||||
}
|
||||
|
||||
@objc private func uploadTapped() { onShootUpload?() }
|
||||
@objc private func shareTapped() { onShare?() }
|
||||
@objc private func codeTapped() { onAlbumCode?() }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user