-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #673 from Infomaniak/add-recipient
refactor: Update autocompletion unknown recipient view
- Loading branch information
Showing
7 changed files
with
148 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
Infomaniak Mail - iOS App | ||
Copyright (C) 2022 Infomaniak Network SA | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import MailCore | ||
import SwiftUI | ||
import MailResources | ||
|
||
struct AddRecipientCell: View { | ||
@AppStorage(UserDefaults.shared.key(.accentColor)) private var accentColor = DefaultPreferences.accentColor | ||
|
||
let recipientEmail: String | ||
|
||
var body: some View { | ||
HStack(spacing: 8) { | ||
Circle() | ||
.fill(accentColor.primary.swiftUIColor) | ||
.frame(width: 40, height: 40) | ||
.overlay { | ||
MailResourcesAsset.userBold.swiftUIImage | ||
.resizable() | ||
.foregroundColor(accentColor.onAccent.swiftUIColor) | ||
.frame(width: 24, height: 24) | ||
} | ||
|
||
VStack(alignment: .leading, spacing: 0) { | ||
Text(MailResourcesStrings.Localizable.addUnknownRecipientTitle) | ||
.textStyle(.bodyMedium) | ||
Text(recipientEmail) | ||
.textStyle(.bodySecondary) | ||
} | ||
|
||
Spacer() | ||
} | ||
.lineLimit(1) | ||
} | ||
} | ||
|
||
struct AddRecipientCell_Previews: PreviewProvider { | ||
static var previews: some View { | ||
AddRecipientCell(recipientEmail: "") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
MailResources/Assets.xcassets/user-bold.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "user-bold.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true, | ||
"template-rendering-intent" : "template" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
MailResources/Assets.xcassets/user-bold.imageset/user-bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.