ux: Onboarding improvements
This patch removes the EULA view from the onboarding flow and can be viewed from the create account view if the user so chooses. This also removes the need to copy the public key in the save keys view, now only the copying of the private key is required. Finally it fixes minor issues with the onboarding views, such as padding and spacing, where components were not aligned properly. Testing iPhone 15 Pro Max (17.0) Light Mode: https://video.nostr.build/7c1d38c75069262a56a93fcf7cc447fa8808ed7fbbd18a8169b583913248b741.mp4 iPhone SE (3rd generation) (16.4) Dark Mode: https://video.nostr.build/100085c84d84a75f41c45e3dc5347e5b4c35a8149b1b8a5edb9e6c059adc5949.mp4 Lightning-Address: eriic@getalby.com Closes: https://github.com/damus-io/damus/issues/1902 Changelog-Added: Fixed minor spacing and padding issues in onboarding views Changelog-Changed: EULA is not shown by default Changelog-Removed: Removed copying public key action Signed-off-by: ericholguin <ericholguin@apache.org> Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
9d87bc11dd
commit
e2361c1176
@@ -24,36 +24,30 @@ struct SaveKeysView: View {
|
||||
var body: some View {
|
||||
ZStack(alignment: .top) {
|
||||
VStack(alignment: .center) {
|
||||
Text("Welcome, \(account.rendered_name)!", comment: "Text to welcome user.")
|
||||
.font(.title.bold())
|
||||
.padding(.bottom, 10)
|
||||
if account.rendered_name.isEmpty {
|
||||
Text("Welcome!", comment: "Text to welcome user.")
|
||||
.font(.title.bold())
|
||||
.padding(.bottom, 10)
|
||||
} else {
|
||||
Text("Welcome, \(account.rendered_name)!", comment: "Text to welcome user.")
|
||||
.font(.title.bold())
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
|
||||
Text("Before we get started, you'll need to save your account info, otherwise you won't be able to login in the future if you ever uninstall Damus.", comment: "Reminder to user that they should save their account information.")
|
||||
.padding(.bottom, 10)
|
||||
|
||||
Text("Public Key", comment: "Label to indicate that text below is the user's public key used by others to uniquely refer to the user.")
|
||||
Text("Private Key", comment: "Label to indicate that the text below is the user's private key used by only the user themself as a secret to login to access their account.")
|
||||
.font(.title2.bold())
|
||||
.padding(.bottom, 10)
|
||||
|
||||
Text("This is your account ID, you can give this to your friends so that they can follow you. Tap to copy.", comment: "Label to describe that a public key is the user's account ID and what they can do with it.")
|
||||
Text("This is your secret account key. You need this to access your account. Don't share this with anyone! Save it in a password manager and keep it safe!", comment: "Label to describe that a private key is the user's secret account key and what they should do with it.")
|
||||
.padding(.bottom, 10)
|
||||
|
||||
SaveKeyView(text: account.pubkey.npub, textContentType: .username, is_copied: $pub_copied, focus: $pubkey_focused)
|
||||
SaveKeyView(text: account.privkey.nsec, textContentType: .newPassword, is_copied: $priv_copied, focus: $privkey_focused)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
if pub_copied {
|
||||
Text("Private Key", comment: "Label to indicate that the text below is the user's private key used by only the user themself as a secret to login to access their account.")
|
||||
.font(.title2.bold())
|
||||
.padding(.bottom, 10)
|
||||
|
||||
Text("This is your secret account key. You need this to access your account. Don't share this with anyone! Save it in a password manager and keep it safe!", comment: "Label to describe that a private key is the user's secret account key and what they should do with it.")
|
||||
.padding(.bottom, 10)
|
||||
|
||||
SaveKeyView(text: account.privkey.nsec, textContentType: .newPassword, is_copied: $priv_copied, focus: $privkey_focused)
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
|
||||
if pub_copied && priv_copied {
|
||||
|
||||
if priv_copied {
|
||||
if loading {
|
||||
ProgressView()
|
||||
.progressViewStyle(.circular)
|
||||
|
||||
Reference in New Issue
Block a user