Replace Colors.* in admin_scaffold, admin_content_tools, secure_chat_screen, new_conversation_sheet, notifications_screen, viewable_profile
This commit is contained in:
parent
3aa0f5e93a
commit
248a32eb87
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import '../../services/api_service.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
|
||||
class AdminContentToolsScreen extends StatefulWidget {
|
||||
const AdminContentToolsScreen({super.key});
|
||||
|
|
@ -286,18 +287,18 @@ class _CreateUserTabState extends State<_CreateUserTab> {
|
|||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: _resultIsError
|
||||
? Colors.red.withValues(alpha: 0.15)
|
||||
: Colors.green.withValues(alpha: 0.15),
|
||||
? SojornColors.destructive.withValues(alpha: 0.15)
|
||||
: const Color(0xFF4CAF50).withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: _resultIsError ? Colors.red : Colors.green,
|
||||
color: _resultIsError ? SojornColors.destructive : const Color(0xFF4CAF50),
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: SelectableText(
|
||||
_result!,
|
||||
style: TextStyle(
|
||||
color: _resultIsError ? Colors.red.shade300 : Colors.green.shade300,
|
||||
color: _resultIsError ? const Color(0xFFE57373) : const Color(0xFF81C784),
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
|
|
@ -584,7 +585,7 @@ class _ImportContentTabState extends State<_ImportContentTab> {
|
|||
return Text(
|
||||
'${items.length} item(s) detected',
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
color: items.isEmpty ? Colors.orange : Colors.green,
|
||||
color: items.isEmpty ? const Color(0xFFFF9800) : const Color(0xFF4CAF50),
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
|
@ -619,9 +620,9 @@ class _ImportContentTabState extends State<_ImportContentTab> {
|
|||
Widget _buildResultCard() {
|
||||
final isError = _result!.containsKey('error') && _result!['success'] == null;
|
||||
final bgColor = isError
|
||||
? Colors.red.withValues(alpha: 0.15)
|
||||
: Colors.green.withValues(alpha: 0.15);
|
||||
final borderColor = isError ? Colors.red : Colors.green;
|
||||
? SojornColors.destructive.withValues(alpha: 0.15)
|
||||
: const Color(0xFF4CAF50).withValues(alpha: 0.15);
|
||||
final borderColor = isError ? SojornColors.destructive : const Color(0xFF4CAF50);
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
|
|
@ -637,13 +638,13 @@ class _ImportContentTabState extends State<_ImportContentTab> {
|
|||
if (isError)
|
||||
SelectableText(
|
||||
_result!['error'].toString(),
|
||||
style: TextStyle(color: Colors.red.shade300, fontSize: 13),
|
||||
style: TextStyle(color: const Color(0xFFE57373), fontSize: 13),
|
||||
)
|
||||
else ...[
|
||||
Text(
|
||||
_result!['message'] ?? 'Done',
|
||||
style: TextStyle(
|
||||
color: Colors.green.shade300,
|
||||
color: const Color(0xFF81C784),
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
),
|
||||
|
|
@ -662,7 +663,7 @@ class _ImportContentTabState extends State<_ImportContentTab> {
|
|||
...(_result!['errors'] as List).map((e) => Text(
|
||||
'• $e',
|
||||
style: TextStyle(
|
||||
fontSize: 11, color: Colors.red.shade300),
|
||||
fontSize: 11, color: const Color(0xFFE57373)),
|
||||
)),
|
||||
],
|
||||
if (_result!['created'] != null &&
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ class AdminScaffold extends StatelessWidget {
|
|||
primary: accent,
|
||||
secondary: Color(0xFF7C3AED),
|
||||
surface: surface,
|
||||
onSurface: Colors.white,
|
||||
onSurface: const Color(0xFFFFFFFF),
|
||||
error: Color(0xFFE11D48),
|
||||
),
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: panel,
|
||||
elevation: 0,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
surfaceTintColor: const Color(0x00000000),
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
color: panel,
|
||||
|
|
@ -58,12 +58,12 @@ class AdminScaffold extends StatelessWidget {
|
|||
headlineSmall: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
titleMedium: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
bodyMedium: TextStyle(
|
||||
fontSize: 14,
|
||||
|
|
@ -85,7 +85,7 @@ class AdminScaffold extends StatelessWidget {
|
|||
dataTableTheme: DataTableThemeData(
|
||||
headingTextStyle: const TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
color: const Color(0xFFFFFFFF),
|
||||
),
|
||||
dataTextStyle: const TextStyle(
|
||||
color: Color(0xFFCBD5F5),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import 'package:timeago/timeago.dart' as timeago;
|
|||
import '../../models/notification.dart';
|
||||
import '../../providers/api_provider.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
import '../../widgets/media/signed_media_image.dart';
|
||||
import '../profile/viewable_profile_screen.dart';
|
||||
import '../post/post_detail_screen.dart';
|
||||
|
|
@ -435,12 +436,12 @@ class _NotificationsScreenState extends ConsumerState<NotificationsScreen> {
|
|||
Text(
|
||||
'Archive',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: SojornColors.basicWhite,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Icon(Icons.archive, color: Colors.white),
|
||||
Icon(Icons.archive, color: SojornColors.basicWhite),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -505,7 +506,7 @@ class _NotificationItem extends StatelessWidget {
|
|||
padding: const EdgeInsets.all(AppTheme.spacingMd),
|
||||
decoration: BoxDecoration(
|
||||
color: notification.isRead
|
||||
? Colors.transparent
|
||||
? SojornColors.transparent
|
||||
: AppTheme.royalPurple.withOpacity(0.05),
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import '../../models/trust_state.dart';
|
|||
import '../../models/trust_tier.dart';
|
||||
import '../../providers/api_provider.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
import '../../utils/country_flag.dart';
|
||||
import '../../utils/url_launcher_helper.dart';
|
||||
import '../../widgets/sojorn_post_card.dart';
|
||||
|
|
@ -745,7 +746,7 @@ class _UnifiedProfileScreenState extends ConsumerState<UnifiedProfileScreen>
|
|||
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: SojornColors.transparent,
|
||||
builder: (context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(AppTheme.spacingLg),
|
||||
|
|
@ -785,7 +786,7 @@ class _UnifiedProfileScreenState extends ConsumerState<UnifiedProfileScreen>
|
|||
builder: (context) {
|
||||
final avatarUrl = _resolveAvatar(profile.avatarUrl);
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: SojornColors.transparent,
|
||||
insetPadding: const EdgeInsets.all(AppTheme.spacingLg),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(AppTheme.spacingLg),
|
||||
|
|
@ -940,7 +941,7 @@ class _UnifiedProfileScreenState extends ConsumerState<UnifiedProfileScreen>
|
|||
toolbarHeight: 0,
|
||||
collapsedHeight: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: SojornColors.transparent,
|
||||
elevation: 0,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background: _ProfileHeader(
|
||||
|
|
@ -1465,7 +1466,7 @@ class _ProfileHeader extends StatelessWidget {
|
|||
fontSize: isCompact ? 16 : 18,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
color: const Color(0x33000000),
|
||||
blurRadius: 6,
|
||||
),
|
||||
],
|
||||
|
|
@ -1485,7 +1486,7 @@ class _ProfileHeader extends StatelessWidget {
|
|||
color: AppTheme.white.withOpacity(0.85),
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
color: const Color(0x33000000),
|
||||
blurRadius: 4,
|
||||
),
|
||||
],
|
||||
|
|
@ -1635,7 +1636,7 @@ class _ProfileHeader extends StatelessWidget {
|
|||
vertical: 6,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.35),
|
||||
color: const Color(0x59000000),
|
||||
borderRadius: BorderRadius.circular(AppTheme.radiusMd),
|
||||
),
|
||||
child: Row(
|
||||
|
|
@ -1698,11 +1699,11 @@ class _StatItem extends StatelessWidget {
|
|||
Text(
|
||||
value,
|
||||
style: AppTheme.headlineSmall.copyWith(
|
||||
color: AppTheme.white,
|
||||
color: SojornColors.white,
|
||||
fontSize: 16,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black.withOpacity(0.3),
|
||||
color: SojornColors.shadow,
|
||||
blurRadius: 4,
|
||||
),
|
||||
],
|
||||
|
|
@ -1710,12 +1711,11 @@ class _StatItem extends StatelessWidget {
|
|||
),
|
||||
Text(
|
||||
label,
|
||||
style: AppTheme.labelSmall.copyWith(
|
||||
color: AppTheme.white.withOpacity(0.8),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 10,
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black.withOpacity(0.3),
|
||||
color: SojornColors.shadow,
|
||||
blurRadius: 2,
|
||||
),
|
||||
],
|
||||
|
|
@ -1766,7 +1766,7 @@ class _HarmonyAvatar extends StatelessWidget {
|
|||
ringColor = AppTheme.egyptianBlue;
|
||||
ringWidth = 3;
|
||||
} else {
|
||||
ringColor = Colors.grey;
|
||||
ringColor = AppTheme.textDisabled;
|
||||
ringWidth = 2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import '../../models/secure_chat.dart';
|
||||
import '../../services/secure_chat_service.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
import '../../widgets/media/signed_media_image.dart';
|
||||
|
||||
/// Bottom sheet for starting a new secure conversation
|
||||
|
|
@ -110,7 +111,7 @@ class _NewConversationSheetState extends State<NewConversationSheet> {
|
|||
width: 40,
|
||||
height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.shade300,
|
||||
color: AppTheme.textDisabled.withValues(alpha: 0.3),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
|
|
@ -244,7 +245,7 @@ class _NewConversationSheetState extends State<NewConversationSheet> {
|
|||
),
|
||||
if (_isStarting)
|
||||
Container(
|
||||
color: Colors.black26,
|
||||
color: const Color(0x42000000),
|
||||
child: const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
],
|
||||
|
|
@ -363,12 +364,12 @@ class _NewConversationSheetState extends State<NewConversationSheet> {
|
|||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.lock, size: 14, color: Colors.white),
|
||||
Icon(Icons.lock, size: 14, color: SojornColors.basicWhite),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'Chat',
|
||||
style: Theme.of(context).textTheme.labelSmall?.copyWith(
|
||||
color: Colors.white,
|
||||
color: SojornColors.basicWhite,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import '../../services/api_service.dart';
|
|||
import '../../services/secure_chat_service.dart';
|
||||
import '../../services/local_message_store.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../theme/tokens.dart';
|
||||
import '../../services/notification_service.dart';
|
||||
import '../../widgets/media/signed_media_image.dart';
|
||||
import '../../widgets/secure_chat/chat_bubble_widget.dart';
|
||||
|
|
@ -214,7 +215,7 @@ class _SecureChatScreenState extends State<SecureChatScreen>
|
|||
return AppBar(
|
||||
backgroundColor: AppTheme.scaffoldBg,
|
||||
elevation: 0,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
surfaceTintColor: SojornColors.transparent,
|
||||
leading: IconButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
icon: Icon(Icons.arrow_back, color: AppTheme.navyBlue),
|
||||
|
|
@ -324,7 +325,7 @@ class _SecureChatScreenState extends State<SecureChatScreen>
|
|||
children: [
|
||||
Container(
|
||||
key: _listViewportKey,
|
||||
color: Colors.transparent,
|
||||
color: SojornColors.transparent,
|
||||
child: ListView.builder(
|
||||
reverse: true,
|
||||
controller: controller,
|
||||
|
|
@ -926,7 +927,7 @@ class _SecureChatScreenState extends State<SecureChatScreen>
|
|||
onPressed: () => Navigator.pop(context, true),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppTheme.error,
|
||||
foregroundColor: Colors.white,
|
||||
foregroundColor: SojornColors.basicWhite,
|
||||
),
|
||||
child: Text(
|
||||
'DELETE PERMANENTLY',
|
||||
|
|
@ -1101,7 +1102,7 @@ class _SecureChatScreenState extends State<SecureChatScreen>
|
|||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, true),
|
||||
style: TextButton.styleFrom(foregroundColor: Colors.red),
|
||||
style: TextButton.styleFrom(foregroundColor: SojornColors.destructive),
|
||||
child: const Text('Force Reset'),
|
||||
),
|
||||
],
|
||||
|
|
@ -1115,7 +1116,7 @@ class _SecureChatScreenState extends State<SecureChatScreen>
|
|||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Keys force reset! Restart chat to test.'),
|
||||
backgroundColor: Colors.red,
|
||||
backgroundColor: SojornColors.destructive,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue