Fix missing buttons in personal workspace by reloading permissions on org change; fix untypeable TextField by removing Container wrapper and using InputDecoration borders

This commit is contained in:
Leon Bösche
2026-01-24 04:27:09 +01:00
parent 9654497a2b
commit d387f6c4d3
2 changed files with 38 additions and 30 deletions

View File

@@ -603,6 +603,10 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
path: '/', path: '/',
), ),
); );
// Reload permissions when org changes
context.read<PermissionBloc>().add(
LoadPermissions(orgId: orgId),
);
} }
}, },
child: child:

View File

@@ -495,40 +495,44 @@ class _OrganizationSettingsDialogState
), ),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
Container( TextField(
decoration: BoxDecoration( controller: usernameController,
border: Border.all( cursorColor: AppTheme.accentColor,
color: AppTheme.accentColor.withValues(alpha: 0.3), decoration: InputDecoration(
hintText: 'Username',
hintStyle: TextStyle(color: AppTheme.secondaryText),
contentPadding: const EdgeInsets.all(12),
border: OutlineInputBorder(
borderSide: BorderSide(
color: AppTheme.accentColor.withValues(alpha: 0.3),
),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: AppTheme.accentColor.withValues(alpha: 0.3),
),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: AppTheme.accentColor),
), ),
borderRadius: BorderRadius.circular(8),
), ),
child: TextField( style: TextStyle(color: AppTheme.primaryText),
controller: usernameController, onChanged: (value) async {
cursorColor: AppTheme.accentColor, if (value.length > 2) {
decoration: InputDecoration( try {
hintText: 'Username', _userSuggestions = await widget.orgApi.searchUsers(
hintStyle: TextStyle(color: AppTheme.secondaryText), widget.organization.id,
contentPadding: const EdgeInsets.all(12), value,
border: InputBorder.none, );
), } catch (e) {
style: TextStyle(color: AppTheme.primaryText),
onChanged: (value) async {
if (value.length > 2) {
try {
_userSuggestions = await widget.orgApi.searchUsers(
widget.organization.id,
value,
);
} catch (e) {
_userSuggestions = [];
}
setState(() {});
} else {
_userSuggestions = []; _userSuggestions = [];
setState(() {});
} }
}, setState(() {});
), } else {
_userSuggestions = [];
setState(() {});
}
},
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
if (_userSuggestions.isNotEmpty) ...[ if (_userSuggestions.isNotEmpty) ...[