|
@@ -97,9 +97,8 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
private let findJobsCTAHost = NSView()
|
|
private let findJobsCTAHost = NSView()
|
|
|
private let welcomeHeroHost = NSView()
|
|
private let welcomeHeroHost = NSView()
|
|
|
private let welcomeHeroBackgroundView = WelcomeHeroBackgroundView()
|
|
private let welcomeHeroBackgroundView = WelcomeHeroBackgroundView()
|
|
|
- private lazy var welcomeSparkleCluster: WelcomeSparkleClusterView = {
|
|
|
|
|
- WelcomeSparkleClusterView(iconWell: Theme.welcomeHeroIconWell, tint: Theme.welcomeHeroHeadingBlue)
|
|
|
|
|
- }()
|
|
|
|
|
|
|
+ private let welcomeLogoWell = NSView()
|
|
|
|
|
+ private let welcomeLogoView = IndeedLogoView(displayHeight: 40, variant: .compact)
|
|
|
private let featureCardsRow = NSStackView()
|
|
private let featureCardsRow = NSStackView()
|
|
|
private let clearChatButton = NSButton(title: "Clear chat", target: nil, action: nil)
|
|
private let clearChatButton = NSButton(title: "Clear chat", target: nil, action: nil)
|
|
|
private let chatScrollView = NSScrollView()
|
|
private let chatScrollView = NSScrollView()
|
|
@@ -290,7 +289,18 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
welcomeHeroBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
|
welcomeHeroBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
|
|
welcomeHeroBackgroundView.waveTint = Theme.welcomeHeroWaveTint
|
|
welcomeHeroBackgroundView.waveTint = Theme.welcomeHeroWaveTint
|
|
|
|
|
|
|
|
- let welcomeHeroContent = NSStackView(views: [welcomeSparkleCluster, greetingLabel, subtitleLabel])
|
|
|
|
|
|
|
+ welcomeLogoWell.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
+ welcomeLogoWell.wantsLayer = true
|
|
|
|
|
+ welcomeLogoWell.layer?.backgroundColor = Theme.welcomeHeroIconWell.cgColor
|
|
|
|
|
+ welcomeLogoWell.layer?.cornerRadius = 28
|
|
|
|
|
+ if #available(macOS 11.0, *) {
|
|
|
|
|
+ welcomeLogoWell.layer?.cornerCurve = .continuous
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ welcomeLogoView.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
+ welcomeLogoWell.addSubview(welcomeLogoView)
|
|
|
|
|
+
|
|
|
|
|
+ let welcomeHeroContent = NSStackView(views: [welcomeLogoWell, greetingLabel, subtitleLabel])
|
|
|
welcomeHeroContent.orientation = .vertical
|
|
welcomeHeroContent.orientation = .vertical
|
|
|
welcomeHeroContent.spacing = 8
|
|
welcomeHeroContent.spacing = 8
|
|
|
welcomeHeroContent.alignment = .centerX
|
|
welcomeHeroContent.alignment = .centerX
|
|
@@ -309,7 +319,12 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
welcomeHeroContent.leadingAnchor.constraint(greaterThanOrEqualTo: welcomeHeroHost.leadingAnchor, constant: 16),
|
|
welcomeHeroContent.leadingAnchor.constraint(greaterThanOrEqualTo: welcomeHeroHost.leadingAnchor, constant: 16),
|
|
|
welcomeHeroContent.trailingAnchor.constraint(lessThanOrEqualTo: welcomeHeroHost.trailingAnchor, constant: -16),
|
|
welcomeHeroContent.trailingAnchor.constraint(lessThanOrEqualTo: welcomeHeroHost.trailingAnchor, constant: -16),
|
|
|
welcomeHeroContent.topAnchor.constraint(equalTo: welcomeHeroHost.topAnchor, constant: 4),
|
|
welcomeHeroContent.topAnchor.constraint(equalTo: welcomeHeroHost.topAnchor, constant: 4),
|
|
|
- welcomeHeroContent.bottomAnchor.constraint(equalTo: welcomeHeroHost.bottomAnchor, constant: -2)
|
|
|
|
|
|
|
+ welcomeHeroContent.bottomAnchor.constraint(equalTo: welcomeHeroHost.bottomAnchor, constant: -2),
|
|
|
|
|
+
|
|
|
|
|
+ welcomeLogoWell.widthAnchor.constraint(equalToConstant: 56),
|
|
|
|
|
+ welcomeLogoWell.heightAnchor.constraint(equalToConstant: 56),
|
|
|
|
|
+ welcomeLogoView.centerXAnchor.constraint(equalTo: welcomeLogoWell.centerXAnchor),
|
|
|
|
|
+ welcomeLogoView.centerYAnchor.constraint(equalTo: welcomeLogoWell.centerYAnchor)
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
configureFeatureShortcutCards()
|
|
configureFeatureShortcutCards()
|
|
@@ -2361,11 +2376,11 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
$0.removeFromSuperview()
|
|
$0.removeFromSuperview()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let logo = IndeedLogoView(displayHeight: 26)
|
|
|
|
|
|
|
+ let logo = IndeedLogoView(displayHeight: 34, variant: .compact)
|
|
|
logo.translatesAutoresizingMaskIntoConstraints = false
|
|
logo.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
|
|
|
let brand = NSTextField(labelWithString: AppMarketingLinks.appDisplayName)
|
|
let brand = NSTextField(labelWithString: AppMarketingLinks.appDisplayName)
|
|
|
- brand.font = .systemFont(ofSize: 15, weight: .semibold)
|
|
|
|
|
|
|
+ brand.font = .systemFont(ofSize: 14, weight: .semibold)
|
|
|
brand.textColor = Theme.brandBlue
|
|
brand.textColor = Theme.brandBlue
|
|
|
brand.alignment = .left
|
|
brand.alignment = .left
|
|
|
brand.maximumNumberOfLines = 2
|
|
brand.maximumNumberOfLines = 2
|
|
@@ -3149,58 +3164,6 @@ private final class WelcomeHeroBackgroundView: NSView {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/// Circular pastel well with three sparkle symbols (reference: layered stars of different sizes).
|
|
|
|
|
-private final class WelcomeSparkleClusterView: NSView {
|
|
|
|
|
- private let diameter: CGFloat = 56
|
|
|
|
|
-
|
|
|
|
|
- override var intrinsicContentSize: NSSize {
|
|
|
|
|
- NSSize(width: diameter, height: diameter)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- init(iconWell: NSColor, tint: NSColor) {
|
|
|
|
|
- super.init(frame: .zero)
|
|
|
|
|
- translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
- wantsLayer = true
|
|
|
|
|
- layer?.cornerRadius = diameter / 2
|
|
|
|
|
- if #available(macOS 11.0, *) {
|
|
|
|
|
- layer?.cornerCurve = .continuous
|
|
|
|
|
- }
|
|
|
|
|
- layer?.backgroundColor = iconWell.cgColor
|
|
|
|
|
-
|
|
|
|
|
- let configs: [(CGFloat, NSFont.Weight, CGFloat, CGFloat)] = [
|
|
|
|
|
- (17, .medium, 0, 0),
|
|
|
|
|
- (11, .regular, -11, -9),
|
|
|
|
|
- (9, .regular, 12, 10)
|
|
|
|
|
- ]
|
|
|
|
|
-
|
|
|
|
|
- let symbolName = Self.sparkleSymbolName()
|
|
|
|
|
- for (size, weight, ox, oy) in configs {
|
|
|
|
|
- let iv = NSImageView()
|
|
|
|
|
- iv.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
- iv.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: size, weight: weight)
|
|
|
|
|
- iv.image = NSImage(systemSymbolName: symbolName, accessibilityDescription: nil)
|
|
|
|
|
- iv.contentTintColor = tint
|
|
|
|
|
- addSubview(iv)
|
|
|
|
|
- NSLayoutConstraint.activate([
|
|
|
|
|
- iv.centerXAnchor.constraint(equalTo: centerXAnchor, constant: ox),
|
|
|
|
|
- iv.centerYAnchor.constraint(equalTo: centerYAnchor, constant: oy)
|
|
|
|
|
- ])
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- private static func sparkleSymbolName() -> String {
|
|
|
|
|
- if NSImage(systemSymbolName: "sparkle", accessibilityDescription: nil) != nil {
|
|
|
|
|
- return "sparkle"
|
|
|
|
|
- }
|
|
|
|
|
- return "sparkles"
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @available(*, unavailable)
|
|
|
|
|
- required init?(coder: NSCoder) {
|
|
|
|
|
- fatalError("init(coder:) has not been implemented")
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/// Home welcome row: three tappable shortcuts that seed the main search field (reference: white cards, pastel icon well, arrow at bottom trailing).
|
|
/// Home welcome row: three tappable shortcuts that seed the main search field (reference: white cards, pastel icon well, arrow at bottom trailing).
|
|
|
private final class FeatureShortcutCardView: NSView {
|
|
private final class FeatureShortcutCardView: NSView {
|
|
|
private static let cardCornerRadius: CGFloat = 14
|
|
private static let cardCornerRadius: CGFloat = 14
|