Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-3536] Persona login flow UI adjustments #1212

Merged
merged 5 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ extension AttributedString {
return
}

self = attributed.replacingAttributes(.emphasized, with: .foregroundColor(emphasizedColor))
let replacement = AttributeContainer.foregroundColor(emphasizedColor)
self = attributed
.replacingAttributes(.emphasized, with: replacement)
.replacingAttributes(.stronglyEmphasized, with: replacement)
}
}

extension AttributeContainer {
public static let emphasized: AttributeContainer = intent(.emphasized)
public static let stronglyEmphasized: AttributeContainer = intent(.stronglyEmphasized)

public static func intent(_ intent: InlinePresentationIntent) -> AttributeContainer {
var result = AttributeContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,38 @@ extension AccountPermission {
observe: AccountPermission.ViewState.init,
send: { .view($0) }
) { viewStore in
ScrollView {
VStack(spacing: .medium2) {
DappHeader(
thumbnail: viewStore.thumbnail,
title: viewStore.title,
subtitle: viewStore.subtitle
)
GeometryReader { geometry in
ScrollView {
VStack(spacing: .medium2) {
DappHeader(
thumbnail: viewStore.thumbnail,
title: viewStore.title,
subtitle: viewStore.subtitle
)

DappPermissionBox {
Text(viewStore.numberOfAccounts)
.foregroundColor(.app.gray1)
DappPermissionBox {
Text(viewStore.numberOfAccounts)
.foregroundColor(.app.gray1)
.textStyle(.body1Regular)
.padding(.medium1)
}
.padding(.horizontal, .medium2)

Spacer()

Text(L10n.DAppRequest.AccountPermission.updateInSettingsExplanation)
.foregroundColor(.app.gray2)
.textStyle(.body1Regular)
.padding(.medium1)
}
.padding(.horizontal, .medium2)
.multilineTextAlignment(.center)
.padding(.horizontal, .medium2)

Text(L10n.DAppRequest.AccountPermission.updateInSettingsExplanation)
.foregroundColor(.app.gray2)
.textStyle(.body1Regular)
.multilineTextAlignment(.center)
.padding(.horizontal, .medium2)
Spacer()
}
.padding(.horizontal, .medium1)
.padding(.bottom, .medium2)
.frame(minHeight: geometry.size.height)
}
.padding(.horizontal, .medium1)
.padding(.bottom, .medium2)
.frame(width: geometry.size.width)
}
.footer {
Button(L10n.DAppRequest.AccountPermission.continue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,36 @@ extension PersonaRow {
var body: some SwiftUI.View {
Button(action: action) {
VStack(alignment: .leading, spacing: .zero) {
ZStack {
HStack(alignment: .center) {
Circle()
.strokeBorder(Color.app.gray3, lineWidth: 1)
.background(Circle().fill(Color.app.gray4))
.frame(.small)
.padding(.trailing, .small1)
HStack(alignment: .center, spacing: .zero) {
Image(.persona)
.resizable()
.frame(.small)

VStack(alignment: .leading, spacing: 4) {
Text(viewState.name)
.foregroundColor(.app.gray1)
.textStyle(.secondaryHeader)
}
Text(viewState.name)
.foregroundColor(.app.gray1)
.textStyle(.secondaryHeader)
.padding(.leading, .medium3)

Spacer()
}
Spacer()

HStack {
Spacer()
RadioButton(
appearance: .dark,
state: isSelected ? .selected : .unselected
)
}
RadioButton(
appearance: .dark,
state: isSelected ? .selected : .unselected
)