|
@@ -55,7 +55,7 @@ import Cocoa
|
|
} else {
|
|
} else {
|
|
self.view.layer?.backgroundColor = NSColor.white.cgColor
|
|
self.view.layer?.backgroundColor = NSColor.white.cgColor
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
self.titleLabel.font = NSFont.SFProTextSemiboldFont(18)
|
|
self.titleLabel.font = NSFont.SFProTextSemiboldFont(18)
|
|
self.whatNewlabel.font = NSFont.SFProTextSemiboldFont(12)
|
|
self.whatNewlabel.font = NSFont.SFProTextSemiboldFont(12)
|
|
self.titleLabel.textColor = KMAppearance.KMColor_Layout_H0()
|
|
self.titleLabel.textColor = KMAppearance.KMColor_Layout_H0()
|
|
@@ -77,7 +77,7 @@ import Cocoa
|
|
|
|
|
|
} else {
|
|
} else {
|
|
self.emptyContendBox.isHidden = false
|
|
self.emptyContendBox.isHidden = false
|
|
-
|
|
|
|
|
|
+
|
|
var viewRect = self.view.frame
|
|
var viewRect = self.view.frame
|
|
viewRect.size.height = 386
|
|
viewRect.size.height = 386
|
|
self.view.frame = viewRect
|
|
self.view.frame = viewRect
|
|
@@ -95,7 +95,7 @@ import Cocoa
|
|
self.emptyTipButton.mouseMoveCallback = {[unowned self] mouseEntered in
|
|
self.emptyTipButton.mouseMoveCallback = {[unowned self] mouseEntered in
|
|
if mouseEntered {
|
|
if mouseEntered {
|
|
let tipString = NSLocalizedString("Each use of the AI tools costs 1 or more credits.", comment: "")
|
|
let tipString = NSLocalizedString("Each use of the AI tools costs 1 or more credits.", comment: "")
|
|
-
|
|
|
|
|
|
+
|
|
let popViewController = KMToolbarItemPopViewController.init()
|
|
let popViewController = KMToolbarItemPopViewController.init()
|
|
if self.popOver == nil {
|
|
if self.popOver == nil {
|
|
self.popOver = NSPopover.init()
|
|
self.popOver = NSPopover.init()
|
|
@@ -111,8 +111,34 @@ import Cocoa
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(KMMemberInfo.shared.isLogin == true) {
|
|
|
|
+ addWaitingView(to: self.view)
|
|
|
|
+ KMUserInfoViewController.refreshTokenUserInfo {[weak self] success, resDic in
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ self?.removeWaitingView(from: self?.view ?? NSView())
|
|
|
|
+ if(success == true) {
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ func addWaitingView(to view: NSView) {
|
|
|
|
+ removeWaitingView(from: view)
|
|
|
|
+ let waitingView = WaitingView(frame: view.bounds)
|
|
|
|
+ waitingView.autoresizingMask = [.width, .height]
|
|
|
|
+ view.addSubview(waitingView)
|
|
|
|
+ waitingView.startAnimation()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ func removeWaitingView(from view: NSView) {
|
|
|
|
+ for subview in view.subviews {
|
|
|
|
+ if subview is WaitingView {
|
|
|
|
+ subview.removeFromSuperview()
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
func updateEmptyCreditViewUI() -> Void {
|
|
func updateEmptyCreditViewUI() -> Void {
|