refactor(ui): move Download Network and Auto Export settings higher

- Relocate Download Network and Auto Export Failed settings
- Now appears after File Settings, before Storage Access section
- Grouped together under 'Download' section header
- More visible and easier to access
This commit is contained in:
zarzet
2026-02-03 15:22:43 +07:00
parent 88f9a65d11
commit 39ce22a9e2
2 changed files with 30 additions and 64 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
- Choose between "WiFi + Mobile Data" or "WiFi Only"
- Downloads automatically pause on mobile data and resume on WiFi
- **Cloud Save Settings (UI Only)**: New settings page for cloud/NAS upload configuration
- **Cloud Save Settings**: New settings page for cloud/NAS upload configuration
- Settings > Cloud Save - configure auto-upload to NAS or cloud storage
- Support for WebDAV (Synology, Nextcloud, QNAP) and SFTP providers
- Server URL, username, password, and remote path configuration
@@ -334,6 +334,35 @@ class _DownloadSettingsPageState extends ConsumerState<DownloadSettingsPage> {
),
),
// Download Network Mode
SliverToBoxAdapter(
child: SettingsSectionHeader(title: context.l10n.sectionDownload),
),
SliverToBoxAdapter(
child: SettingsGroup(
children: [
SettingsItem(
icon: Icons.wifi,
title: context.l10n.settingsDownloadNetwork,
subtitle: settings.downloadNetworkMode == 'wifi_only'
? context.l10n.settingsDownloadNetworkWifiOnly
: context.l10n.settingsDownloadNetworkAny,
onTap: () => _showNetworkModePicker(context, ref, settings.downloadNetworkMode),
),
SettingsSwitchItem(
icon: Icons.file_download_outlined,
title: context.l10n.settingsAutoExportFailed,
subtitle: context.l10n.settingsAutoExportFailedSubtitle,
value: settings.autoExportFailedDownloads,
onChanged: (value) {
ref.read(settingsProvider.notifier).setAutoExportFailedDownloads(value);
},
showDivider: false,
),
],
),
),
// All Files Access section (Android 13+ only)
if (Platform.isAndroid && _androidSdkVersion >= 33) ...[
SliverToBoxAdapter(
@@ -387,69 +416,6 @@ class _DownloadSettingsPageState extends ConsumerState<DownloadSettingsPage> {
),
],
const SliverToBoxAdapter(child: SizedBox(height: 16)),
// Auto Export Failed Downloads
SliverToBoxAdapter(
child: SettingsGroup(
children: [
SettingsSwitchItem(
icon: Icons.file_download_outlined,
title: context.l10n.settingsAutoExportFailed,
subtitle: context.l10n.settingsAutoExportFailedSubtitle,
value: settings.autoExportFailedDownloads,
onChanged: (value) {
ref.read(settingsProvider.notifier).setAutoExportFailedDownloads(value);
},
showDivider: false,
),
],
),
),
const SliverToBoxAdapter(child: SizedBox(height: 16)),
// Download Network Mode
SliverToBoxAdapter(
child: SettingsGroup(
children: [
SettingsItem(
icon: Icons.wifi,
title: context.l10n.settingsDownloadNetwork,
subtitle: settings.downloadNetworkMode == 'wifi_only'
? context.l10n.settingsDownloadNetworkWifiOnly
: context.l10n.settingsDownloadNetworkAny,
onTap: () => _showNetworkModePicker(context, ref, settings.downloadNetworkMode),
showDivider: false,
),
],
),
),
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(
Icons.info_outline,
size: 16,
color: colorScheme.onSurfaceVariant,
),
const SizedBox(width: 8),
Expanded(
child: Text(
context.l10n.settingsDownloadNetworkSubtitle,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: colorScheme.onSurfaceVariant,
),
),
),
],
),
),
),
const SliverToBoxAdapter(child: SizedBox(height: 32)),
],
),