From ff06cfaf0ceec8f4eb71b97bbdb9168af5e047ff Mon Sep 17 00:00:00 2001 From: ericholguin Date: Fri, 26 May 2023 19:52:10 -0600 Subject: [PATCH] createaccount: ui: refactor signup form --- damus/Views/CreateAccountView.swift | 36 ++++++++--------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/damus/Views/CreateAccountView.swift b/damus/Views/CreateAccountView.swift index 4c7f5f2f..3539d9f8 100644 --- a/damus/Views/CreateAccountView.swift +++ b/damus/Views/CreateAccountView.swift @@ -30,31 +30,6 @@ struct CreateAccountView: View { } VStack { - - HStack(alignment: .top) { - VStack { - Text(verbatim: " ") - .foregroundColor(.white) - } - VStack { - SignupForm { - - FormLabel(NSLocalizedString("Display Name", comment: "Label to prompt display name entry."), optional: true) - FormTextInput(NSLocalizedString("Satoshi Nakamoto", comment: "Name of Bitcoin creator(s)."), text: $account.real_name) - .textInputAutocapitalization(.words) - - FormLabel(NSLocalizedString("About", comment: "Label to prompt for about text entry for user to describe about themself."), optional: true) - FormTextInput(NSLocalizedString("Creator(s) of Bitcoin. Absolute legend.", comment: "Example description about Bitcoin creator(s), Satoshi Nakamoto."), text: $account.about) - - FormLabel(NSLocalizedString("Account ID", comment: "Label to indicate the public ID of the account.")) - .onTapGesture { - regen_key() - } - - KeyText($account.pubkey) - .onTapGesture { - regen_key() - } VStack(alignment: .center) { ProfilePictureSelector(pubkey: account.pubkey, viewModel: profileUploadViewModel, callback: uploadedProfilePicture(image_url:)) @@ -70,7 +45,6 @@ struct CreateAccountView: View { .onTapGesture { regen_key() } - } } .frame(minWidth: 300, maxWidth: .infinity, minHeight: 300, alignment: .center) .background { @@ -78,6 +52,16 @@ struct CreateAccountView: View { .fill(DamusColors.adaptableGrey, strokeBorder: .gray.opacity(0.5), lineWidth: 1) } + SignupForm { + FormLabel(NSLocalizedString("Display name", comment: "Label to prompt display name entry."), optional: true) + FormTextInput(NSLocalizedString("Satoshi Nakamoto", comment: "Name of Bitcoin creator(s)."), text: $account.real_name) + .textInputAutocapitalization(.words) + + FormLabel(NSLocalizedString("About", comment: "Label to prompt for about text entry for user to describe about themself."), optional: true) + FormTextInput(NSLocalizedString("Creator(s) of Bitcoin. Absolute legend.", comment: "Example description about Bitcoin creator(s), Satoshi Nakamoto."), text: $account.about) + } + .padding(.top, 10) + Button(action: { self.is_done = true }) {