Skip to content

Commit

Permalink
(ios) Redesigned Send screen (#629)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiehanson authored Oct 11, 2024
1 parent f50d5c2 commit 8a83fe7
Show file tree
Hide file tree
Showing 33 changed files with 3,116 additions and 1,621 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build
build/
.kotlin/

# Idea
.idea
Expand Down
71 changes: 36 additions & 35 deletions phoenix-ios/phoenix-ios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions phoenix-ios/phoenix-ios/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -5344,6 +5344,9 @@
}
}
}
},
"Add contacts for easy & quick payments" : {

},
"add liquidity" : {
"localizations" : {
Expand Down Expand Up @@ -10618,7 +10621,11 @@
}
}
},
"choose image" : {
"comment" : "button label - try to make it short"
},
"Choose image" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -13337,6 +13344,7 @@
},
"Could not connect to service: (origin)" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -13376,6 +13384,9 @@
}
}
},
"Could not connect to service: %@" : {
"comment" : "Error message - scanning lightning invoice"
},
"Could not retrieve payment details within a reasonable time. The recipient may be offline or unreachable." : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -17046,6 +17057,7 @@
}
},
"Enter a Lightning invoice, LNURL, or Lightning address you want to send money to." : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -24317,6 +24329,7 @@
}
},
"Less options" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -25876,6 +25889,7 @@
}
},
"Manual input" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -25916,6 +25930,7 @@
}
},
"Manual Input" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -27224,6 +27239,7 @@
}
},
"More options" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -27302,6 +27318,9 @@
}
}
}
},
"name, lightning address, offer..." : {

},
"Naming your wallet makes it easier to manage multiple wallets." : {
"localizations" : {
Expand Down Expand Up @@ -27785,6 +27804,9 @@
}
}
}
},
"No Contacts" : {

},
"no description" : {
"comment" : "placeholder: invoice is description-less",
Expand Down Expand Up @@ -29364,6 +29386,9 @@
}
}
},
"paste" : {
"comment" : "button label - try to make it short"
},
"Paste encrypted data blob here" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -29405,6 +29430,7 @@
}
},
"Paste from clipboard" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -29566,6 +29592,7 @@
}
},
"Pay " : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -29606,6 +29633,7 @@
}
},
"Pay %@" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -29646,6 +29674,7 @@
}
},
"Pay %@ " : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -29686,6 +29715,7 @@
}
},
"Pay Invoice" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -34053,6 +34083,9 @@
}
}
},
"Resolving lightning address" : {
"comment" : "Progress title"
},
"Restore my wallet" : {
"comment" : "Navigation bar title",
"localizations" : {
Expand Down Expand Up @@ -34538,6 +34571,7 @@
},
"Scan a QR code" : {
"comment" : "Navigation bar title",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -34616,6 +34650,12 @@
}
}
}
},
"scan qr code" : {
"comment" : "button label - try to make it short"
},
"Scan QR Code" : {

},
"Scan withdraw" : {
"extractionState" : "stale",
Expand Down Expand Up @@ -35182,6 +35222,7 @@
},
"Sending payment" : {
"comment" : "Navigation bar title",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -35222,6 +35263,7 @@
}
},
"Sending Payment..." : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -38509,6 +38551,9 @@
}
}
}
},
"Suggestions" : {

},
"Summary" : {
"comment" : "ChannelsConfigurationView/ChannelInfoPopup/TabBar",
Expand Down Expand Up @@ -40043,6 +40088,7 @@
},
"The invoice is not for (chainMismatch.expected.name)" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -40083,6 +40129,7 @@
}
},
"The invoice is not for %@" : {
"comment" : "Error message - scanning lightning invoice",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -40571,6 +40618,7 @@
},
"The service ((origin)) appears to be offline, or they have a down server" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -40612,6 +40660,7 @@
},
"The service ((origin)) doesn't support Lightning addresses, or doesn't know this user" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -40653,6 +40702,7 @@
},
"The service ((origin)) returned error code: (rfCode.code.value)" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -40694,6 +40744,7 @@
},
"The service ((origin)) returned error message: (rfDetailed.reason)" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -40733,6 +40784,34 @@
}
}
},
"The service (%@) appears to be offline, or they have a down server" : {
"comment" : "Error message - scanning lightning invoice"
},
"The service (%@) doesn't support Lightning addresses, or doesn't know this user" : {
"comment" : "Error message - scanning lightning invoice"
},
"The service (%@) returned error code: %d" : {
"comment" : "Error message - scanning lightning invoice",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "The service (%1$@) returned error code: %2$d"
}
}
}
},
"The service (%@) returned error message: %@" : {
"comment" : "Error message - scanning lightning invoice",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "The service (%1$@) returned error message: %2$@"
}
}
}
},
"The simulator cannot access the camera. Please use the clipboard." : {
"comment" : "Warning for iOS Simulator (only for devs)",
"localizations" : {
Expand Down Expand Up @@ -44424,6 +44503,7 @@
},
"Unreadable response from service: (origin)" : {
"comment" : "Error message - scanning lightning invoice",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -44463,6 +44543,9 @@
}
}
},
"Unreadable response from service: %@" : {
"comment" : "Error message - scanning lightning invoice"
},
"Updating cloud" : {
"localizations" : {
"ar" : {
Expand Down
38 changes: 20 additions & 18 deletions phoenix-ios/phoenix-ios/kotlin/KotlinExtensions+Other.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,35 +77,37 @@ extension Connections {
extension LnurlAuth {

static var defaultActionPromptTitle: String {
return NSLocalizedString("Authenticate", comment: "lnurl-auth: login button title")
return String(localized: "Authenticate", comment: "lnurl-auth: login button title")
}

var actionPromptTitle: String {
if let action = self.action {
switch action {
case .register : return NSLocalizedString("Register", comment: "lnurl-auth: login button title")
case .login : return NSLocalizedString("Login", comment: "lnurl-auth: login button title")
case .link : return NSLocalizedString("Link", comment: "lnurl-auth: login button title")
case .auth : return NSLocalizedString("Authenticate", comment: "lnurl-auth: login button title")
}
guard let action else {
return LnurlAuth.defaultActionPromptTitle
}

switch action {
case .register : return String(localized: "Register", comment: "lnurl-auth: login button title")
case .login : return String(localized: "Login", comment: "lnurl-auth: login button title")
case .link : return String(localized: "Link", comment: "lnurl-auth: login button title")
case .auth : return String(localized: "Authenticate", comment: "lnurl-auth: login button title")
}
return LnurlAuth.defaultActionPromptTitle
}

static var defaultActionSuccessTitle: String {
return NSLocalizedString("Authenticated", comment: "lnurl-auth: success text")
return String(localized: "Authenticated", comment: "lnurl-auth: success text")
}

var actionSuccessTitle: String {
if let action = self.action {
switch action {
case .register : return NSLocalizedString("Registered", comment: "lnurl-auth: success text")
case .login : return NSLocalizedString("Logged In", comment: "lnurl-auth: success text")
case .link : return NSLocalizedString("Linked", comment: "lnurl-auth: success text")
case .auth : return NSLocalizedString("Authenticated", comment: "lnurl-auth: success text")
}
guard let action else {
return LnurlAuth.defaultActionSuccessTitle
}

switch action {
case .register : return String(localized: "Registered", comment: "lnurl-auth: success text")
case .login : return String(localized: "Logged In", comment: "lnurl-auth: success text")
case .link : return String(localized: "Linked", comment: "lnurl-auth: success text")
case .auth : return String(localized: "Authenticated", comment: "lnurl-auth: success text")
}
return LnurlAuth.defaultActionSuccessTitle
}
}

Expand Down
Loading

0 comments on commit 8a83fe7

Please sign in to comment.