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