Skip to content

Commit 0573411

Browse files
authored
Merge pull request #1697 from SatoshiPortal/refactor-settings
refactor: re-arrange settings and icons
2 parents 46334f1 + 3aa15c5 commit 0573411

8 files changed

Lines changed: 85 additions & 69 deletions

File tree

lib/features/backup_settings/ui/screens/backup_settings_screen.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,14 @@ class _Screen extends StatelessWidget {
5959
child: _BackupTestStatusWidget(),
6060
),
6161
const Gap(40),
62+
const _StartBackupButton(),
6263
if (state.lastEncryptedBackup != null)
6364
const _ViewVaultKeyButton(),
6465
if (state.lastEncryptedBackup != null ||
6566
state.lastPhysicalBackup != null)
6667
const _TestBackupButton(),
67-
const _StartBackupButton(),
68-
const _Bip329LabelsButton(),
6968
const _RecoverBullSettingsButton(),
70-
const Gap(20),
69+
const _Bip329LabelsButton(),
7170
if (state.error != null) ErrorWidget(error: state.error!),
7271
],
7372
),
@@ -155,7 +154,8 @@ class _StartBackupButton extends StatelessWidget {
155154
@override
156155
Widget build(BuildContext context) {
157156
return SettingsEntryItem(
158-
icon: Icons.backup,
157+
icon: Icons.save_as,
158+
iconColor: context.appColors.primary,
159159
title: context.loc.backupSettingsStartBackup,
160160
onTap: () => context.pushNamed(
161161
BackupSettingsSubroute.backupOptions.name,
@@ -243,7 +243,7 @@ class _Bip329LabelsButton extends StatelessWidget {
243243
@override
244244
Widget build(BuildContext context) {
245245
return SettingsEntryItem(
246-
icon: Icons.label,
246+
icon: Icons.sell,
247247
title: context.loc.backupSettingsLabelsButton,
248248
onTap: () => context.push(Bip329LabelsRouter.route.path),
249249
);
@@ -256,7 +256,7 @@ class _RecoverBullSettingsButton extends StatelessWidget {
256256
@override
257257
Widget build(BuildContext context) {
258258
return SettingsEntryItem(
259-
icon: Icons.settings,
259+
icon: Icons.cloud_circle,
260260
iconColor: context.appColors.secondary,
261261
textColor: context.appColors.secondary,
262262
title: context.loc.backupSettingsRecoverBullSettings,

lib/features/settings/ui/screens/all_settings_screen.dart

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class _AllSettingsScreenState extends State<AllSettingsScreen> {
5757
child: Column(
5858
children: [
5959
SettingsEntryItem(
60-
icon: Icons.account_balance_wallet,
60+
icon: Icons.currency_exchange,
6161
title: context.loc.settingsExchangeSettingsTitle,
6262
onTap: () {
6363
if (Platform.isIOS) {
@@ -93,7 +93,7 @@ class _AllSettingsScreenState extends State<AllSettingsScreen> {
9393
},
9494
),
9595
SettingsEntryItem(
96-
icon: Icons.save_alt,
96+
icon: Icons.save,
9797
title: context.loc.settingsWalletBackupTitle,
9898
onTap: () {
9999
context.pushNamed(SettingsRoute.backupSettings.name);
@@ -107,28 +107,7 @@ class _AllSettingsScreenState extends State<AllSettingsScreen> {
107107
},
108108
),
109109
SettingsEntryItem(
110-
icon: Icons.security,
111-
title: context.loc.settingsSecurityPinTitle,
112-
onTap: () {
113-
context.pushNamed(SettingsRoute.pinCode.name);
114-
},
115-
),
116-
SettingsEntryItem(
117-
icon: Icons.attach_money,
118-
title: context.loc.settingsCurrencyTitle,
119-
onTap: () {
120-
context.pushNamed(SettingsRoute.currency.name);
121-
},
122-
),
123-
SettingsEntryItem(
124-
icon: Icons.palette,
125-
title: 'Theme',
126-
onTap: () {
127-
context.pushNamed(SettingsRoute.theme.name);
128-
},
129-
),
130-
SettingsEntryItem(
131-
icon: Icons.settings,
110+
icon: Icons.app_settings_alt,
132111
title: context.loc.settingsAppSettingsTitle,
133112
onTap: () {
134113
context.pushNamed(SettingsRoute.appSettings.name);

lib/features/settings/ui/screens/app_settings/app_settings_screen.dart

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,6 @@ class AppSettingsScreen extends StatelessWidget {
3030
padding: const EdgeInsets.symmetric(horizontal: 16),
3131
child: Column(
3232
children: [
33-
SettingsEntryItem(
34-
icon: Icons.article,
35-
title: context.loc.logSettingsLogsTitle,
36-
onTap: () {
37-
context.pushNamed(SettingsRoute.logs.name);
38-
},
39-
),
40-
SettingsEntryItem(
41-
icon: Icons.security,
42-
title: context.loc.settingsTorSettingsTitle,
43-
onTap: () {
44-
context.pushNamed(TorSettingsRoute.torSettings.name);
45-
},
46-
),
4733
SettingsEntryItem(
4834
icon: Icons.language,
4935
title: context.loc.settingsLanguageTitle,
@@ -67,9 +53,44 @@ class AppSettingsScreen extends StatelessWidget {
6753
},
6854
),
6955
),
56+
SettingsEntryItem(
57+
icon: Icons.palette,
58+
title: context.loc.settingsThemeTitle,
59+
onTap: () {
60+
context.pushNamed(SettingsRoute.theme.name);
61+
},
62+
),
63+
SettingsEntryItem(
64+
icon: Icons.attach_money,
65+
title: context.loc.settingsCurrencyTitle,
66+
onTap: () {
67+
context.pushNamed(SettingsRoute.currency.name);
68+
},
69+
),
70+
SettingsEntryItem(
71+
icon: Icons.fiber_pin,
72+
title: context.loc.settingsSecurityPinTitle,
73+
onTap: () {
74+
context.pushNamed(SettingsRoute.pinCode.name);
75+
},
76+
),
77+
SettingsEntryItem(
78+
icon: Icons.vpn_lock,
79+
title: context.loc.settingsTorSettingsTitle,
80+
onTap: () {
81+
context.pushNamed(TorSettingsRoute.torSettings.name);
82+
},
83+
),
84+
SettingsEntryItem(
85+
icon: Icons.article,
86+
title: context.loc.logSettingsLogsTitle,
87+
onTap: () {
88+
context.pushNamed(SettingsRoute.logs.name);
89+
},
90+
),
7091
if (isSuperuser)
7192
SettingsEntryItem(
72-
icon: Icons.developer_mode,
93+
icon: Icons.logo_dev,
7394
title: context.loc.appSettingsDevModeTitle,
7495
trailing: const DevModeSwitch(),
7596
),

lib/features/settings/ui/screens/bitcoin/bitcoin_settings_screen.dart

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,28 @@ class BitcoinSettingsScreen extends StatelessWidget {
4747
},
4848
),
4949
SettingsEntryItem(
50-
icon: Icons.settings_input_component,
50+
icon: Icons.sim_card_download,
51+
title: context.loc.bitcoinSettingsImportWalletTitle,
52+
onTap: () => context.pushNamed(
53+
ImportWalletRoute.importWalletHome.name,
54+
),
55+
),
56+
SettingsEntryItem(
57+
icon: Icons.swap_horiz,
58+
title: context.loc.bitcoinSettingsAutoTransferTitle,
59+
onTap: () {
60+
context.pushNamed(SettingsRoute.autoswapSettings.name);
61+
},
62+
),
63+
SettingsEntryItem(
64+
icon: Icons.satellite_alt,
65+
title: context.loc.bitcoinSettingsBroadcastTransactionTitle,
66+
onTap: () => context.pushNamed(
67+
BroadcastSignedTxRoute.broadcastHome.name,
68+
),
69+
),
70+
SettingsEntryItem(
71+
icon: Icons.hub,
5172
title: context.loc.bitcoinSettingsElectrumServerTitle,
5273
onTap: () {
5374
context.pushNamed(
@@ -56,19 +77,12 @@ class BitcoinSettingsScreen extends StatelessWidget {
5677
},
5778
),
5879
SettingsEntryItem(
59-
icon: Icons.analytics,
80+
icon: Icons.memory,
6081
title: context.loc.bitcoinSettingsMempoolServerTitle,
6182
onTap: () {
6283
context.pushNamed(MempoolSettingsRoute.name);
6384
},
6485
),
65-
SettingsEntryItem(
66-
icon: Icons.swap_horiz,
67-
title: context.loc.bitcoinSettingsAutoTransferTitle,
68-
onTap: () {
69-
context.pushNamed(SettingsRoute.autoswapSettings.name);
70-
},
71-
),
7286
if (hasLegacySeeds)
7387
SettingsEntryItem(
7488
icon: Icons.vpn_key,
@@ -77,20 +91,6 @@ class BitcoinSettingsScreen extends StatelessWidget {
7791
context.pushNamed(SettingsRoute.legacySeeds.name);
7892
},
7993
),
80-
SettingsEntryItem(
81-
icon: Icons.download,
82-
title: context.loc.bitcoinSettingsImportWalletTitle,
83-
onTap: () => context.pushNamed(
84-
ImportWalletRoute.importWalletHome.name,
85-
),
86-
),
87-
SettingsEntryItem(
88-
icon: Icons.satellite_alt,
89-
title: context.loc.bitcoinSettingsBroadcastTransactionTitle,
90-
onTap: () => context.pushNamed(
91-
BroadcastSignedTxRoute.broadcastHome.name,
92-
),
93-
),
9494
if (isSuperuser)
9595
SettingsEntryItem(
9696
icon: Icons.science,

localization/app_en.arb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@
360360
"@settingsLanguageTitle": {
361361
"description": "Title for the language selection in app settings"
362362
},
363+
"settingsThemeTitle": "Theme",
364+
"@settingsThemeTitle": {
365+
"description": "Title for the theme selection in app settings"
366+
},
363367
"settingsArkTitle": "Ark",
364368
"@settingsArkTitle": {
365369
"description": "Title for the Ark protocol section in Bitcoin settings"
@@ -12175,4 +12179,4 @@
1217512179
}
1217612180
}
1217712181
}
12178-
}
12182+
}

localization/app_es.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@
360360
"@settingsLanguageTitle": {
361361
"description": "Title for the language selection in app settings"
362362
},
363+
"settingsThemeTitle": "Tema",
364+
"@settingsThemeTitle": {
365+
"description": "Title for the theme selection in app settings"
366+
},
363367
"settingsArkTitle": "Ark",
364368
"@settingsArkTitle": {
365369
"description": "Title for the Ark protocol section in Bitcoin settings"

localization/app_fi.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@
208208
"@settingsLanguageTitle": {
209209
"description": "Title for the language selection in app settings"
210210
},
211+
"settingsThemeTitle": "Teema",
212+
"@settingsThemeTitle": {
213+
"description": "Title for the theme selection in app settings"
214+
},
211215
"settingsArkTitle": "Ark",
212216
"@settingsArkTitle": {
213217
"description": "Title for the Ark protocol section in Bitcoin settings"

localization/app_fr.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@
360360
"@settingsLanguageTitle": {
361361
"description": "Title for the language selection in app settings"
362362
},
363+
"settingsThemeTitle": "Thème",
364+
"@settingsThemeTitle": {
365+
"description": "Title for the theme selection in app settings"
366+
},
363367
"settingsArkTitle": "Ark",
364368
"@settingsArkTitle": {
365369
"description": "Title for the Ark protocol section in Bitcoin settings"

0 commit comments

Comments
 (0)