|
|
@@ -97,9 +97,8 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
97
|
97
|
private let findJobsCTAHost = NSView()
|
|
98
|
98
|
private let welcomeHeroHost = NSView()
|
|
99
|
99
|
private let welcomeHeroBackgroundView = WelcomeHeroBackgroundView()
|
|
100
|
|
- private lazy var welcomeSparkleCluster: WelcomeSparkleClusterView = {
|
|
101
|
|
- WelcomeSparkleClusterView(iconWell: Theme.welcomeHeroIconWell, tint: Theme.welcomeHeroHeadingBlue)
|
|
102
|
|
- }()
|
|
|
100
|
+ private let welcomeLogoWell = NSView()
|
|
|
101
|
+ private let welcomeLogoView = IndeedLogoView(displayHeight: 40, variant: .compact)
|
|
103
|
102
|
private let featureCardsRow = NSStackView()
|
|
104
|
103
|
private let clearChatButton = NSButton(title: "Clear chat", target: nil, action: nil)
|
|
105
|
104
|
private let chatScrollView = NSScrollView()
|
|
|
@@ -290,7 +289,18 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
290
|
289
|
welcomeHeroBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
|
291
|
290
|
welcomeHeroBackgroundView.waveTint = Theme.welcomeHeroWaveTint
|
|
292
|
291
|
|
|
293
|
|
- let welcomeHeroContent = NSStackView(views: [welcomeSparkleCluster, greetingLabel, subtitleLabel])
|
|
|
292
|
+ welcomeLogoWell.translatesAutoresizingMaskIntoConstraints = false
|
|
|
293
|
+ welcomeLogoWell.wantsLayer = true
|
|
|
294
|
+ welcomeLogoWell.layer?.backgroundColor = Theme.welcomeHeroIconWell.cgColor
|
|
|
295
|
+ welcomeLogoWell.layer?.cornerRadius = 28
|
|
|
296
|
+ if #available(macOS 11.0, *) {
|
|
|
297
|
+ welcomeLogoWell.layer?.cornerCurve = .continuous
|
|
|
298
|
+ }
|
|
|
299
|
+
|
|
|
300
|
+ welcomeLogoView.translatesAutoresizingMaskIntoConstraints = false
|
|
|
301
|
+ welcomeLogoWell.addSubview(welcomeLogoView)
|
|
|
302
|
+
|
|
|
303
|
+ let welcomeHeroContent = NSStackView(views: [welcomeLogoWell, greetingLabel, subtitleLabel])
|
|
294
|
304
|
welcomeHeroContent.orientation = .vertical
|
|
295
|
305
|
welcomeHeroContent.spacing = 8
|
|
296
|
306
|
welcomeHeroContent.alignment = .centerX
|
|
|
@@ -309,7 +319,12 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
309
|
319
|
welcomeHeroContent.leadingAnchor.constraint(greaterThanOrEqualTo: welcomeHeroHost.leadingAnchor, constant: 16),
|
|
310
|
320
|
welcomeHeroContent.trailingAnchor.constraint(lessThanOrEqualTo: welcomeHeroHost.trailingAnchor, constant: -16),
|
|
311
|
321
|
welcomeHeroContent.topAnchor.constraint(equalTo: welcomeHeroHost.topAnchor, constant: 4),
|
|
312
|
|
- welcomeHeroContent.bottomAnchor.constraint(equalTo: welcomeHeroHost.bottomAnchor, constant: -2)
|
|
|
322
|
+ welcomeHeroContent.bottomAnchor.constraint(equalTo: welcomeHeroHost.bottomAnchor, constant: -2),
|
|
|
323
|
+
|
|
|
324
|
+ welcomeLogoWell.widthAnchor.constraint(equalToConstant: 56),
|
|
|
325
|
+ welcomeLogoWell.heightAnchor.constraint(equalToConstant: 56),
|
|
|
326
|
+ welcomeLogoView.centerXAnchor.constraint(equalTo: welcomeLogoWell.centerXAnchor),
|
|
|
327
|
+ welcomeLogoView.centerYAnchor.constraint(equalTo: welcomeLogoWell.centerYAnchor)
|
|
313
|
328
|
])
|
|
314
|
329
|
|
|
315
|
330
|
configureFeatureShortcutCards()
|
|
|
@@ -2361,11 +2376,11 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
2361
|
2376
|
$0.removeFromSuperview()
|
|
2362
|
2377
|
}
|
|
2363
|
2378
|
|
|
2364
|
|
- let logo = IndeedLogoView(displayHeight: 26)
|
|
|
2379
|
+ let logo = IndeedLogoView(displayHeight: 34, variant: .compact)
|
|
2365
|
2380
|
logo.translatesAutoresizingMaskIntoConstraints = false
|
|
2366
|
2381
|
|
|
2367
|
2382
|
let brand = NSTextField(labelWithString: AppMarketingLinks.appDisplayName)
|
|
2368
|
|
- brand.font = .systemFont(ofSize: 15, weight: .semibold)
|
|
|
2383
|
+ brand.font = .systemFont(ofSize: 14, weight: .semibold)
|
|
2369
|
2384
|
brand.textColor = Theme.brandBlue
|
|
2370
|
2385
|
brand.alignment = .left
|
|
2371
|
2386
|
brand.maximumNumberOfLines = 2
|
|
|
@@ -3149,58 +3164,6 @@ private final class WelcomeHeroBackgroundView: NSView {
|
|
3149
|
3164
|
}
|
|
3150
|
3165
|
}
|
|
3151
|
3166
|
|
|
3152
|
|
-/// Circular pastel well with three sparkle symbols (reference: layered stars of different sizes).
|
|
3153
|
|
-private final class WelcomeSparkleClusterView: NSView {
|
|
3154
|
|
- private let diameter: CGFloat = 56
|
|
3155
|
|
-
|
|
3156
|
|
- override var intrinsicContentSize: NSSize {
|
|
3157
|
|
- NSSize(width: diameter, height: diameter)
|
|
3158
|
|
- }
|
|
3159
|
|
-
|
|
3160
|
|
- init(iconWell: NSColor, tint: NSColor) {
|
|
3161
|
|
- super.init(frame: .zero)
|
|
3162
|
|
- translatesAutoresizingMaskIntoConstraints = false
|
|
3163
|
|
- wantsLayer = true
|
|
3164
|
|
- layer?.cornerRadius = diameter / 2
|
|
3165
|
|
- if #available(macOS 11.0, *) {
|
|
3166
|
|
- layer?.cornerCurve = .continuous
|
|
3167
|
|
- }
|
|
3168
|
|
- layer?.backgroundColor = iconWell.cgColor
|
|
3169
|
|
-
|
|
3170
|
|
- let configs: [(CGFloat, NSFont.Weight, CGFloat, CGFloat)] = [
|
|
3171
|
|
- (17, .medium, 0, 0),
|
|
3172
|
|
- (11, .regular, -11, -9),
|
|
3173
|
|
- (9, .regular, 12, 10)
|
|
3174
|
|
- ]
|
|
3175
|
|
-
|
|
3176
|
|
- let symbolName = Self.sparkleSymbolName()
|
|
3177
|
|
- for (size, weight, ox, oy) in configs {
|
|
3178
|
|
- let iv = NSImageView()
|
|
3179
|
|
- iv.translatesAutoresizingMaskIntoConstraints = false
|
|
3180
|
|
- iv.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: size, weight: weight)
|
|
3181
|
|
- iv.image = NSImage(systemSymbolName: symbolName, accessibilityDescription: nil)
|
|
3182
|
|
- iv.contentTintColor = tint
|
|
3183
|
|
- addSubview(iv)
|
|
3184
|
|
- NSLayoutConstraint.activate([
|
|
3185
|
|
- iv.centerXAnchor.constraint(equalTo: centerXAnchor, constant: ox),
|
|
3186
|
|
- iv.centerYAnchor.constraint(equalTo: centerYAnchor, constant: oy)
|
|
3187
|
|
- ])
|
|
3188
|
|
- }
|
|
3189
|
|
- }
|
|
3190
|
|
-
|
|
3191
|
|
- private static func sparkleSymbolName() -> String {
|
|
3192
|
|
- if NSImage(systemSymbolName: "sparkle", accessibilityDescription: nil) != nil {
|
|
3193
|
|
- return "sparkle"
|
|
3194
|
|
- }
|
|
3195
|
|
- return "sparkles"
|
|
3196
|
|
- }
|
|
3197
|
|
-
|
|
3198
|
|
- @available(*, unavailable)
|
|
3199
|
|
- required init?(coder: NSCoder) {
|
|
3200
|
|
- fatalError("init(coder:) has not been implemented")
|
|
3201
|
|
- }
|
|
3202
|
|
-}
|
|
3203
|
|
-
|
|
3204
|
3167
|
/// Home welcome row: three tappable shortcuts that seed the main search field (reference: white cards, pastel icon well, arrow at bottom trailing).
|
|
3205
|
3168
|
private final class FeatureShortcutCardView: NSView {
|
|
3206
|
3169
|
private static let cardCornerRadius: CGFloat = 14
|