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

Greetings5.0 content #386

Merged
merged 3 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -1103,6 +1103,18 @@ extension String {
static let copyWalletAddress = "COPY_WALLET_ADDRESS"
static let updatedToWalletGreetingsTitle = "UPDATED_TO_WALLET_GREETINGS_TITLE"
static let updatedToWalletGreetingsSubtitle = "UPDATED_TO_WALLET_GREETINGS_SUBTITLE"

// Intro to v 5.0.0 screen
static let introSwitcherTitle = "INTRO_SWITCHER_TITLE"
static let introBalanceTitle = "INTRO_BALANCE_TITLE"
static let introCollectiblesTitle = "INTRO_COLLECTIBLES_TITLE"
static let introMessagesTitle = "INTRO_MESSAGES_TITLE"

static let introSwitcherBody = "INTRO_SWITCHER_BODY"
static let introBalanceBody = "INTRO_BALANCE_BODY"
static let introCollectiblesBody = "INTRO_COLLECTIBLES_BODY"
static let introMessagesBody = "INTRO_MESSAGES_BODY"

}

enum BlockChainIcons: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private extension UpdateToWalletGreetingsView {
HStack(spacing: 16) {
hint.icon
.resizable()
.squareFrame(24)
.squareFrame(40)
.foregroundStyle(hint.iconTint)
.padding(EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the mockups the icon's size is 24 pt and there's 8pt padding to each side. It is better to export image in Figma without padding and keep code as it was.

VStack(alignment: .leading, spacing: 0) {
Expand Down Expand Up @@ -103,35 +103,66 @@ private extension UpdateToWalletGreetingsView {
// MARK: - Private methods
private extension UpdateToWalletGreetingsView {
enum GreetingHint: CaseIterable {
case wallet
case switcher
case balance
case collectibles
case messages

var icon: Image {
switch self {
case .wallet:
return .appleIcon
case .switcher:
return .switcherIcon
case .balance:
return .balanceIcon
case .collectibles:
return .collectiblesIcon
case .messages:
return .messagesIcon
}
}

var iconTint: Color {
switch self {
case .wallet:
return .pink
case .switcher, .balance, .collectibles, .messages:
return .orange
}
}

var title: String {
switch self {
case .wallet:
return "Heading"
case .switcher:
return String.Constants.introSwitcherTitle.localized()
case .balance:
return String.Constants.introBalanceTitle.localized()
case .collectibles:
return String.Constants.introCollectiblesTitle.localized()
case .messages:
return String.Constants.introMessagesTitle.localized()
}
}

var subtitle: String {
switch self {
case .wallet:
return "Subheading"
case .switcher:
return String.Constants.introSwitcherBody.localized()
case .balance:
return String.Constants.introBalanceBody.localized()
case .collectibles:
return String.Constants.introCollectiblesBody.localized()
case .messages:
return String.Constants.introMessagesBody.localized()
}
}

static let introSwitcherTitle = "INTRO_SWITCHER_TITLE"
static let introBalanceTitle = "INTRO_BALANCE_TITLE"
static let introCollectiblesTitle = "INTRO_COLLECTIBLES_TITLE"
static let introMessagesTitle = "INTRO_MESSAGES_TITLE"

static let introSwitcherBody = "INTRO_SWITCHER_BODY"
static let introBalanceBody = "INTRO_BALANCE_BODY"
static let introCollectiblesBody = "INTRO_COLLECTIBLES_BODY"
static let introMessagesBody = "INTRO_MESSAGES_BODY"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of String.Constants?

}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "balanceIcon.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "collectiblesIcon.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "messagesIcon.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "icon.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,16 @@
"UPDATING" = "Updating";
"TRANSFERRING" = "Transferring";
"COPY_WALLET_ADDRESS" = "Copy wallet address";
"UPDATED_TO_WALLET_GREETINGS_TITLE" = "Unstoppable App 5.0";
"UPDATED_TO_WALLET_GREETINGS_SUBTITLE" = "What’s new?";

"UPDATED_TO_WALLET_GREETINGS_TITLE" = "Introducing the";
"UPDATED_TO_WALLET_GREETINGS_SUBTITLE" = "New Home Screen";

"INTRO_SWITCHER_TITLE" = "New domains switcher";
"INTRO_BALANCE_TITLE" = "Wallet total balance";
"INTRO_COLLECTIBLES_TITLE" = "Your NFTs in the collectibles tab";
"INTRO_MESSAGES_TITLE" = "New place for messages";

"INTRO_SWITCHER_BODY" = "Seamlessly toggle between your domains.";
"INTRO_BALANCE_BODY" = "Monitor your cryptocurrency holdings with real-time updates for ETH, MATIC, and others to be added soon.";
"INTRO_COLLECTIBLES_BODY" = "Keep an eye on your NFT collection and stay updated with market prices.";
"INTRO_MESSAGES_BODY" = "Messages now have a dedicated tab.
More tabs are coming in the next updates.";
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,10 @@ extension Image {

static let systemDocOnDoc = Image(systemName: "doc.on.doc")
static let systemAppBadgeCheckmark = Image(systemName: "app.badge.checkmark")

static let switcherIcon = Image("switcherIcon")
static let balanceIcon = Image("balanceIcon")
static let collectiblesIcon = Image("collectiblesIcon")
static let messagesIcon = Image("messagesIcon")

}