Files
multica/apps/ios/Multica/Views/Components/AssigneeAvatar.swift
Jiayuan 31c2476a7b feat(ios): add MVP iOS app with issue management and agent log viewing
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
2026-04-02 23:50:28 +08:00

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()
}
}