hide-balances

- New dependency broadcasting value of hide balances flag implemented
- Every Zatoshi representation decides whether is rendered as number value or hidden, respects the font size and colour
- Flag value is persisted for next app start

hide-balances

- localization added

hide-balances

- changes according to the final design

[#1232] Be able to hide my balances

- finalized

[#1232] Be able to hide my balances

- changelog updated

[#1232] Be able to hide my balances

- regenerated strings
This commit is contained in:
Lukas Korba 2024-04-17 08:22:29 +02:00
parent 98f79f17f3
commit eaf0a6322c
9 changed files with 40 additions and 11 deletions

View File

@ -9,6 +9,7 @@ directly impact users rather than highlighting other crucial architectural updat
### Added
- Dark mode.
- Scan QR code from an image stored in the library.
- Hide the balances with an eye icon on the Account or Balances tabs.
### Changed
- The confirmation button at recovery phrase screen changed its name from "I got it" to "I've saved it".

View File

@ -177,9 +177,11 @@ public struct TabsView: View {
areBalancesHidden = prevValue
hideBalances.updateValue(areBalancesHidden)
} label: {
Image(systemName: areBalancesHidden ? "eye.slash" : "eye")
let image = areBalancesHidden ? Asset.Assets.eyeOff.image : Asset.Assets.eyeOn.image
image
.renderingMode(.template)
.resizable()
.frame(width: 21, height: 15)
.frame(width: 25, height: 25)
.padding(15)
.tint(Asset.Colors.primary.color)
}

View File

@ -131,12 +131,12 @@ public enum L10n {
public static func fee(_ p1: Any) -> String {
return L10n.tr("Localizable", "general.fee", String(describing: p1), fallback: "Typical Fee < %@")
}
/// ____
public static let hideBalancesLeast = L10n.tr("Localizable", "general.hideBalancesLeast", fallback: "____")
/// ---.----
public static let hideBalancesMost = L10n.tr("Localizable", "general.hideBalancesMost", fallback: "---.----")
/// -.---
public static let hideBalancesMostStandalone = L10n.tr("Localizable", "general.hideBalancesMostStandalone", fallback: "-.---")
///
public static let hideBalancesLeast = L10n.tr("Localizable", "general.hideBalancesLeast", fallback: "")
/// -----
public static let hideBalancesMost = L10n.tr("Localizable", "general.hideBalancesMost", fallback: "-----")
/// -----
public static let hideBalancesMostStandalone = L10n.tr("Localizable", "general.hideBalancesMostStandalone", fallback: "-----")
/// Max
public static let max = L10n.tr("Localizable", "general.max", fallback: "Max")
/// Next

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "eyeOff.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "eyeOn.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -176,9 +176,9 @@ Sharing this private data is irrevocable — once you have shared this private d
"qrCodeFor" = "QR Code for %@";
"general.tapToCopy" = "Tap to copy";
"general.fee" = "Typical Fee < %@";
"general.hideBalancesMost" = "---.----";
"general.hideBalancesMostStandalone" = "-.---";
"general.hideBalancesLeast" = "____";
"general.hideBalancesMost" = "-----";
"general.hideBalancesMostStandalone" = "-----";
"general.hideBalancesLeast" = "";
// MARK: - Transaction List
"transactionList.collapse" = "Collapse transaction";

View File

@ -30,6 +30,8 @@ public enum Asset {
public static let zashiLogo = ImageAsset(name: "ZashiLogo")
public static let alertIcon = ImageAsset(name: "alertIcon")
public static let copy = ImageAsset(name: "copy")
public static let eyeOff = ImageAsset(name: "eyeOff")
public static let eyeOn = ImageAsset(name: "eyeOn")
public static let flyReceivedFilled = ImageAsset(name: "flyReceivedFilled")
public static let gridTile = ImageAsset(name: "gridTile")
public static let share = ImageAsset(name: "share")