Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 70 additions & 65 deletions lib/ui/settings/app_settings/app_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:whitenoise/routing/routes.dart';
import 'package:whitenoise/src/rust/api.dart' as wn_api;
import 'package:whitenoise/ui/core/themes/assets.dart';
import 'package:whitenoise/ui/core/themes/src/extensions.dart';
import 'package:whitenoise/ui/core/ui/wn_app_bar.dart';
import 'package:whitenoise/ui/core/ui/wn_button.dart';
import 'package:whitenoise/ui/core/ui/wn_dialog.dart';
import 'package:whitenoise/ui/core/ui/wn_image.dart';
Expand Down Expand Up @@ -181,81 +182,85 @@ class AppSettingsScreen extends ConsumerWidget {
statusBarBrightness: Brightness.dark,
),
child: Scaffold(
backgroundColor: context.colors.appBarBackground,
backgroundColor: context.colors.neutral,
appBar: WnAppBar(
automaticallyImplyLeading: false,
leading: RepaintBoundary(
child: IconButton(
onPressed: () => context.pop(),
icon: WnImage(
AssetsPaths.icChevronLeft,
width: 24.w,
height: 24.w,
color: context.colors.solidPrimary,
),
),
),
title: RepaintBoundary(
child: Text(
'App Settings',
style: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w600,
color: context.colors.solidPrimary,
),
),
),
),
body: SafeArea(
bottom: false,
child: ColoredBox(
color: context.colors.neutral,
child: Column(
children: [
Gap(24.h),
Row(
children: [
IconButton(
onPressed: () => context.pop(),
icon: WnImage(
AssetsPaths.icChevronLeft,
width: 24.w,
height: 24.w,
color: context.colors.primary,
),
),
Text(
'App Settings',
style: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w600,
color: context.colors.mutedForeground,
),
),
],
),
Gap(29.h),
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
bottom: 24.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Theme',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 24.h),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
bottom: 24.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Theme',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
),
),
Gap(10.h),
_ThemeDropdown(
currentTheme: themeMode,
onThemeChanged: (newMode) {
ref.read(themeProvider.notifier).setThemeMode(newMode);
},
),
),
Gap(10.h),
_ThemeDropdown(
currentTheme: themeMode,
onThemeChanged: (newMode) {
ref.read(themeProvider.notifier).setThemeMode(newMode);
},
),
Gap(16.h),
Text(
'Danger Zone',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
Gap(16.h),
Text(
'Danger Zone',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
),
),
),
Gap(10.h),
WnFilledButton(
label: 'Delete All Data',
labelTextStyle: WnButtonSize.large.textStyle().copyWith(
color: context.colors.solidNeutralWhite,
Gap(10.h),
WnFilledButton(
label: 'Delete All Data',
labelTextStyle: WnButtonSize.large.textStyle().copyWith(
color: context.colors.solidNeutralWhite,
),
visualState: WnButtonVisualState.destructive,
onPressed: () => _deleteAllData(context, ref),
),
visualState: WnButtonVisualState.destructive,
onPressed: () => _deleteAllData(context, ref),
),
],
],
),
),
),
),
Expand Down
204 changes: 105 additions & 99 deletions lib/ui/settings/donate/donate_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:go_router/go_router.dart';
import 'package:whitenoise/config/constants.dart';
import 'package:whitenoise/ui/core/themes/assets.dart';
import 'package:whitenoise/ui/core/themes/src/extensions.dart';
import 'package:whitenoise/ui/core/ui/wn_app_bar.dart';
import 'package:whitenoise/ui/core/ui/wn_icon_button.dart';
import 'package:whitenoise/ui/core/ui/wn_image.dart';
import 'package:whitenoise/ui/core/ui/wn_text_form_field.dart';
Expand All @@ -32,120 +33,125 @@ class DonateScreen extends ConsumerWidget {
statusBarBrightness: Brightness.dark,
),
child: Scaffold(
backgroundColor: context.colors.appBarBackground,
backgroundColor: context.colors.neutral,
appBar: WnAppBar(
automaticallyImplyLeading: false,
leading: RepaintBoundary(
child: IconButton(
onPressed: () => context.pop(),
icon: WnImage(
AssetsPaths.icChevronLeft,
width: 24.w,
height: 24.w,
color: context.colors.solidPrimary,
),
),
),
title: RepaintBoundary(
child: Text(
'Donate to White Noise',
style: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w600,
color: context.colors.solidPrimary,
),
),
),
),
body: SafeArea(
bottom: false,
child: ColoredBox(
color: context.colors.neutral,
child: Column(
children: [
Gap(24.h),
Row(
children: [
IconButton(
onPressed: () => context.pop(),
icon: WnImage(
AssetsPaths.icChevronLeft,
width: 24.w,
height: 24.w,
color: context.colors.primary,
),
),
Text(
'Donate to White Noise',
style: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w600,
color: context.colors.mutedForeground,
),
),
],
),
Gap(29.h),
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
bottom: 24.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'As a not-for-profit, White Noise exists solely for your privacy and freedom, not for profit. Your support keeps us independent and uncompromised.',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w500,
color: context.colors.mutedForeground,
height: 1.4,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 24.h),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.only(
left: 16.w,
right: 16.w,
bottom: 24.w,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'As a not-for-profit, White Noise exists solely for your privacy and freedom, not for profit. Your support keeps us independent and uncompromised.',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w500,
color: context.colors.mutedForeground,
height: 1.4,
),
),
),
Gap(32.h),
Text(
'Lightning Address',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
Gap(32.h),
Text(
'Lightning Address',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
),
),
),
Gap(10.h),
Row(
children: [
Expanded(
child: WnTextFormField(
controller: TextEditingController(
text: kLightningAddress,
Gap(10.h),
Row(
children: [
Expanded(
child: WnTextFormField(
controller: TextEditingController(
text: kLightningAddress,
),
readOnly: true,
),
readOnly: true,
),
Gap(4.w),
WnIconButton(
onTap:
() => _copyToClipboard(ref, 'lightning', kLightningAddress),
iconPath: AssetsPaths.icCopy,
size: 56.h,
padding: 20.w,
),
],
),
Gap(32.h),
Text(
'Bitcoin Silent Payment Address',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
),
Gap(4.w),
WnIconButton(
onTap: () => _copyToClipboard(ref, 'lightning', kLightningAddress),
iconPath: AssetsPaths.icCopy,
size: 56.h,
padding: 20.w,
),
],
),
Gap(32.h),
Text(
'Bitcoin Silent Payment Address',
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: context.colors.primary,
),
),
Gap(10.h),
Row(
children: [
Expanded(
child: WnTextFormField(
controller: TextEditingController(
text: kBitcoinAddress,
Gap(10.h),
Row(
children: [
Expanded(
child: WnTextFormField(
controller: TextEditingController(
text: kBitcoinAddress,
),
readOnly: true,
),
readOnly: true,
),
),
Gap(4.w),
WnIconButton(
onTap:
() => _copyToClipboard(
ref,
'bitcoin',
kBitcoinAddress,
),
iconPath: AssetsPaths.icCopy,
size: 56.h,
padding: 20.w,
),
],
),
],
Gap(4.w),
WnIconButton(
onTap:
() => _copyToClipboard(
ref,
'bitcoin',
kBitcoinAddress,
),
iconPath: AssetsPaths.icCopy,
size: 56.h,
padding: 20.w,
),
],
),
],
),
),
),
),
Expand Down
Loading