Skip to content

Commit 3951c3a

Browse files
committed
update sign up screen
1 parent 7b1f98a commit 3951c3a

1 file changed

Lines changed: 42 additions & 79 deletions

File tree

frontend/lib/screens/signup_screen.dart

Lines changed: 42 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -180,101 +180,64 @@ class _SignupScreenState extends State<SignupScreen> {
180180
validator: (v) => v == null || v.isEmpty ? 'Please select your provider' : null,
181181
),
182182
const SizedBox(height: 12),
183+
// App Password Instructions
184+
Container(
185+
padding: const EdgeInsets.all(12),
186+
decoration: BoxDecoration(
187+
color: Colors.blue[50],
188+
border: Border.all(color: Colors.blue[200]!),
189+
borderRadius: BorderRadius.circular(8),
190+
),
191+
child: Column(
192+
crossAxisAlignment: CrossAxisAlignment.start,
193+
children: [
194+
Row(
195+
children: [
196+
Icon(Icons.info_outline, color: Colors.blue[700], size: 16),
197+
const SizedBox(width: 8),
198+
Text(
199+
'App Password Required',
200+
style: TextStyle(
201+
fontWeight: FontWeight.bold,
202+
color: Colors.blue[700],
203+
fontSize: 14,
204+
),
205+
),
206+
],
207+
),
208+
const SizedBox(height: 8),
209+
Text(
210+
'Your email provider requires a 16-character app password for secure access.\n\nHow to generate:',
211+
style: TextStyle(color: Colors.blue[600], fontSize: 12),
212+
),
213+
const SizedBox(height: 4),
214+
Text(
215+
'• Gmail: Google Account → Security → App passwords\n• Yahoo: Account Security → Generate app password\n• Outlook: Security → Advanced security options',
216+
style: TextStyle(color: Colors.blue[600], fontSize: 12),
217+
),
218+
],
219+
),
220+
),
221+
const SizedBox(height: 12),
183222
TextFormField(
184223
controller: _appPasswordController,
185224
decoration: const InputDecoration(
186-
labelText: 'App Password (exactly 16 chars)',
225+
labelText: 'App Password (exactly 16 characters)',
187226
prefixIcon: Icon(Icons.key_outlined),
188227
border: OutlineInputBorder(),
228+
helperText: 'Enter the 16-character app password from your email provider',
189229
),
190230
maxLength: 16,
191231
obscureText: true,
192232
validator: (value) {
193-
if (value == null || value.isEmpty) return 'Please enter your 16-char app password';
233+
if (value == null || value.isEmpty) return 'Please enter your 16-character app password';
194234
var cleanValue = value.replaceAll(' ', '');
195235
if (cleanValue.length != 16) {
196236
return 'App password must be exactly 16 characters (excluding spaces)';
197237
}
198238
return null;
199239
},
200240
),
201-
const SizedBox(height: 16),
202-
TextFormField(
203-
controller: _nameController,
204-
textCapitalization: TextCapitalization.words,
205-
decoration: const InputDecoration(
206-
labelText: 'Full Name',
207-
prefixIcon: Icon(Icons.person_outlined),
208-
border: OutlineInputBorder(),
209-
),
210-
validator: (value) {
211-
if (value == null || value.isEmpty) {
212-
return 'Please enter your full name';
213-
}
214-
if (value.length < 2) {
215-
return 'Name must be at least 2 characters';
216-
}
217-
return null;
218-
},
219-
),
220-
const SizedBox(height: 16),
221-
TextFormField(
222-
controller: _passwordController,
223-
obscureText: _obscurePassword,
224-
decoration: InputDecoration(
225-
labelText: 'QuMail Password',
226-
prefixIcon: const Icon(Icons.lock_outlined),
227-
suffixIcon: IconButton(
228-
icon: Icon(
229-
_obscurePassword ? Icons.visibility : Icons.visibility_off,
230-
),
231-
onPressed: () {
232-
setState(() {
233-
_obscurePassword = !_obscurePassword;
234-
});
235-
},
236-
),
237-
border: const OutlineInputBorder(),
238-
),
239-
validator: (value) {
240-
if (value == null || value.isEmpty) {
241-
return 'Please enter a password';
242-
}
243-
if (value.length < 6) {
244-
return 'Password must be at least 6 characters';
245-
}
246-
return null;
247-
},
248-
),
249-
const SizedBox(height: 16),
250-
TextFormField(
251-
controller: _confirmPasswordController,
252-
obscureText: _obscureConfirmPassword,
253-
decoration: InputDecoration(
254-
labelText: 'Confirm QuMail Password',
255-
prefixIcon: const Icon(Icons.lock_outlined),
256-
suffixIcon: IconButton(
257-
icon: Icon(
258-
_obscureConfirmPassword ? Icons.visibility : Icons.visibility_off,
259-
),
260-
onPressed: () {
261-
setState(() {
262-
_obscureConfirmPassword = !_obscureConfirmPassword;
263-
});
264-
},
265-
),
266-
border: const OutlineInputBorder(),
267-
),
268-
validator: (value) {
269-
if (value == null || value.isEmpty) {
270-
return 'Please confirm your password';
271-
}
272-
if (value != _passwordController.text) {
273-
return 'Passwords do not match';
274-
}
275-
return null;
276-
},
277-
),
278241
const SizedBox(height: 24),
279242
Consumer<AuthProvider>(
280243
builder: (context, authProvider, child) {

0 commit comments

Comments
 (0)