Files
swiftapp/swift/Sources/Core/Design/AvatarView.swift
Jürgen Kunz 2fe6b8a6df WIP: local handoff implementation
Local work on the social.io handoff before merging the claude
worktree branch. Includes the full per-spec Sources/Core/Design
module (8 files), watchOS target under WatchApp/, Live Activity +
widget extension, entitlements, scheme, and asset catalog.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 16:26:38 +02:00

22 lines
636 B
Swift

import SwiftUI
struct AvatarView: View {
let name: String
var color: Color = SIO.tint
var size: CGFloat = 30
var body: some View {
Text(initials)
.font(.system(size: size * 0.42, weight: .semibold, design: .rounded))
.foregroundStyle(.white)
.frame(width: size, height: size)
.background(color, in: Circle())
.overlay(Circle().strokeBorder(.white.opacity(0.16), lineWidth: 1))
}
private var initials: String {
let parts = name.split(separator: " ")
return String(parts.prefix(2).compactMap { $0.first }).uppercased()
}
}