feat: update app workflows and permissions

This commit is contained in:
2026-07-09 17:34:00 +08:00
parent 43e6133c21
commit 8e356973bd
44 changed files with 2944 additions and 307 deletions

View File

@ -15,14 +15,16 @@ final class HomeWorkStatusCardView: UIView {
private let contentStackView = UIStackView()
private let onlineButton = UIButton(type: .system)
private let countdownStackView = UIStackView()
private let countdownIconView = UIImageView(image: UIImage(systemName: "clock"))
private let countdownIconView = UIImageView(image: UIImage(systemName: "clock.fill"))
private let countdownLabel = UILabel()
private let reminderButton = UIButton(type: .system)
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = AppColor.cardBackground
layer.cornerRadius = AppRadius.md
layer.cornerRadius = AppRadius.lg
layer.borderWidth = 1
layer.borderColor = AppColor.cardOutline.cgColor
clipsToBounds = true
contentStackView.axis = .horizontal
@ -31,8 +33,8 @@ final class HomeWorkStatusCardView: UIView {
contentStackView.spacing = AppSpacing.sm
onlineButton.titleLabel?.font = .app(.captionMedium)
onlineButton.layer.cornerRadius = AppRadius.xs
onlineButton.contentEdgeInsets = UIEdgeInsets(top: 6, left: 12, bottom: 6, right: 12)
onlineButton.layer.cornerRadius = AppRadius.sm
onlineButton.contentEdgeInsets = UIEdgeInsets(top: 7, left: 14, bottom: 7, right: 14)
onlineButton.addTarget(self, action: #selector(onlineTapped), for: .touchUpInside)
countdownStackView.axis = .horizontal
@ -42,16 +44,17 @@ final class HomeWorkStatusCardView: UIView {
countdownIconView.contentMode = .scaleAspectFit
countdownIconView.setContentCompressionResistancePriority(.required, for: .horizontal)
countdownLabel.font = .app(.subtitle)
countdownLabel.font = .systemFont(ofSize: 18, weight: .semibold)
countdownLabel.textColor = AppColor.primary
countdownLabel.adjustsFontSizeToFitWidth = true
countdownLabel.minimumScaleFactor = 0.85
countdownLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
reminderButton.titleLabel?.font = .app(.subtitle)
reminderButton.titleLabel?.font = .systemFont(ofSize: 16, weight: .semibold)
reminderButton.setTitleColor(AppColor.primary, for: .normal)
reminderButton.tintColor = AppColor.primary
reminderButton.setImage(UIImage(systemName: "bell.fill"), for: .normal)
let reminderIconConfig = UIImage.SymbolConfiguration(pointSize: 14, weight: .semibold)
reminderButton.setImage(UIImage(systemName: "bell.fill", withConfiguration: reminderIconConfig), for: .normal)
reminderButton.semanticContentAttribute = .forceLeftToRight
reminderButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 6)
reminderButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 6, bottom: 0, right: -6)
@ -67,10 +70,10 @@ final class HomeWorkStatusCardView: UIView {
addSubview(contentStackView)
contentStackView.snp.makeConstraints { make in
make.edges.equalToSuperview().inset(15)
make.edges.equalToSuperview().inset(AppSpacing.md)
}
countdownIconView.snp.makeConstraints { make in
make.width.height.equalTo(15)
make.width.height.equalTo(18)
}
snp.makeConstraints { make in
make.height.equalTo(84)