Show profile paths, report the build version, and colour each profile
- Selecting a row in the Profiles tab shows its Claude Desktop and Claude Code dirs inline and selectable, instead of requiring a right-click "Reveal in Finder" to find out where a profile actually lives. - build.sh stamps Contents/Resources/COMMIT with the short HEAD SHA, left empty when HEAD sits exactly on a tag (how a real release is built), since the version number alone is unambiguous there. About appends it when present, so two dev builds off the same VERSION are distinguishable. The update checker still compares plain semver. - Profile dot colours are picked per NSApp.effectiveAppearance at render time: same hue either way, but full saturation with brightness split per background (1.0 dark, 0.55 light), so they read as bold hues rather than washing out on white or muddying against a dark menu.
This commit is contained in:
@@ -18,9 +18,18 @@ enum ProfileColor {
|
||||
return hash
|
||||
}
|
||||
|
||||
// A brightness/saturation pair that reads clearly on its own
|
||||
// background — a color bright enough to pop on a dark menu would wash
|
||||
// out on a light one, and vice versa, so this picks per current
|
||||
// appearance rather than using one fixed value for both.
|
||||
private static func isDarkAppearance() -> Bool {
|
||||
NSApp.effectiveAppearance.bestMatch(from: [.aqua, .darkAqua]) == .darkAqua
|
||||
}
|
||||
|
||||
static func dotColor(for name: String) -> NSColor {
|
||||
let hue = CGFloat(fnv1aHash(name) % 360) / 360.0
|
||||
return NSColor(calibratedHue: hue, saturation: 0.65, brightness: 0.9, alpha: 1.0)
|
||||
let (saturation, brightness): (CGFloat, CGFloat) = isDarkAppearance() ? (0.90, 1.0) : (1.0, 0.55)
|
||||
return NSColor(calibratedHue: hue, saturation: saturation, brightness: brightness, alpha: 1.0)
|
||||
}
|
||||
|
||||
// `dimmed` marks a profile that isn't actually running right now — the
|
||||
|
||||
Reference in New Issue
Block a user