Replace inline Colors.* with SojornColors tokens in profile_settings_screen.dart (56 replacements)
This commit is contained in:
parent
38f0952bc8
commit
52dfa0c653
|
|
@ -12,6 +12,7 @@ import '../../providers/theme_provider.dart' as app_theme;
|
||||||
import '../../services/image_upload_service.dart';
|
import '../../services/image_upload_service.dart';
|
||||||
import '../../services/notification_service.dart';
|
import '../../services/notification_service.dart';
|
||||||
import '../../theme/app_theme.dart';
|
import '../../theme/app_theme.dart';
|
||||||
|
import '../../theme/tokens.dart';
|
||||||
import '../../widgets/app_scaffold.dart';
|
import '../../widgets/app_scaffold.dart';
|
||||||
import '../../widgets/media/signed_media_image.dart';
|
import '../../widgets/media/signed_media_image.dart';
|
||||||
import '../../widgets/sojorn_input.dart';
|
import '../../widgets/sojorn_input.dart';
|
||||||
|
|
@ -99,19 +100,19 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
_buildEditTile(
|
_buildEditTile(
|
||||||
icon: Icons.pause_circle_outline,
|
icon: Icons.pause_circle_outline,
|
||||||
title: 'Deactivate Account',
|
title: 'Deactivate Account',
|
||||||
color: Colors.orange,
|
color: SojornColors.nsfwWarningIcon,
|
||||||
onTap: () => _showDeactivateDialog(),
|
onTap: () => _showDeactivateDialog(),
|
||||||
),
|
),
|
||||||
_buildEditTile(
|
_buildEditTile(
|
||||||
icon: Icons.delete_outline,
|
icon: Icons.delete_outline,
|
||||||
title: 'Delete Account',
|
title: 'Delete Account',
|
||||||
color: Colors.red.shade400,
|
color: SojornColors.destructive,
|
||||||
onTap: () => _showDeleteDialog(),
|
onTap: () => _showDeleteDialog(),
|
||||||
),
|
),
|
||||||
_buildEditTile(
|
_buildEditTile(
|
||||||
icon: Icons.warning_amber_rounded,
|
icon: Icons.warning_amber_rounded,
|
||||||
title: 'Immediate Destroy',
|
title: 'Immediate Destroy',
|
||||||
color: Colors.red.shade800,
|
color: const Color(0xFFC62828),
|
||||||
onTap: () => _showSuperDeleteDialog(),
|
onTap: () => _showSuperDeleteDialog(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -245,7 +246,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
border: Border.all(color: AppTheme.scaffoldBg, width: 2),
|
border: Border.all(color: AppTheme.scaffoldBg, width: 2),
|
||||||
),
|
),
|
||||||
child: const Icon(Icons.add_a_photo, size: 14, color: Colors.white),
|
child: const Icon(Icons.add_a_photo, size: 14, color: SojornColors.basicWhite),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -305,7 +306,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
const SizedBox(height: AppTheme.spacingMd),
|
const SizedBox(height: AppTheme.spacingMd),
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withOpacity(0.5),
|
color: SojornColors.basicWhite.withValues(alpha: 0.5),
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
border: Border.all(color: AppTheme.egyptianBlue.withOpacity(0.1)),
|
border: Border.all(color: AppTheme.egyptianBlue.withOpacity(0.1)),
|
||||||
),
|
),
|
||||||
|
|
@ -334,8 +335,8 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
color: Colors.white.withOpacity(0.2),
|
color: SojornColors.basicWhite.withValues(alpha: 0.2),
|
||||||
child: Icon(icon, color: Colors.white, size: 20),
|
child: Icon(icon, color: SojornColors.basicWhite, size: 20),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -378,7 +379,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: SojornColors.transparent,
|
||||||
builder: (_) => Container(
|
builder: (_) => Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppTheme.scaffoldBg,
|
color: AppTheme.scaffoldBg,
|
||||||
|
|
@ -478,7 +479,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppTheme.cardSurface,
|
color: AppTheme.cardSurface,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
border: Border.all(color: Colors.amber.shade700.withOpacity(0.25)),
|
border: Border.all(color: AppTheme.nsfwWarningBorder),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -486,7 +487,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.visibility_off_outlined, size: 20, color: Colors.amber.shade700),
|
Icon(Icons.visibility_off_outlined, size: 20, color: AppTheme.nsfwWarningIcon),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text('Content Filters', style: AppTheme.textTheme.headlineSmall),
|
Text('Content Filters', style: AppTheme.textTheme.headlineSmall),
|
||||||
],
|
],
|
||||||
|
|
@ -494,7 +495,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
'Control what content appears in your feed',
|
'Control what content appears in your feed',
|
||||||
style: AppTheme.textTheme.labelSmall?.copyWith(color: Colors.grey),
|
style: AppTheme.textTheme.labelSmall?.copyWith(color: SojornColors.textDisabled),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
|
|
@ -506,7 +507,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
: 'Enable to see posts marked as sensitive (violence, mature themes, etc). Disabled by default.',
|
: 'Enable to see posts marked as sensitive (violence, mature themes, etc). Disabled by default.',
|
||||||
),
|
),
|
||||||
value: userSettings.nsfwEnabled,
|
value: userSettings.nsfwEnabled,
|
||||||
activeColor: Colors.amber.shade700,
|
activeColor: AppTheme.nsfwWarningIcon,
|
||||||
onChanged: isUnder18
|
onChanged: isUnder18
|
||||||
? null
|
? null
|
||||||
: (v) {
|
: (v) {
|
||||||
|
|
@ -528,7 +529,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
'When enabled, NSFW posts are blurred until you tap to reveal. Disable to show them without blur.',
|
'When enabled, NSFW posts are blurred until you tap to reveal. Disable to show them without blur.',
|
||||||
),
|
),
|
||||||
value: userSettings.nsfwBlurEnabled,
|
value: userSettings.nsfwBlurEnabled,
|
||||||
activeColor: Colors.amber.shade700,
|
activeColor: AppTheme.nsfwWarningIcon,
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
if (!v) {
|
if (!v) {
|
||||||
_showDisableBlurConfirmation(userSettings);
|
_showDisableBlurConfirmation(userSettings);
|
||||||
|
|
@ -558,7 +559,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.warning_amber_rounded, color: Colors.amber.shade700, size: 28),
|
Icon(Icons.warning_amber_rounded, color: AppTheme.nsfwWarningIcon, size: 28),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
const Expanded(child: Text('Enable Sensitive Content')),
|
const Expanded(child: Text('Enable Sensitive Content')),
|
||||||
],
|
],
|
||||||
|
|
@ -570,19 +571,19 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red.shade900.withOpacity(0.1),
|
color: SojornColors.destructive.withValues(alpha: 0.1),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(color: Colors.red.shade700.withOpacity(0.3)),
|
border: Border.all(color: SojornColors.destructive.withValues(alpha: 0.3)),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.eighteen_up_rating, color: Colors.red.shade700, size: 24),
|
Icon(Icons.eighteen_up_rating, color: SojornColors.destructive, size: 24),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'You must be 18 or older to enable this feature.',
|
'You must be 18 or older to enable this feature.',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.red.shade700,
|
color: SojornColors.destructive,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
|
|
@ -611,8 +612,8 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.amber.shade700,
|
backgroundColor: AppTheme.nsfwWarningIcon,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: SojornColors.basicWhite,
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
),
|
),
|
||||||
onPressed: () => Navigator.pop(ctx, true),
|
onPressed: () => Navigator.pop(ctx, true),
|
||||||
|
|
@ -638,7 +639,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.visibility_outlined, color: Colors.amber.shade700, size: 28),
|
Icon(Icons.visibility_outlined, color: AppTheme.nsfwWarningIcon, size: 28),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
const Expanded(child: Text('Disable Content Blur')),
|
const Expanded(child: Text('Disable Content Blur')),
|
||||||
],
|
],
|
||||||
|
|
@ -650,19 +651,19 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red.shade900.withOpacity(0.1),
|
color: SojornColors.destructive.withValues(alpha: 0.1),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(color: Colors.red.shade700.withOpacity(0.3)),
|
border: Border.all(color: SojornColors.destructive.withValues(alpha: 0.3)),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.eighteen_up_rating, color: Colors.red.shade700, size: 24),
|
Icon(Icons.eighteen_up_rating, color: SojornColors.destructive, size: 24),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'You must be 18 or older. This cannot be undone without re-enabling blur.',
|
'You must be 18 or older. This cannot be undone without re-enabling blur.',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.red.shade700,
|
color: SojornColors.destructive,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
),
|
),
|
||||||
|
|
@ -689,8 +690,8 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.red.shade700,
|
backgroundColor: SojornColors.destructive,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: SojornColors.basicWhite,
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||||
),
|
),
|
||||||
onPressed: () => Navigator.pop(ctx, true),
|
onPressed: () => Navigator.pop(ctx, true),
|
||||||
|
|
@ -718,7 +719,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 5, height: 5,
|
width: 5, height: 5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.amber.shade700,
|
color: AppTheme.nsfwWarningIcon,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -739,7 +740,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: SojornColors.transparent,
|
||||||
builder: (_) => Container(
|
builder: (_) => Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppTheme.scaffoldBg,
|
color: AppTheme.scaffoldBg,
|
||||||
|
|
@ -783,7 +784,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: SojornColors.transparent,
|
||||||
builder: (_) => Container(
|
builder: (_) => Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppTheme.scaffoldBg,
|
color: AppTheme.scaffoldBg,
|
||||||
|
|
@ -820,7 +821,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: SojornColors.transparent,
|
||||||
builder: (_) => Container(
|
builder: (_) => Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppTheme.scaffoldBg,
|
color: AppTheme.scaffoldBg,
|
||||||
|
|
@ -854,7 +855,7 @@ class _ProfileSettingsScreenState extends ConsumerState<ProfileSettingsScreen> {
|
||||||
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: SojornColors.transparent,
|
||||||
builder: (_) => Container(
|
builder: (_) => Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppTheme.scaffoldBg,
|
color: AppTheme.scaffoldBg,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue