Skip to content

Commit

Permalink
feat: Update spacings
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinperignon committed Sep 11, 2024
1 parent 0ae6d4f commit 350ed05
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Mail/Views/Switch User/AccountActionsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct AccountActionsView: View {
}

var body: some View {
VStack(alignment: .leading, spacing: 0) {
VStack(spacing: 0) {
ForEach(actions) { action in
Button {
handleAction(action)
Expand Down
4 changes: 3 additions & 1 deletion Mail/Views/Switch User/AccountCellView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct AccountHeaderCell: View {
var body: some View {
HStack {
AvatarView(mailboxManager: mailboxManager, contactConfiguration: .user(user: account.user), size: 40)

VStack(alignment: .leading, spacing: 0) {
Text(account.user.displayName)
.textStyle(.bodyMedium)
Expand All @@ -87,7 +88,8 @@ struct AccountHeaderCell: View {
switch type {
case .switchAccount:
if isSelected {
IKIcon(MailResourcesAsset.check)
MailResourcesAsset.check.swiftUIImage
.iconSize(.medium)
.foregroundStyle(.tint)
}
case .selectComposeMailbox:
Expand Down
29 changes: 19 additions & 10 deletions Mail/Views/Switch User/AccountListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,28 @@ struct AccountListView: View {

var body: some View {
ScrollView {
Text(MailResourcesStrings.Localizable.titleMyAccount(viewModel.accounts.count))
.textStyle(.bodyMedium)

VStack(spacing: IKPadding.small) {
ForEach(Array(viewModel.accounts.keys)) { account in
AccountCellView(selectedUserId: $viewModel.selectedUserId, mailboxManager: mailboxManager, account: account)
VStack(spacing: 0) {
Text(MailResourcesStrings.Localizable.titleMyAccount(viewModel.accounts.count))
.textStyle(.bodyMedium)
.padding(.bottom, value: .medium)

VStack(spacing: IKPadding.extraSmall) {
ForEach(Array(viewModel.accounts.keys)) { account in
AccountCellView(
selectedUserId: $viewModel.selectedUserId,
mailboxManager: mailboxManager,
account: account
)
.padding(.horizontal, value: .medium)
}
}
}
.padding(.horizontal, value: .medium)

IKDivider()
IKDivider()
.padding(.vertical, value: .small)

AccountActionsView()
AccountActionsView()
.padding(.horizontal, value: .small)
}
}
.fullScreenCover(isPresented: $isShowingNewAccountView, onDismiss: {
orientationManager.setOrientationLock(.all)
Expand Down

0 comments on commit 350ed05

Please sign in to comment.