Replace inline Colors.* with SojornColors tokens in feed_sojorn, home_shell, threaded_conversation, compose screens
This commit is contained in:
parent
b1f1cc5a44
commit
9093c17e55
|
|
@ -15,6 +15,7 @@ import '../../providers/feed_refresh_provider.dart';
|
||||||
import '../../services/api_service.dart';
|
import '../../services/api_service.dart';
|
||||||
import '../../services/image_upload_service.dart';
|
import '../../services/image_upload_service.dart';
|
||||||
import '../../theme/app_theme.dart';
|
import '../../theme/app_theme.dart';
|
||||||
|
import '../../theme/tokens.dart';
|
||||||
import '../../widgets/composer/composer_toolbar.dart';
|
import '../../widgets/composer/composer_toolbar.dart';
|
||||||
import '../../services/content_filter.dart';
|
import '../../services/content_filter.dart';
|
||||||
import '../../widgets/sojorn_snackbar.dart';
|
import '../../widgets/sojorn_snackbar.dart';
|
||||||
|
|
@ -739,14 +740,14 @@ class _ComposeScreenState extends ConsumerState<ComposeScreen> {
|
||||||
top: 8,
|
top: 8,
|
||||||
right: 8,
|
right: 8,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.black.withOpacity(0.6),
|
color: SojornColors.overlayDark,
|
||||||
shape: const CircleBorder(),
|
shape: const CircleBorder(),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: _removeImage,
|
onTap: _removeImage,
|
||||||
customBorder: const CircleBorder(),
|
customBorder: const CircleBorder(),
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(6),
|
padding: EdgeInsets.all(6),
|
||||||
child: Icon(Icons.close, color: Colors.white, size: 18),
|
child: Icon(Icons.close, color: SojornColors.basicWhite, size: 18),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -769,12 +770,12 @@ class _ComposeScreenState extends ConsumerState<ComposeScreen> {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isSafe
|
color: isSafe
|
||||||
? AppTheme.navyBlue.withValues(alpha: 0.05)
|
? AppTheme.navyBlue.withValues(alpha: 0.05)
|
||||||
: Colors.amber.withValues(alpha: 0.08),
|
: SojornColors.nsfwWarningBg,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: isSafe
|
color: isSafe
|
||||||
? AppTheme.navyBlue.withValues(alpha: 0.15)
|
? AppTheme.navyBlue.withValues(alpha: 0.15)
|
||||||
: Colors.amber.withValues(alpha: 0.3),
|
: SojornColors.nsfwWarningBorder,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
@ -782,7 +783,7 @@ class _ComposeScreenState extends ConsumerState<ComposeScreen> {
|
||||||
Icon(
|
Icon(
|
||||||
isSafe ? Icons.link_rounded : Icons.warning_amber_rounded,
|
isSafe ? Icons.link_rounded : Icons.warning_amber_rounded,
|
||||||
size: 20,
|
size: 20,
|
||||||
color: isSafe ? AppTheme.navyBlue : Colors.amber.shade700,
|
color: isSafe ? AppTheme.navyBlue : AppTheme.nsfwWarningIcon,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
@ -980,7 +981,7 @@ class ComposeBody extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.05),
|
color: SojornColors.overlayScrim,
|
||||||
blurRadius: 8,
|
blurRadius: 8,
|
||||||
offset: const Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import '../../providers/feed_refresh_provider.dart';
|
||||||
import '../../models/post.dart';
|
import '../../models/post.dart';
|
||||||
import '../../theme/theme_extensions.dart';
|
import '../../theme/theme_extensions.dart';
|
||||||
import '../../theme/app_theme.dart';
|
import '../../theme/app_theme.dart';
|
||||||
|
import '../../theme/tokens.dart';
|
||||||
import '../../widgets/post/sojorn_swipeable_post.dart';
|
import '../../widgets/post/sojorn_swipeable_post.dart';
|
||||||
import '../../widgets/post/post_view_mode.dart';
|
import '../../widgets/post/post_view_mode.dart';
|
||||||
import '../../widgets/sojorn_post_card.dart';
|
import '../../widgets/sojorn_post_card.dart';
|
||||||
|
|
@ -189,7 +190,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
backgroundColor: AppTheme.brightNavy,
|
backgroundColor: AppTheme.brightNavy,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: SojornColors.basicWhite,
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
|
|
@ -208,7 +209,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
if (_feedItems.isEmpty && _isLoading) {
|
if (_feedItems.isEmpty && _isLoading) {
|
||||||
return const Center(
|
return const Center(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -257,7 +258,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
vertical: 8,
|
vertical: 8,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black.withOpacity(0.7),
|
color: SojornColors.overlayDark,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
),
|
),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
|
|
@ -265,7 +266,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
height: 20,
|
height: 20,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -290,9 +291,9 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black.withOpacity(0.7),
|
color: SojornColors.overlayDark,
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
border: Border.all(color: Colors.white24),
|
border: Border.all(color: SojornColors.basicWhite.withValues(alpha: 0.24)),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
@ -300,7 +301,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
const Text(
|
const Text(
|
||||||
'Ad Debug',
|
'Ad Debug',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
),
|
),
|
||||||
|
|
@ -309,7 +310,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
Text(
|
Text(
|
||||||
'items: ${_feedItems.length} | ads: ${adIndices.length}',
|
'items: ${_feedItems.length} | ads: ${adIndices.length}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white70,
|
color: SojornColors.basicWhite.withValues(alpha: 0.7),
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -319,7 +320,7 @@ class _FeedsojornScreenState extends ConsumerState<FeedsojornScreen> {
|
||||||
? 'ad positions: none'
|
? 'ad positions: none'
|
||||||
: 'ad positions: ${adIndices.join(', ')}',
|
: 'ad positions: ${adIndices.join(', ')}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white70,
|
color: SojornColors.basicWhite.withValues(alpha: 0.7),
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -342,7 +343,7 @@ class _ErrorState extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.black,
|
color: SojornColors.feedNavyTop,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|
@ -350,7 +351,7 @@ class _ErrorState extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
message,
|
message,
|
||||||
style: AppTheme.bodyMedium.copyWith(
|
style: AppTheme.bodyMedium.copyWith(
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
|
@ -359,7 +360,7 @@ class _ErrorState extends StatelessWidget {
|
||||||
onPressed: onRetry,
|
onPressed: onRetry,
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Retry',
|
'Retry',
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: SojornColors.basicWhite),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -375,7 +376,7 @@ class _EmptyState extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.black,
|
color: SojornColors.feedNavyTop,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|
@ -383,13 +384,13 @@ class _EmptyState extends StatelessWidget {
|
||||||
Icon(
|
Icon(
|
||||||
Icons.explore_outlined,
|
Icons.explore_outlined,
|
||||||
size: 64.0,
|
size: 64.0,
|
||||||
color: Colors.white.withOpacity(0.7),
|
color: SojornColors.basicWhite.withValues(alpha: 0.7),
|
||||||
),
|
),
|
||||||
const SizedBox(height: AppTheme.spacingMd),
|
const SizedBox(height: AppTheme.spacingMd),
|
||||||
Text(
|
Text(
|
||||||
'No active beacons or posts',
|
'No active beacons or posts',
|
||||||
style: AppTheme.headlineSmall.copyWith(
|
style: AppTheme.headlineSmall.copyWith(
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import 'package:go_router/go_router.dart';
|
||||||
import '../../services/notification_service.dart';
|
import '../../services/notification_service.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 '../notifications/notifications_screen.dart';
|
import '../notifications/notifications_screen.dart';
|
||||||
import '../compose/compose_screen.dart';
|
import '../compose/compose_screen.dart';
|
||||||
import '../search/search_screen.dart';
|
import '../search/search_screen.dart';
|
||||||
|
|
@ -145,8 +146,8 @@ class _HomeShellState extends ConsumerState<HomeShell> with WidgetsBindingObserv
|
||||||
child: CustomPaint(
|
child: CustomPaint(
|
||||||
painter: _VerticalBorderProgressPainter(
|
painter: _VerticalBorderProgressPainter(
|
||||||
progress: upload.progress,
|
progress: upload.progress,
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
backgroundColor: Colors.white.withOpacity(0.2),
|
backgroundColor: SojornColors.basicWhite.withValues(alpha: 0.2),
|
||||||
strokeWidth: 3.5,
|
strokeWidth: 3.5,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
),
|
),
|
||||||
|
|
@ -155,12 +156,12 @@ class _HomeShellState extends ConsumerState<HomeShell> with WidgetsBindingObserv
|
||||||
|
|
||||||
// Content: Icon(+) or Percent or Check
|
// Content: Icon(+) or Percent or Check
|
||||||
if (isDone)
|
if (isDone)
|
||||||
const Icon(Icons.check, color: Colors.white, size: 28)
|
const Icon(Icons.check, color: SojornColors.basicWhite, size: 28)
|
||||||
else if (isUploading)
|
else if (isUploading)
|
||||||
Text(
|
Text(
|
||||||
'${(upload.progress * 100).toInt()}%',
|
'${(upload.progress * 100).toInt()}%',
|
||||||
style: GoogleFonts.outfit(
|
style: GoogleFonts.outfit(
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
|
|
@ -168,7 +169,7 @@ class _HomeShellState extends ConsumerState<HomeShell> with WidgetsBindingObserv
|
||||||
else
|
else
|
||||||
const Icon(
|
const Icon(
|
||||||
Icons.add,
|
Icons.add,
|
||||||
color: Colors.white,
|
color: SojornColors.basicWhite,
|
||||||
size: 32,
|
size: 32,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -293,7 +294,7 @@ class _HomeShellState extends ConsumerState<HomeShell> with WidgetsBindingObserv
|
||||||
return Badge(
|
return Badge(
|
||||||
label: Text(badge.notificationCount.toString()),
|
label: Text(badge.notificationCount.toString()),
|
||||||
isLabelVisible: badge.notificationCount > 0,
|
isLabelVisible: badge.notificationCount > 0,
|
||||||
backgroundColor: Colors.redAccent,
|
backgroundColor: SojornColors.destructive,
|
||||||
child: Icon(Icons.notifications_none, color: AppTheme.navyBlue),
|
child: Icon(Icons.notifications_none, color: AppTheme.navyBlue),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
@ -330,7 +331,7 @@ class _HomeShellState extends ConsumerState<HomeShell> with WidgetsBindingObserv
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
isActive ? activeIcon : icon,
|
isActive ? activeIcon : icon,
|
||||||
color: isActive ? AppTheme.navyBlue : Colors.grey,
|
color: isActive ? AppTheme.navyBlue : SojornColors.bottomNavUnselected,
|
||||||
size: 26,
|
size: 26,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import '../../widgets/reactions/reactions_display.dart';
|
||||||
import '../../models/post.dart';
|
import '../../models/post.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/post/interactive_reply_block.dart';
|
import '../../widgets/post/interactive_reply_block.dart';
|
||||||
import '../../widgets/media/signed_media_image.dart';
|
import '../../widgets/media/signed_media_image.dart';
|
||||||
import '../compose/compose_screen.dart';
|
import '../compose/compose_screen.dart';
|
||||||
|
|
@ -266,7 +267,7 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.error, color: Colors.red, size: 48),
|
Icon(Icons.error, color: SojornColors.destructive, size: 48),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Text(
|
Text(
|
||||||
'Failed to load conversation',
|
'Failed to load conversation',
|
||||||
|
|
@ -292,7 +293,7 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
||||||
label: const Text('Retry'),
|
label: const Text('Retry'),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: AppTheme.brightNavy,
|
backgroundColor: AppTheme.brightNavy,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: SojornColors.basicWhite,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -335,7 +336,7 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
||||||
colors: [
|
colors: [
|
||||||
AppTheme.navyBlue.withValues(alpha: 0.25), // Darker at top
|
AppTheme.navyBlue.withValues(alpha: 0.25), // Darker at top
|
||||||
AppTheme.navyBlue.withValues(alpha: 0.12), // Lighter at bottom
|
AppTheme.navyBlue.withValues(alpha: 0.12), // Lighter at bottom
|
||||||
Colors.transparent, // Fade to transparent
|
SojornColors.transparent, // Fade to transparent
|
||||||
],
|
],
|
||||||
stops: const [0.0, 0.6, 1.0],
|
stops: const [0.0, 0.6, 1.0],
|
||||||
),
|
),
|
||||||
|
|
@ -489,17 +490,17 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.amber.shade800.withOpacity(0.15),
|
color: AppTheme.nsfwWarningBg,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(color: Colors.amber.shade700.withOpacity(0.3)),
|
border: Border.all(color: AppTheme.nsfwWarningBorder),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.visibility_off, size: 18, color: Colors.amber.shade700),
|
Icon(Icons.visibility_off, size: 18, color: AppTheme.nsfwWarningIcon),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text('Sensitive Content — Tap to reveal',
|
Text('Sensitive Content — Tap to reveal',
|
||||||
style: TextStyle(color: Colors.amber.shade700, fontWeight: FontWeight.w600, fontSize: 13)),
|
style: TextStyle(color: AppTheme.nsfwWarningText, fontWeight: FontWeight.w600, fontSize: 13)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -656,7 +657,7 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
||||||
backgroundColor: AppTheme.navyBlue.withValues(alpha: 0.05),
|
backgroundColor: AppTheme.navyBlue.withValues(alpha: 0.05),
|
||||||
foregroundColor: AppTheme.navyBlue,
|
foregroundColor: AppTheme.navyBlue,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
shadowColor: Colors.transparent,
|
shadowColor: SojornColors.transparent,
|
||||||
minimumSize: const Size(0, 44),
|
minimumSize: const Size(0, 44),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|
@ -865,7 +866,7 @@ class _ThreadedConversationScreenState extends ConsumerState<ThreadedConversatio
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: SojornColors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => _navigateToPost(post.id),
|
onTap: () => _navigateToPost(post.id),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue