nvrsion: Add stripe to EXPERIMENTAL Pill Colors in BuildBanner to apply only to the line with build type, hash, and experimental pill.
Nucleic-Promote: 1 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -83,12 +83,12 @@ struct BuildInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Header strip warning that this is a non-release build — the same channel colors, icons,
|
/// Header warning that this is a non-release build — the same channel colors, icons, and copy
|
||||||
/// and copy as the Mac's `BuildBanner`. The strip stays untinted; the channel color rides on
|
/// as the Mac's `BuildBanner`. A channel-colored stripe — red for local builds, canary-yellow
|
||||||
/// the all-caps "EXPERIMENTAL" pill instead: red for local builds, canary-yellow for canary,
|
/// for canary, blue for beta, gold for a release candidate — hugs just the one row it labels
|
||||||
/// blue for beta, gold for a release candidate. The leading edge names the channel; the build
|
/// (channel name, build label, and an all-caps "EXPERIMENTAL" pill), pinned to the leading
|
||||||
/// label and the pill sit on the trailing edge. Renders nothing for a shipping App Store
|
/// edge rather than bleeding across the full window header. Renders nothing for a shipping App
|
||||||
/// release.
|
/// Store release.
|
||||||
struct BuildBanner: View {
|
struct BuildBanner: View {
|
||||||
var info: BuildInfo = .current
|
var info: BuildInfo = .current
|
||||||
|
|
||||||
@@ -100,22 +100,26 @@ struct BuildBanner: View {
|
|||||||
Text(style.label)
|
Text(style.label)
|
||||||
.font(.footnote.weight(.semibold))
|
.font(.footnote.weight(.semibold))
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
Spacer(minLength: 12)
|
|
||||||
Text(info.buildLabel)
|
Text(info.buildLabel)
|
||||||
.font(.caption.monospaced())
|
.font(.caption.monospaced())
|
||||||
.opacity(0.85)
|
.opacity(0.85)
|
||||||
Text("EXPERIMENTAL")
|
Text("EXPERIMENTAL")
|
||||||
.font(.caption2.weight(.heavy))
|
.font(.caption2.weight(.heavy))
|
||||||
.tracking(0.9)
|
.tracking(0.9)
|
||||||
.foregroundStyle(.white)
|
|
||||||
.padding(.horizontal, 6)
|
.padding(.horizontal, 6)
|
||||||
.padding(.vertical, 2)
|
.padding(.vertical, 2)
|
||||||
.background(style.tint, in: .capsule)
|
.background(.white.opacity(0.16), in: .capsule)
|
||||||
}
|
}
|
||||||
.foregroundStyle(.primary)
|
.foregroundStyle(.white.opacity(0.92))
|
||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
.padding(.vertical, 5)
|
.padding(.vertical, 5)
|
||||||
.frame(maxWidth: .infinity)
|
// The channel-colored stripe wraps only this row of content — channel name, build
|
||||||
|
// label, and the EXPERIMENTAL pill — instead of bleeding across the full window
|
||||||
|
// header, then sits at the leading edge with a little breathing room around it.
|
||||||
|
.background(style.tint.opacity(0.9), in: .rect(cornerRadius: 8))
|
||||||
|
.padding(.horizontal, 12)
|
||||||
|
.padding(.vertical, 4)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.accessibilityLabel(style.tooltip(version: info.version, build: info.buildLabel))
|
.accessibilityLabel(style.tooltip(version: info.version, build: info.buildLabel))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user