mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-23 10:08:38 +02:00
SwiftUI app (iOS 17+) with zero third-party dependencies: - Passwordless email authentication with Keychain token storage - Workspace selection and multi-workspace support - Issue list grouped by status with search and filtering - Issue detail with inline status/priority/assignee editing - Comments with threaded display and compose - Agent task runs history and real-time execution log streaming - WebSocket integration for live updates
34 lines
958 B
Swift
34 lines
958 B
Swift
import SwiftUI
|
|
|
|
struct AssigneeAvatar: View {
|
|
let type: String?
|
|
let name: String
|
|
var size: CGFloat = 24
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
Circle()
|
|
.fill(type == "agent" ? Color.purple.opacity(0.2) : Color.gray.opacity(0.2))
|
|
.frame(width: size, height: size)
|
|
|
|
if type == "agent" {
|
|
Image(systemName: "cpu")
|
|
.font(.system(size: size * 0.5))
|
|
.foregroundStyle(.purple)
|
|
} else {
|
|
Text(initials)
|
|
.font(.system(size: size * 0.4, weight: .medium))
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
}
|
|
}
|
|
|
|
private var initials: String {
|
|
let parts = name.split(separator: " ")
|
|
if parts.count >= 2 {
|
|
return "\(parts[0].prefix(1))\(parts[1].prefix(1))".uppercased()
|
|
}
|
|
return String(name.prefix(2)).uppercased()
|
|
}
|
|
}
|