Add new friends system, and sharing legs support
All checks were successful
Release / meta (push) Successful in 9s
Release / linux-build (push) Successful in 6m37s
Release / web-build (push) Successful in 5m29s
Release / android-build (push) Successful in 15m58s
Release / release-master (push) Successful in 20s
Release / release-dev (push) Successful in 26s

This commit is contained in:
2026-01-03 01:07:08 +00:00
parent 42af39b442
commit 89b760508d
19 changed files with 2832 additions and 712 deletions

View File

@@ -294,6 +294,7 @@ class _RegisterPanelContentState extends State<RegisterPanelContent> {
final _passwordController = TextEditingController();
final _inviteController = TextEditingController();
bool _registering = false;
String? _usernameError;
@override
void dispose() {
@@ -306,10 +307,21 @@ class _RegisterPanelContentState extends State<RegisterPanelContent> {
}
Future<void> _register() async {
final username = _usernameController.text.trim();
if (username.contains(' ') || username.contains('@')) {
setState(() {
_usernameError = 'Username cannot contain spaces or @';
});
return;
} else {
setState(() {
_usernameError = null;
});
}
setState(() => _registering = true);
try {
await widget.authService.register(
username: _usernameController.text.trim(),
username: username,
email: _emailController.text.trim(),
fullName: _displayNameController.text.trim(),
password: _passwordController.text,
@@ -363,7 +375,22 @@ class _RegisterPanelContentState extends State<RegisterPanelContent> {
border: OutlineInputBorder(),
labelText: "Username",
),
onChanged: (_) {
if (_usernameError != null &&
!_usernameController.text.contains(' ') &&
!_usernameController.text.contains('@')) {
setState(() => _usernameError = null);
}
},
),
if (_usernameError != null)
Padding(
padding: const EdgeInsets.only(top: 4.0),
child: Text(
_usernameError!,
style: TextStyle(color: Theme.of(context).colorScheme.error),
),
),
const SizedBox(height: 8),
TextField(
controller: _displayNameController,