feat: refine AI retouch workflow
This commit is contained in:
@@ -284,8 +284,8 @@ final class TravelAlbumAIRetouchTemplateViewController: BaseViewController {
|
||||
header.apply(
|
||||
title: category.title,
|
||||
badge: category == .cover
|
||||
? .gift
|
||||
: (self.viewModel.isOptional(category) ? .optional : nil)
|
||||
? .requiredGift
|
||||
: (self.viewModel.isOptional(category) ? .optional : .required)
|
||||
)
|
||||
case .mode:
|
||||
return nil
|
||||
@@ -845,11 +845,12 @@ final class TravelAlbumAIRetouchModeCell: UICollectionViewCell {
|
||||
|
||||
/// 模板分组标题右侧的业务标记。
|
||||
fileprivate enum AIRetouchTemplateSectionBadge {
|
||||
case required
|
||||
case optional
|
||||
case gift
|
||||
case requiredGift
|
||||
}
|
||||
|
||||
/// AI 修图模板分组标题,可附带选填或赠送标记。
|
||||
/// AI 修图模板分组标题,展示必选、选填或封面赠送规则。
|
||||
final class TravelAlbumAIRetouchSectionHeader: UICollectionReusableView {
|
||||
static let reuseIdentifier = "TravelAlbumAIRetouchSectionHeader"
|
||||
|
||||
@@ -896,12 +897,16 @@ final class TravelAlbumAIRetouchSectionHeader: UICollectionReusableView {
|
||||
titleLabel.text = title
|
||||
badgeContainer.isHidden = badge == nil
|
||||
switch badge {
|
||||
case .required:
|
||||
badgeLabel.text = "必选"
|
||||
badgeLabel.textColor = AIRetouchTemplateStyle.danger
|
||||
badgeContainer.backgroundColor = AIRetouchTemplateStyle.danger.withAlphaComponent(0.1)
|
||||
case .optional:
|
||||
badgeLabel.text = "选填"
|
||||
badgeLabel.textColor = AIRetouchTemplateStyle.primary
|
||||
badgeContainer.backgroundColor = AIRetouchTemplateStyle.primary.withAlphaComponent(0.1)
|
||||
case .gift:
|
||||
badgeLabel.text = "赠送 · 不占额度"
|
||||
case .requiredGift:
|
||||
badgeLabel.text = "必选 · 赠送 · 不占额度"
|
||||
badgeLabel.textColor = AIRetouchTemplateStyle.gift
|
||||
badgeContainer.backgroundColor = AIRetouchTemplateStyle.giftBackground
|
||||
case nil:
|
||||
|
||||
Reference in New Issue
Block a user