Compare commits

...

6 Commits

Author SHA1 Message Date
Lukas Korba e5ec490421
Merge pull request #1198 from LukasKorba/1195-Transaction-History-remove-No-message-included-in-transaction-copy-from-expanded-transparent-
[#1195] Transaction History: remove No message included in transaction copy from expanded transparent
2024-04-16 16:38:32 +02:00
Lukas Korba 7bbfde8133 [#1195] Transaction History: remove No message included in transaction copy from expanded transparent
- The "no message in the transaction" is no longer rendered for transparent Recipients
2024-04-16 16:38:11 +02:00
Lukas Korba e883749f50
Merge pull request #1197 from LukasKorba/1193-Restore-update-the-copy-inside-the-input-field
[#1193] Restore: update the copy inside the input field
2024-04-16 16:36:37 +02:00
Lukas Korba e7bd2fd458
Merge pull request #1196 from LukasKorba/1194-Security-Warning-make-the-text-clickable-as-well-to-improve-usability
[#1194] Security warning make the text clickable as well to improve usability
2024-04-16 16:36:27 +02:00
Lukas Korba 16d3499c30 [#1193] Restore: update the copy inside the input field
- The input field for the recovery phrase now shows the expected format in the placeholder.
2024-04-16 08:57:45 +02:00
Lukas Korba cd0fba7665 [#1194] Security Warning: make the text clickable as well to improve usability
- New ZashiToggle created to handle tap on the label as well
- All 3 system Toggles replaced with new one
2024-04-16 08:51:43 +02:00
10 changed files with 71 additions and 25 deletions

View File

@ -15,6 +15,8 @@ directly impact users rather than highlighting other crucial architectural updat
### Changed
- Zashi requires 1 GB of free space to operate. We have updated the user experience to display a message when this requirement is not met, indicating the actual amount of free space available. From this screen, you can access the settings to obtain the recovery phrase if needed.
- The height of syncing label has been unified to never change the overall component's' height based on different states.
- The input field for the recovery phrase now shows the expected format in the placeholder.
- "No message included in transaction" has been removed from expanded transparent transaction view.
## 1.0.4 build 2 (2024-03-29)

View File

@ -79,6 +79,9 @@ extension SDKSynchronizerClient: DependencyKey {
}
transaction.zAddress = addresses.first?.stringEncoded
if let someAddress = addresses.first, case .transparent = someAddress {
transaction.isTransparentRecipient = true
}
clearedTxs.append(transaction)
}

View File

@ -37,12 +37,11 @@ public struct DeleteWalletView: View {
}
HStack {
Toggle(isOn: $store.isAcknowledged, label: {
Text(L10n.DeleteWallet.iUnderstand)
.font(.custom(FontFamily.Inter.medium.name, size: 14))
})
.toggleStyle(CheckboxToggleStyle())
ZashiToggle(
isOn: $store.isAcknowledged,
label: L10n.DeleteWallet.iUnderstand
)
Spacer()
}
.padding(.top, 30)

View File

@ -40,11 +40,10 @@ public struct PrivateDataConsentView: View {
.lineSpacing(2)
HStack {
Toggle(isOn: viewStore.$isAcknowledged, label: {
Text(L10n.PrivateDataConsent.confirmation)
.font(.custom(FontFamily.Inter.medium.name, size: 14))
})
.toggleStyle(CheckboxToggleStyle())
ZashiToggle(
isOn: viewStore.$isAcknowledged,
label: L10n.PrivateDataConsent.confirmation
)
Spacer()
}

View File

@ -46,11 +46,10 @@ public struct SecurityWarningView: View {
}
HStack {
Toggle(isOn: $store.isAcknowledged, label: {
Text(L10n.SecurityWarning.acknowledge)
.font(.custom(FontFamily.Inter.medium.name, size: 14))
})
.toggleStyle(CheckboxToggleStyle())
ZashiToggle(
isOn: $store.isAcknowledged,
label: L10n.SecurityWarning.acknowledge
)
Spacer()
}

View File

@ -51,12 +51,14 @@ public struct TransactionRowView: View {
if transaction.isExpanded {
Group {
MessageView(
viewStore: viewStore,
message: transaction.textMemo?.toString(),
isSpending: transaction.isSpending,
isFailed: transaction.status == .failed
)
if !transaction.isTransparentRecipient {
MessageView(
viewStore: viewStore,
message: transaction.textMemo?.toString(),
isSpending: transaction.isSpending,
isFailed: transaction.status == .failed
)
}
TransactionIdView(
viewStore: viewStore,

View File

@ -162,8 +162,8 @@ public enum L10n {
/// Enter secret
/// recovery phrase
public static let description = L10n.tr("Localizable", "importWallet.description", fallback: "Enter secret\nrecovery phrase")
/// Enter private seed here
public static let enterPlaceholder = L10n.tr("Localizable", "importWallet.enterPlaceholder", fallback: "Enter private seed here…")
/// privacy dignity freedom ...
public static let enterPlaceholder = L10n.tr("Localizable", "importWallet.enterPlaceholder", fallback: "privacy dignity freedom ...")
/// Enter your 24-word seed phrase to restore the associated wallet.
public static let message = L10n.tr("Localizable", "importWallet.message", fallback: "Enter your 24-word seed phrase to restore the associated wallet.")
/// (optional)

View File

@ -43,7 +43,7 @@
"importWallet.alert.failed.title" = "Failed to restore wallet";
"importWallet.alert.failed.message" = "Error: %@";
"importWallet.optionalBirthday" = "(optional)";
"importWallet.enterPlaceholder" = "Enter private seed here…";
"importWallet.enterPlaceholder" = "privacy dignity freedom ...";
// MARK: - Tabs
"tabs.account" = "Account";

View File

@ -27,6 +27,7 @@ public struct TransactionState: Equatable, Identifiable {
public var shielded = true
public var zAddress: String?
public var isSentTransaction: Bool
public var isTransparentRecipient: Bool
public var fee: Zatoshi?
public var id: String
@ -171,6 +172,7 @@ public struct TransactionState: Equatable, Identifiable {
timestamp: TimeInterval? = nil,
zecAmount: Zatoshi,
isSentTransaction: Bool = false,
isTransparentRecipient: Bool = false,
isAddressExpanded: Bool = false,
isExpanded: Bool = false,
isIdExpanded: Bool = false,
@ -188,6 +190,7 @@ public struct TransactionState: Equatable, Identifiable {
self.timestamp = timestamp
self.zecAmount = zecAmount
self.isSentTransaction = isSentTransaction
self.isTransparentRecipient = isTransparentRecipient
self.isAddressExpanded = isAddressExpanded
self.isExpanded = isExpanded
self.isIdExpanded = isIdExpanded
@ -224,6 +227,7 @@ extension TransactionState {
timestamp = transaction.blockTime
zecAmount = transaction.isSentTransaction ? Zatoshi(-transaction.value.amount) : transaction.value
isSentTransaction = transaction.isSentTransaction
isTransparentRecipient = false
isAddressExpanded = false
isExpanded = false
isIdExpanded = false

View File

@ -0,0 +1,38 @@
//
// ZashiToggle.swift
//
//
// Created by Lukáš Korba on 04-16-2024.
//
import SwiftUI
import Generated
public struct ZashiToggle: View {
@Binding var isOn: Bool
let label: String
public init(isOn: Binding<Bool>, label: String) {
self._isOn = isOn
self.label = label
}
public var body: some View {
Button {
isOn.toggle()
} label: {
Toggle(isOn: $isOn, label: {
Text(label)
.font(.custom(FontFamily.Inter.medium.name, size: 14))
})
.toggleStyle(CheckboxToggleStyle())
}
.foregroundColor(Asset.Colors.primary.color)
}
}
#Preview {
@State var isOn: Bool = false
return ZashiToggle(isOn: $isOn, label: "I acknowledge")
}