diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index ebbde8329..7b70d1af8 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ CoreDataStack.xcscheme_^#shared#^_ orderHint - 21 + 27 Mastodon - ASDK.xcscheme_^#shared#^_ @@ -37,7 +37,7 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 22 + 26 SuppressBuildableAutocreation diff --git a/Mastodon/Diffiable/Section/SettingsSection.swift b/Mastodon/Diffiable/Section/SettingsSection.swift index 7ec78a2ed..6079d90d3 100644 --- a/Mastodon/Diffiable/Section/SettingsSection.swift +++ b/Mastodon/Diffiable/Section/SettingsSection.swift @@ -8,14 +8,14 @@ import Foundation enum SettingsSection: Hashable { - case apperance + case appearance case notifications case boringZone case spicyZone var title: String { switch self { - case .apperance: return L10n.Scene.Settings.Section.Appearance.title + case .appearance: return L10n.Scene.Settings.Section.Appearance.title case .notifications: return L10n.Scene.Settings.Section.Notifications.title case .boringZone: return L10n.Scene.Settings.Section.Boringzone.title case .spicyZone: return L10n.Scene.Settings.Section.Spicyzone.title diff --git a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/Contents.json b/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/Contents.json index 3febbcacb..ae4670472 100644 --- a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/Contents.json @@ -1,22 +1,15 @@ { "images" : [ { - "filename" : "c1.svg", - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "filename" : "c1-1.svg", + "filename" : "mastodon.with.mail.svg", "idiom" : "universal" } ], "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true } } diff --git a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/c1-1.svg b/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/c1-1.svg deleted file mode 100644 index a316721b0..000000000 --- a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/c1-1.svg +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/c1.svg b/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/c1.svg deleted file mode 100644 index ce59284c0..000000000 --- a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/c1.svg +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/mastodon.with.mail.svg b/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/mastodon.with.mail.svg new file mode 100644 index 000000000..d3869cda5 --- /dev/null +++ b/Mastodon/Resources/Assets.xcassets/Asset/email.imageset/mastodon.with.mail.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json index 5e7067405..acd80352b 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.grouped.system.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "46", - "green" : "44", - "red" : "44" + "blue" : "67", + "green" : "53", + "red" : "49" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json index 82abbf254..e4dc3161f 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/secondary.system.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "46", - "green" : "44", - "red" : "44" + "blue" : "34", + "green" : "27", + "red" : "25" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json index 23d03492f..01c3e3ff1 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x00", - "green" : "0x00", - "red" : "0x00" + "blue" : "55", + "green" : "44", + "red" : "40" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.elevated.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.elevated.background.colorset/Contents.json index e13fb4690..dd6cbfd91 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.elevated.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.elevated.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x1E", - "green" : "0x1C", - "red" : "0x1C" + "blue" : "55", + "green" : "44", + "red" : "40" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json index 6bce2b697..6ea6c820e 100644 --- a/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Colors/Background/system.grouped.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0x00", - "green" : "0x00", - "red" : "0x00" + "blue" : "34", + "green" : "27", + "red" : "25" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Scene/Compose/background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Scene/Compose/background.colorset/Contents.json index 82edd034b..dd6cbfd91 100644 --- a/Mastodon/Resources/Assets.xcassets/Scene/Compose/background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Scene/Compose/background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "30", - "green" : "28", - "red" : "28" + "blue" : "55", + "green" : "44", + "red" : "40" } }, "idiom" : "universal" diff --git a/Mastodon/Resources/Assets.xcassets/Scene/Compose/toolbar.background.colorset/Contents.json b/Mastodon/Resources/Assets.xcassets/Scene/Compose/toolbar.background.colorset/Contents.json index 4ef70f635..9fba7740c 100644 --- a/Mastodon/Resources/Assets.xcassets/Scene/Compose/toolbar.background.colorset/Contents.json +++ b/Mastodon/Resources/Assets.xcassets/Scene/Compose/toolbar.background.colorset/Contents.json @@ -23,9 +23,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "43", - "green" : "43", - "red" : "43" + "blue" : "32", + "green" : "32", + "red" : "32" } }, "idiom" : "universal" diff --git a/Mastodon/Scene/Compose/ComposeViewController.swift b/Mastodon/Scene/Compose/ComposeViewController.swift index 361aff090..d3b83f98f 100644 --- a/Mastodon/Scene/Compose/ComposeViewController.swift +++ b/Mastodon/Scene/Compose/ComposeViewController.swift @@ -585,17 +585,20 @@ extension ComposeViewController { } private func updateKeyboardBackground(isKeyboardDisplay: Bool) { - guard isKeyboardDisplay else { - composeToolbarBackgroundView.backgroundColor = Asset.Scene.Compose.toolbarBackground.color - return - } - composeToolbarBackgroundView.backgroundColor = UIColor(dynamicProvider: { traitCollection -> UIColor in - // avoid elevated color - switch traitCollection.userInterfaceStyle { - case .light: return .white - default: return .black - } - }) + composeToolbarBackgroundView.backgroundColor = Asset.Scene.Compose.toolbarBackground.color + + // Deprecated: not works for new Dark Mode color + // guard isKeyboardDisplay else { + // composeToolbarBackgroundView.backgroundColor = Asset.Scene.Compose.toolbarBackground.color + // return + // } + // composeToolbarBackgroundView.backgroundColor = UIColor(dynamicProvider: { traitCollection -> UIColor in + // // avoid elevated color + // switch traitCollection.userInterfaceStyle { + // case .light: return .white + // default: return .black + // } + // }) } } diff --git a/Mastodon/Scene/Notification/TableViewCell/NotificationTableViewCell.swift b/Mastodon/Scene/Notification/TableViewCell/NotificationTableViewCell.swift index 067283935..fc69155be 100644 --- a/Mastodon/Scene/Notification/TableViewCell/NotificationTableViewCell.swift +++ b/Mastodon/Scene/Notification/TableViewCell/NotificationTableViewCell.swift @@ -125,6 +125,7 @@ final class NotificationTableViewCell: UITableViewCell { extension NotificationTableViewCell { func configure() { + backgroundColor = Asset.Colors.Background.systemBackground.color let containerStackView = UIStackView() containerStackView.axis = .vertical diff --git a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift index d5fb66e39..2885fe7ea 100644 --- a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift +++ b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift @@ -40,6 +40,7 @@ final class MastodonConfirmEmailViewController: UIViewController, NeedsDependenc let emailImageView: UIImageView = { let imageView = UIImageView() imageView.image = Asset.Asset.email.image + imageView.backgroundColor = .clear imageView.contentMode = .scaleAspectFit return imageView }() diff --git a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift index 955f70a0f..1a9043ef2 100644 --- a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift +++ b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift @@ -96,7 +96,14 @@ final class MastodonRegisterViewController: UIViewController, NeedsDependency, O let image = Asset.Circles.plusCircleFill.image.withRenderingMode(.alwaysTemplate) icon.image = image icon.tintColor = Asset.Colors.Icon.plus.color - icon.backgroundColor = .white + icon.backgroundColor = UIColor(dynamicProvider: { collection in + switch collection.userInterfaceStyle { + case .dark: + return Asset.Colors.Background.secondaryGroupedSystemBackground.color + default: + return .white + } + }) return icon }() diff --git a/Mastodon/Scene/Report/ReportHeaderView.swift b/Mastodon/Scene/Report/ReportHeaderView.swift index 8a6d957c8..a3d821095 100644 --- a/Mastodon/Scene/Report/ReportHeaderView.swift +++ b/Mastodon/Scene/Report/ReportHeaderView.swift @@ -46,6 +46,8 @@ final class ReportHeaderView: UIView { view.spacing = 2 return view }() + + let bottomSeparatorLine = UIView.separatorLine var step: Step = .one { didSet { @@ -87,6 +89,15 @@ final class ReportHeaderView: UIView { constant: ReportView.horizontalMargin ) ]) + + bottomSeparatorLine.translatesAutoresizingMaskIntoConstraints = false + addSubview(bottomSeparatorLine) + NSLayoutConstraint.activate([ + bottomSeparatorLine.leadingAnchor.constraint(equalTo: leadingAnchor), + bottomSeparatorLine.trailingAnchor.constraint(equalTo: trailingAnchor), + bottomSeparatorLine.bottomAnchor.constraint(equalTo: bottomAnchor), + bottomSeparatorLine.heightAnchor.constraint(equalToConstant: UIView.separatorLineHeight(of: self)).priority(.defaultHigh), + ]) } required init?(coder: NSCoder) { diff --git a/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift b/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift index f5fa003a3..80046b13d 100644 --- a/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift +++ b/Mastodon/Scene/Report/ReportedStatusTableviewCell.swift @@ -89,7 +89,7 @@ final class ReportedStatusTableViewCell: UITableViewCell, StatusCell { extension ReportedStatusTableViewCell { private func _init() { - backgroundColor = Asset.Colors.Background.systemBackground.color + backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color checkbox.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(checkbox) diff --git a/Mastodon/Scene/Settings/SettingsViewModel.swift b/Mastodon/Scene/Settings/SettingsViewModel.swift index c489f2133..326dc0a4a 100644 --- a/Mastodon/Scene/Settings/SettingsViewModel.swift +++ b/Mastodon/Scene/Settings/SettingsViewModel.swift @@ -72,8 +72,8 @@ extension SettingsViewModel { // appearance let appearanceItems = [SettingsItem.appearance(settingObjectID: setting.objectID)] - snapshot.appendSections([.apperance]) - snapshot.appendItems(appearanceItems, toSection: .apperance) + snapshot.appendSections([.appearance]) + snapshot.appendItems(appearanceItems, toSection: .appearance) let notificationItems = SettingsItem.NotificationSwitchMode.allCases.map { mode in SettingsItem.notification(settingObjectID: setting.objectID, switchMode: mode) diff --git a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift index 25bf4f1a0..1cafd046e 100644 --- a/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift +++ b/Mastodon/Scene/Settings/View/Cell/SettingsAppearanceTableViewCell.swift @@ -149,7 +149,7 @@ class SettingsAppearanceTableViewCell: UITableViewCell { override func layoutSubviews() { super.layoutSubviews() - // remove seperator line in section of group tableview + // remove separator line in section of group tableview for subview in self.subviews { if subview != self.contentView && subview.frame.width == self.frame.width { subview.removeFromSuperview() diff --git a/Mastodon/Scene/Settings/View/Cell/SettingsLinkTableViewCell.swift b/Mastodon/Scene/Settings/View/Cell/SettingsLinkTableViewCell.swift index 7fdbf7f02..90350f54d 100644 --- a/Mastodon/Scene/Settings/View/Cell/SettingsLinkTableViewCell.swift +++ b/Mastodon/Scene/Settings/View/Cell/SettingsLinkTableViewCell.swift @@ -31,5 +31,6 @@ extension SettingsLinkTableViewCell { func update(with link: SettingsItem.Link) { textLabel?.text = link.title textLabel?.textColor = link.textColor + backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color } } diff --git a/Mastodon/Scene/Settings/View/Cell/SettingsToggleTableViewCell.swift b/Mastodon/Scene/Settings/View/Cell/SettingsToggleTableViewCell.swift index 86698d840..0059b1144 100644 --- a/Mastodon/Scene/Settings/View/Cell/SettingsToggleTableViewCell.swift +++ b/Mastodon/Scene/Settings/View/Cell/SettingsToggleTableViewCell.swift @@ -38,6 +38,7 @@ class SettingsToggleTableViewCell: UITableViewCell { private func setupUI() { selectionStyle = .none accessoryView = switchButton + backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color switchButton.addTarget(self, action: #selector(switchValueDidChange(sender:)), for: .valueChanged) } diff --git a/Mastodon/Scene/Share/View/Content/ContentWarningOverlayView.swift b/Mastodon/Scene/Share/View/Content/ContentWarningOverlayView.swift index 88576e8af..0a822246d 100644 --- a/Mastodon/Scene/Share/View/Content/ContentWarningOverlayView.swift +++ b/Mastodon/Scene/Share/View/Content/ContentWarningOverlayView.swift @@ -77,6 +77,7 @@ extension ContentWarningOverlayView { private func _init() { backgroundColor = .clear isUserInteractionEnabled = true + layer.masksToBounds = false // visual effect style // add blur visual effect view in the setup method @@ -114,10 +115,10 @@ extension ContentWarningOverlayView { contentOverlayView.translatesAutoresizingMaskIntoConstraints = false addSubview(contentOverlayView) NSLayoutConstraint.activate([ - contentOverlayView.topAnchor.constraint(equalTo: topAnchor), - contentOverlayView.leadingAnchor.constraint(equalTo: leadingAnchor), - contentOverlayView.trailingAnchor.constraint(equalTo: trailingAnchor), - contentOverlayView.bottomAnchor.constraint(equalTo: bottomAnchor), + topAnchor.constraint(equalTo: contentOverlayView.topAnchor, constant: 2), + leadingAnchor.constraint(equalTo: contentOverlayView.leadingAnchor, constant: 2), + contentOverlayView.trailingAnchor.constraint(equalTo: trailingAnchor, constant: 2), + contentOverlayView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: 2), ]) let blurContentWarningLabelContainer = UIStackView()