mirror of
https://github.com/foss42/apidash.git
synced 2025-06-01 23:45:19 +08:00
Re-arrange settings
This commit is contained in:
@ -40,21 +40,6 @@ class SettingsPage extends ConsumerWidget {
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
!kIsWeb
|
||||
? SwitchListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('Disable SSL verification'),
|
||||
subtitle: Text(
|
||||
'Current selection: ${settings.isSSLDisabled ? "SSL Verification Disabled" : "SSL Verification Enabled"}',
|
||||
),
|
||||
value: settings.isSSLDisabled,
|
||||
onChanged: (bool? value) {
|
||||
ref
|
||||
.read(settingsProvider.notifier)
|
||||
.update(isSSLDisabled: value ?? false);
|
||||
},
|
||||
)
|
||||
: kSizedBoxEmpty,
|
||||
SwitchListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('Switch Theme Mode'),
|
||||
@ -91,6 +76,21 @@ class SettingsPage extends ConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
!kIsWeb
|
||||
? SwitchListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('Disable SSL verification'),
|
||||
subtitle: Text(
|
||||
'Current selection: ${settings.isSSLDisabled ? "SSL Verification Disabled" : "SSL Verification Enabled"}',
|
||||
),
|
||||
value: settings.isSSLDisabled,
|
||||
onChanged: (bool? value) {
|
||||
ref
|
||||
.read(settingsProvider.notifier)
|
||||
.update(isSSLDisabled: value ?? false);
|
||||
},
|
||||
)
|
||||
: kSizedBoxEmpty,
|
||||
ListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('Default Code Generator'),
|
||||
@ -125,6 +125,20 @@ class SettingsPage extends ConsumerWidget {
|
||||
.update(promptBeforeClosing: value);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('History Retention Period'),
|
||||
subtitle: Text(
|
||||
'Your request history will be retained${settings.historyRetentionPeriod == HistoryRetentionPeriod.forever ? "" : " for"} ${settings.historyRetentionPeriod.label}'),
|
||||
trailing: HistoryRetentionPopupMenu(
|
||||
value: settings.historyRetentionPeriod,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(settingsProvider.notifier)
|
||||
.update(historyRetentionPeriod: value);
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('Export Data'),
|
||||
@ -144,20 +158,6 @@ class SettingsPage extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('History Retention Period'),
|
||||
subtitle: Text(
|
||||
'Your request history will be retained${settings.historyRetentionPeriod == HistoryRetentionPeriod.forever ? "" : " for"} ${settings.historyRetentionPeriod.label}'),
|
||||
trailing: HistoryRetentionPopupMenu(
|
||||
value: settings.historyRetentionPeriod,
|
||||
onChanged: (value) {
|
||||
ref
|
||||
.read(settingsProvider.notifier)
|
||||
.update(historyRetentionPeriod: value);
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
hoverColor: kColorTransparent,
|
||||
title: const Text('Clear Data'),
|
||||
|
Reference in New Issue
Block a user