The bundle-ID and display-name renames weren't enough — the actual Xcode target/product name was still "Jarvis", which drives CFBundleName, Xcode's Organizer archive list, the .xcodeproj filename, and the scheme name. Renamed all the way through: - project.yml: top-level name, target key, PRODUCT_NAME, source/info paths - Jarvis/ -> Jervis/ (source folder, git-tracked as renames, no content diffs on the moved files) - .gitignore, CI workflows, README, CONTRIBUTING: Jarvis.xcodeproj / scheme Jarvis -> Jervis.xcodeproj / scheme Jervis Verified: xcodebuild -scheme Jervis succeeds, produces Jervis.app, CFBundleName/CFBundleExecutable/CFBundleDisplayName all read "Jervis". CFBundleIdentifier intentionally stays com.kisani.jarvis (per prior decision — bundle ID isn't user-facing anywhere including Organizer). Swift type names (JarvisApp, JarvisWordmark, etc.) and the Gitea repo name/URL are unchanged — pure internal source identifiers, not user or developer-facing product identity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
61 lines
1.7 KiB
Swift
61 lines
1.7 KiB
Swift
// ConnectionBanner.swift
|
|
// Jarvis — Live / Offline / Reconnecting indicator driven by WebSocketManager.
|
|
|
|
import SwiftUI
|
|
|
|
extension ConnectionState {
|
|
var isLive: Bool {
|
|
if case .connected = self { return true }
|
|
return false
|
|
}
|
|
|
|
var label: String {
|
|
switch self {
|
|
case .connected: return "Live"
|
|
case .connecting: return "Connecting"
|
|
case .reconnecting: return "Reconnecting"
|
|
case .disconnected: return "Offline"
|
|
}
|
|
}
|
|
|
|
var dotColor: Color {
|
|
switch self {
|
|
case .connected: return Color(hex: "33C25E")
|
|
case .connecting,
|
|
.reconnecting: return Palette.healthFailing
|
|
case .disconnected: return Palette.tertiaryText
|
|
}
|
|
}
|
|
}
|
|
|
|
/// Compact Live/Offline pill — a colored dot + state label.
|
|
struct ConnectionBanner: View {
|
|
let state: ConnectionState
|
|
|
|
var body: some View {
|
|
HStack(spacing: 6) {
|
|
Circle()
|
|
.fill(state.dotColor)
|
|
.frame(width: 7, height: 7)
|
|
Text(state.label.uppercased())
|
|
.font(.system(size: 11, weight: .bold))
|
|
.kerning(0.6)
|
|
.foregroundStyle(state.isLive ? Color(hex: "33C25E") : Color(hex: "888888"))
|
|
}
|
|
.padding(.horizontal, 10)
|
|
.padding(.vertical, 5)
|
|
.background(Palette.surface)
|
|
.clipShape(Capsule())
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
VStack(spacing: 12) {
|
|
ConnectionBanner(state: .connected)
|
|
ConnectionBanner(state: .reconnecting(attempt: 2))
|
|
ConnectionBanner(state: .disconnected)
|
|
}
|
|
.padding()
|
|
.background(Palette.background)
|
|
}
|