|
@@ -74,6 +74,8 @@ class KMUserInfoViewController: NSViewController {
|
|
|
|
|
|
private var viewModel = KMUserInfoVCModel()
|
|
|
private var cancellables = Set<AnyCancellable>()
|
|
|
+
|
|
|
+
|
|
|
|
|
|
override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
@@ -85,6 +87,18 @@ class KMUserInfoViewController: NSViewController {
|
|
|
bindViewModel()
|
|
|
languageLocalized()
|
|
|
initializeUI()
|
|
|
+
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(changeEffectiveAppearance), name: NSNotification.Name(rawValue: "kEffectiveAppearance"), object: nil)
|
|
|
+ }
|
|
|
+
|
|
|
+ @objc func changeEffectiveAppearance() {
|
|
|
+ let isDarkModel = KMAdvertisementConfig.isDarkModel()
|
|
|
+ if isDarkModel {
|
|
|
+ self.view.appearance = NSAppearance(named: .darkAqua)
|
|
|
+ } else {
|
|
|
+ self.view.appearance = NSAppearance(named: .aqua)
|
|
|
+ }
|
|
|
+ initializeUI()
|
|
|
}
|
|
|
|
|
|
// MARK: Private Method
|
|
@@ -145,6 +159,15 @@ class KMUserInfoViewController: NSViewController {
|
|
|
}
|
|
|
|
|
|
private func initializeUI() -> Void {
|
|
|
+ self.view.wantsLayer = true
|
|
|
+ let isDarkModel = KMAdvertisementConfig.isDarkModel()
|
|
|
+ if isDarkModel {
|
|
|
+ self.view.layer?.backgroundColor = NSColor(hex: "0E1114").cgColor;
|
|
|
+ } else {
|
|
|
+ self.view.layer?.backgroundColor = NSColor(hex: "FFFFFF").cgColor;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
userImageView.image = NSImage(named: "UserProfilePicture_Size")
|
|
|
emailLabel.textColor = NSColor(named: "0E1114")
|
|
|
emailLabel.font = NSFont.SFMediumFontWithSize(14)
|