feat(android): improve profile avatar parity
This commit is contained in:
@@ -35,9 +35,15 @@ struct UserProfileView: View {
|
||||
.fill(AppColors.brandSoft)
|
||||
.frame(width: 110, height: 110)
|
||||
.overlay {
|
||||
Text(initials)
|
||||
.font(.system(size: 32, weight: .bold))
|
||||
.foregroundStyle(AppColors.primary)
|
||||
if let imageSource = resolvedProfilePicture {
|
||||
AsyncStoreImage(imageURL: imageSource)
|
||||
.frame(width: 104, height: 104)
|
||||
.clipShape(Circle())
|
||||
} else {
|
||||
Text(initials)
|
||||
.font(.system(size: 32, weight: .bold))
|
||||
.foregroundStyle(AppColors.primary)
|
||||
}
|
||||
}
|
||||
|
||||
Button("Remover") {
|
||||
@@ -66,6 +72,13 @@ struct UserProfileView: View {
|
||||
}
|
||||
}
|
||||
.appNoAutoCap()
|
||||
|
||||
textFieldSection(
|
||||
title: "Foto (URL/Base64)",
|
||||
placeholder: "https://... ou data:image/jpeg;base64,...",
|
||||
text: $profilePicture
|
||||
)
|
||||
.appNoAutoCap()
|
||||
}
|
||||
.padding(16)
|
||||
.background(AppColors.surface)
|
||||
@@ -95,6 +108,12 @@ struct UserProfileView: View {
|
||||
return letters.isEmpty ? "PF" : letters.uppercased()
|
||||
}
|
||||
|
||||
private var resolvedProfilePicture: String? {
|
||||
let trimmed = profilePicture.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
guard trimmed.isEmpty == false else { return nil }
|
||||
return ImageSourceResolver.resolve(trimmed)
|
||||
}
|
||||
|
||||
private var canSave: Bool {
|
||||
let cleanName = name.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let cleanEmail = email.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
|
||||
@@ -323,3 +323,7 @@ Legenda:
|
||||
- `SnackbarOverlay` Android passou a renderizar o banner visual e reagir a mudanças de estado.
|
||||
- `swift build` validado com sucesso após a alteração.
|
||||
- A validação `skip export` desta rodada ficou bloqueada por erro pré-existente em `Vendor/skip-fuse-ui` (`onGeometryChangeErased`) e em código gerado `SkipUI`, sem relação direta com a task de snackbar.
|
||||
7. Ajuste incremental de paridade no perfil Android concluído.
|
||||
- `UserProfileView+Android` agora mostra preview de avatar quando `profilePicture` está preenchido.
|
||||
- Campo de edição de foto por URL/Base64 adicionado apenas no Android.
|
||||
- `swift build` validado com sucesso após o ajuste.
|
||||
|
||||
Reference in New Issue
Block a user