Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #1697: Update empty wallet copy and styling
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Oct 18, 2019
1 parent d482ffb commit 7106431
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 34 deletions.
5 changes: 2 additions & 3 deletions BraveRewardsUI/Localized Strings/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal extension Strings {
static let AddFundsBody = NSLocalizedString("BraveRewardsAddFundsBody", bundle: Bundle.RewardsUI, value: "Be sure to use the address below that matches the type of crypto you own. It will be converted automatically to BAT by Uphold and appear as an increased balance in your Brave Rewards wallet. Please allow up to one hour for your wallet balance to update.", comment: "")
static let Site = NSLocalizedString("BraveRewardsSite", bundle: Bundle.RewardsUI, value: "Site", comment: "")
static let TotalSites = NSLocalizedString("BraveRewardsTotalSites", bundle: Bundle.RewardsUI, value: "Total %ld", comment: "")
static let EmptyWalletBulletHeader = NSLocalizedString("BraveRewardsEmptyWalletBulletHeader", bundle: Bundle.RewardsUI, value: "3 ways to fill your wallet:", comment: "")
static let EmptyWalletBody = NSLocalizedString("BraveRewardsEmptyWalletBody", bundle: Bundle.RewardsUI, value: "Watch your balance grow as you view privacy preserving ads through Brave.", comment: "")
static let BraveRewards = NSLocalizedString("BraveRewards", bundle: Bundle.RewardsUI, value: "Brave Rewards™", comment: "")
static let PublisherSendTip = NSLocalizedString("BraveRewardsPublisherSendTip", bundle: Bundle.RewardsUI, value: "Send a tip…", comment: "")
static let TippingWalletBalanceTitle = NSLocalizedString("BraveRewardsTippingWalletBalanceTitle", bundle: Bundle.RewardsUI, value: "wallet balance", comment: "")
Expand All @@ -53,7 +53,7 @@ internal extension Strings {
static let MinimumLengthChoices0 = NSLocalizedString("BraveRewardsMinimumLengthChoices0", bundle: Bundle.RewardsUI, value: "5 seconds", comment: "")
static let SettingsAdsTitle = NSLocalizedString("BraveRewardsSettingsAdsTitle", bundle: Bundle.RewardsUI, value: "Ads", comment: "")
static let NotificationRecurringTipTitle = NSLocalizedString("BraveRewardsNotificationRecurringTipTitle", bundle: Bundle.RewardsUI, value: "Recurring tips", comment: "")
static let EmptyWalletTitle = NSLocalizedString("BraveRewardsEmptyWalletTitle", bundle: Bundle.RewardsUI, value: "Sadly, no tokens yet.", comment: "")
static let EmptyWalletTitle = NSLocalizedString("BraveRewardsEmptyWalletTitle", bundle: Bundle.RewardsUI, value: "Your wallet is ready for action.", comment: "")
static let RecurringTipTitle = NSLocalizedString("BraveRewardsRecurringTipTitle", bundle: Bundle.RewardsUI, value: "Recurring tip", comment: "")
static let UnverifiedPublisherDisclaimer = NSLocalizedString("BraveRewardsUnverifiedPublisherDisclaimer", bundle: Bundle.RewardsUI, value: "This creator has not yet signed up to receive contributions from Brave users. Any tips you send will remain in your wallet until they verify.", comment: "")
static let SettingsGrantClaimButtonTitle = NSLocalizedString("BraveRewardsSettingsGrantClaimButtonTitle", bundle: Bundle.RewardsUI, value: "Claim", comment: "")
Expand Down Expand Up @@ -129,7 +129,6 @@ internal extension Strings {
static let Remove = NSLocalizedString("BraveRewardsRemove", bundle: Bundle.RewardsUI, value: "Remove", comment: "")
static let LearnMoreWhyBody = NSLocalizedString("BraveRewardsLearnMoreWhyBody", bundle: Bundle.RewardsUI, value: "With your old browser, you paid to browse the web by viewing ads with your valuable attention. You spent your valuable time downloading invasive ad technology that transmitted your valuable private data to advertisers — without your consent.\n\nToday, Brave welcomes you to the new Internet. One where your time is valued, your personal data is kept private, and you actually get paid for your attention.", comment: "")
static let DisabledEnableButton = NSLocalizedString("BraveRewardsDisabledEnableButton", bundle: Bundle.RewardsUI, value: "Enable Brave Rewards", comment: "")
static let EmptyWalletBulletPoints = NSLocalizedString("BraveRewardsEmptyWalletBulletPoints", bundle: Bundle.RewardsUI, value: "• You can add funds.\n• You can earn tokens from viewing ads.\n• Occasionally, you'll be offered free token grants from Brave. Be sure to keep an eye out for the alert!", comment: "")
static let TippingOverviewBody = NSLocalizedString("BraveRewardsTippingOverviewBody", bundle: Bundle.RewardsUI, value: "You can support this content creator by sending a tip. It’s a way of thanking them for making great content. Verified creators get paid for their tips during the first week of each calendar month.\n\nIf you like, you can schedule monthly tips to support this creator on a continuous basis.", comment: "")
static let TippingSendTip = NSLocalizedString("BraveRewardsTippingSendTip", bundle: Bundle.RewardsUI, value: "Send my Tip", comment: "")
static let TippingSendMonthlyTip = NSLocalizedString("BraveRewardsTippingSendMonthlyTip", bundle: Bundle.RewardsUI, value: "Set monthly tip", comment: "")
Expand Down
41 changes: 10 additions & 31 deletions BraveRewardsUI/Settings/Wallet/WalletDetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,42 +66,21 @@ extension WalletDetailsViewController.View {
let titleLabel = UILabel().then {
$0.text = Strings.EmptyWalletTitle
$0.appearanceTextColor = SettingsUX.bodyTextColor
$0.font = .systemFont(ofSize: 22.0)
$0.font = .systemFont(ofSize: 22.0, weight: .medium)
$0.textAlignment = .center
$0.numberOfLines = 0
}

/// Left-aligned bullet-points stack view
class BulletPointStackView: UIStackView {
override init(frame: CGRect) {
super.init(frame: frame)
axis = .vertical
spacing = 4.0
alignment = .leading

addArrangedSubview(UILabel().then {
$0.font = .systemFont(ofSize: 15.0, weight: .medium)
$0.appearanceTextColor = SettingsUX.subtitleTextColor
$0.text = Strings.EmptyWalletBulletHeader
})
addArrangedSubview(UILabel().then {
$0.font = .systemFont(ofSize: 15.0)
$0.appearanceTextColor = SettingsUX.bodyTextColor
$0.text = Strings.EmptyWalletBulletPoints
$0.numberOfLines = 0
})
}
@available(*, unavailable)
required init(coder: NSCoder) {
fatalError()
}
let textLabel = UILabel().then {
$0.font = .systemFont(ofSize: 15.0, weight: .medium)
$0.appearanceTextColor = SettingsUX.subtitleTextColor
$0.textAlignment = .center
$0.text = Strings.EmptyWalletBody
$0.numberOfLines = 0
}

let bulletPointStackView = BulletPointStackView()

addSubview(imageView)
addSubview(titleLabel)
addSubview(bulletPointStackView)
addSubview(textLabel)

imageView.snp.makeConstraints {
$0.centerX.equalToSuperview()
Expand All @@ -111,10 +90,10 @@ extension WalletDetailsViewController.View {
$0.leading.trailing.equalToSuperview().inset(30.0)
$0.top.equalTo(imageView.snp.bottom).offset(30.0)
}
bulletPointStackView.snp.makeConstraints {
textLabel.snp.makeConstraints {
$0.leading.trailing.equalToSuperview().inset(40.0)
$0.top.equalTo(titleLabel.snp.bottom).offset(30.0)
$0.bottom.equalToSuperview().inset(20.0)
$0.bottom.equalToSuperview().inset(40.0)
}
}
}
Expand Down

0 comments on commit 7106431

Please sign in to comment.