|
|
@@ -17,7 +17,6 @@ final class DashboardView: NSView {
|
|
17
|
17
|
static let primaryText = NSColor(calibratedWhite: 0.96, alpha: 1)
|
|
18
|
18
|
static let secondaryText = NSColor(calibratedWhite: 0.62, alpha: 1)
|
|
19
|
19
|
static let tertiaryText = NSColor(calibratedWhite: 0.48, alpha: 1)
|
|
20
|
|
- static let linkText = NSColor(calibratedWhite: 0.82, alpha: 1)
|
|
21
|
20
|
}
|
|
22
|
21
|
|
|
23
|
22
|
private let contentStack = NSStackView()
|
|
|
@@ -31,7 +30,6 @@ final class DashboardView: NSView {
|
|
31
|
30
|
private let insightsCard = NSView()
|
|
32
|
31
|
private let insightsTitleLabel = NSTextField(labelWithString: "")
|
|
33
|
32
|
private let insightsBodyLabel = NSTextField(labelWithString: "")
|
|
34
|
|
- private let insightsLinkButton = NSButton(title: "", target: nil, action: nil)
|
|
35
|
33
|
private let togglesLabel = NSTextField(labelWithString: "Show:")
|
|
36
|
34
|
private let savedToggleButton = NSButton(title: "Saved", target: nil, action: nil)
|
|
37
|
35
|
private let interviewsToggleButton = NSButton(title: "Interviews", target: nil, action: nil)
|
|
|
@@ -58,7 +56,6 @@ final class DashboardView: NSView {
|
|
58
|
56
|
subtitleLabel.stringValue = data.subtitle
|
|
59
|
57
|
insightsTitleLabel.stringValue = data.profileInsightsTitle
|
|
60
|
58
|
insightsBodyLabel.stringValue = data.profileInsightsBody
|
|
61
|
|
- insightsLinkButton.title = data.profileInsightsLinkTitle
|
|
62
|
59
|
configureSidebar(data.sidebarItems)
|
|
63
|
60
|
updateDocumentLayout()
|
|
64
|
61
|
}
|
|
|
@@ -135,11 +132,6 @@ final class DashboardView: NSView {
|
|
135
|
132
|
titleBlock.spacing = 10
|
|
136
|
133
|
titleBlock.alignment = .centerX
|
|
137
|
134
|
|
|
138
|
|
- let headerStack = NSStackView(views: [titleBlock, insightsLinkButton])
|
|
139
|
|
- headerStack.orientation = .vertical
|
|
140
|
|
- headerStack.spacing = 18
|
|
141
|
|
- headerStack.alignment = .centerX
|
|
142
|
|
-
|
|
143
|
135
|
let midSpacer = NSView()
|
|
144
|
136
|
midSpacer.translatesAutoresizingMaskIntoConstraints = false
|
|
145
|
137
|
midSpacer.heightAnchor.constraint(equalToConstant: 20).isActive = true
|
|
|
@@ -150,7 +142,7 @@ final class DashboardView: NSView {
|
|
150
|
142
|
overlayBottomSpacer.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
|
151
|
143
|
|
|
152
|
144
|
mainOverlay.addArrangedSubview(topInset)
|
|
153
|
|
- mainOverlay.addArrangedSubview(headerStack)
|
|
|
145
|
+ mainOverlay.addArrangedSubview(titleBlock)
|
|
154
|
146
|
mainOverlay.addArrangedSubview(midSpacer)
|
|
155
|
147
|
mainOverlay.addArrangedSubview(insightsCard)
|
|
156
|
148
|
mainOverlay.addArrangedSubview(overlayBottomSpacer)
|
|
|
@@ -192,8 +184,6 @@ final class DashboardView: NSView {
|
|
192
|
184
|
greetingLabel.trailingAnchor.constraint(equalTo: mainOverlay.trailingAnchor, constant: -24),
|
|
193
|
185
|
subtitleLabel.leadingAnchor.constraint(equalTo: greetingLabel.leadingAnchor),
|
|
194
|
186
|
subtitleLabel.trailingAnchor.constraint(equalTo: greetingLabel.trailingAnchor),
|
|
195
|
|
- insightsLinkButton.leadingAnchor.constraint(equalTo: greetingLabel.leadingAnchor),
|
|
196
|
|
- insightsLinkButton.trailingAnchor.constraint(equalTo: greetingLabel.trailingAnchor),
|
|
197
|
187
|
|
|
198
|
188
|
sparkleView.trailingAnchor.constraint(equalTo: mainHost.trailingAnchor, constant: -28),
|
|
199
|
189
|
sparkleView.bottomAnchor.constraint(equalTo: mainHost.bottomAnchor, constant: -28)
|
|
|
@@ -218,12 +208,6 @@ final class DashboardView: NSView {
|
|
218
|
208
|
insightsBodyLabel.lineBreakMode = .byWordWrapping
|
|
219
|
209
|
insightsBodyLabel.preferredMaxLayoutWidth = 400
|
|
220
|
210
|
|
|
221
|
|
- insightsLinkButton.bezelStyle = .inline
|
|
222
|
|
- insightsLinkButton.isBordered = false
|
|
223
|
|
- insightsLinkButton.font = .systemFont(ofSize: 13, weight: .medium)
|
|
224
|
|
- insightsLinkButton.contentTintColor = Theme.linkText
|
|
225
|
|
- insightsLinkButton.setButtonType(.momentaryPushIn)
|
|
226
|
|
-
|
|
227
|
211
|
togglesLabel.font = .systemFont(ofSize: 12, weight: .medium)
|
|
228
|
212
|
togglesLabel.textColor = Theme.tertiaryText
|
|
229
|
213
|
togglesLabel.alignment = .center
|