diff --git a/flutter/lib/features/profile/presentation/profile_screen.dart b/flutter/lib/features/profile/presentation/profile_screen.dart index da77d064..79e6d004 100644 --- a/flutter/lib/features/profile/presentation/profile_screen.dart +++ b/flutter/lib/features/profile/presentation/profile_screen.dart @@ -231,23 +231,6 @@ class _ProfileScreenState extends ConsumerState { : Text(context.l10n.profileSaveAction), ), ), - const SizedBox(height: 16), - const Divider(), - const SizedBox(height: 8), - SizedBox( - width: double.infinity, - child: OutlinedButton.icon( - onPressed: _isRefreshingCategories ? null : _refreshCategories, - icon: _isRefreshingCategories - ? const SizedBox( - height: 16, - width: 16, - child: CircularProgressIndicator(strokeWidth: 2), - ) - : const Icon(Icons.refresh), - label: const Text('Uppdatera kategorier'), - ), - ), ], ), ); @@ -343,6 +326,44 @@ class _ProfileScreenState extends ConsumerState { context.l10n.profileDatabaseDescription, style: Theme.of(context).textTheme.bodyMedium, ), + if (isAdmin) ...[ + const SizedBox(height: 12), + Card( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Adminverktyg', + style: Theme.of(context).textTheme.titleMedium, + ), + const SizedBox(height: 8), + Text( + 'Uppdatera kategorier manuellt i backend-cachen.', + style: Theme.of(context).textTheme.bodyMedium, + ), + const SizedBox(height: 12), + SizedBox( + width: double.infinity, + child: OutlinedButton.icon( + onPressed: + _isRefreshingCategories ? null : _refreshCategories, + icon: _isRefreshingCategories + ? const SizedBox( + height: 16, + width: 16, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.refresh), + label: const Text('Uppdatera kategorier'), + ), + ), + ], + ), + ), + ), + ], const SizedBox(height: 12), SingleChildScrollView( scrollDirection: Axis.horizontal,