restruct mobile from servers experiment and tab
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
3ac8c32afe
commit
fc59bd332b
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
import 'package:cwtch/cwtch_icons_icons.dart';
|
import 'package:cwtch/cwtch_icons_icons.dart';
|
||||||
import 'package:cwtch/models/servers.dart';
|
import 'package:cwtch/models/servers.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
@ -189,24 +190,27 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||||
secondary: Icon(CwtchIcons.enable_groups, color: settings.current().mainTextColor()),
|
secondary: Icon(CwtchIcons.enable_groups, color: settings.current().mainTextColor()),
|
||||||
),
|
),
|
||||||
SwitchListTile(
|
Visibility(
|
||||||
title: Text(AppLocalizations.of(context)!.settingServers, style: TextStyle(color: settings.current().mainTextColor())),
|
visible: !Platform.isAndroid && !Platform.isIOS,
|
||||||
subtitle: Text(AppLocalizations.of(context)!.settingServersDescription),
|
child:
|
||||||
value: settings.isExperimentEnabled(ServerManagementExperiment),
|
SwitchListTile(
|
||||||
onChanged: (bool value) {
|
title: Text(AppLocalizations.of(context)!.settingServers, style: TextStyle(color: settings.current().mainTextColor())),
|
||||||
Provider.of<ServerListState>(context, listen: false).clear();
|
subtitle: Text(AppLocalizations.of(context)!.settingServersDescription),
|
||||||
if (value) {
|
value: settings.isExperimentEnabled(ServerManagementExperiment),
|
||||||
settings.enableExperiment(ServerManagementExperiment);
|
onChanged: (bool value) {
|
||||||
} else {
|
Provider.of<ServerListState>(context, listen: false).clear();
|
||||||
settings.disableExperiment(ServerManagementExperiment);
|
if (value) {
|
||||||
}
|
settings.enableExperiment(ServerManagementExperiment);
|
||||||
// Save Settings...
|
} else {
|
||||||
saveSettings(context);
|
settings.disableExperiment(ServerManagementExperiment);
|
||||||
},
|
}
|
||||||
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
// Save Settings...
|
||||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
saveSettings(context);
|
||||||
secondary: Icon(CwtchIcons.dns_24px, color: settings.current().mainTextColor()),
|
},
|
||||||
),
|
activeTrackColor: settings.theme.defaultButtonActiveColor(),
|
||||||
|
inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
|
||||||
|
secondary: Icon(CwtchIcons.dns_24px, color: settings.current().mainTextColor()),
|
||||||
|
)),
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
title: Text(AppLocalizations.of(context)!.settingFileSharing, style: TextStyle(color: settings.current().mainTextColor())),
|
title: Text(AppLocalizations.of(context)!.settingFileSharing, style: TextStyle(color: settings.current().mainTextColor())),
|
||||||
subtitle: Text(AppLocalizations.of(context)!.descriptionFileSharing),
|
subtitle: Text(AppLocalizations.of(context)!.descriptionFileSharing),
|
||||||
|
|
|
@ -99,7 +99,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
||||||
));
|
));
|
||||||
|
|
||||||
// Servers
|
// Servers
|
||||||
if (Provider.of<Settings>(context).isExperimentEnabled(ServerManagementExperiment)) {
|
if (Provider.of<Settings>(context).isExperimentEnabled(ServerManagementExperiment) && !Platform.isAndroid && !Platform.isIOS) {
|
||||||
actions.add(IconButton(icon: Icon(CwtchIcons.dns_black_24dp), tooltip: AppLocalizations.of(context)!.serversManagerTitleShort, onPressed: _pushServers));
|
actions.add(IconButton(icon: Icon(CwtchIcons.dns_black_24dp), tooltip: AppLocalizations.of(context)!.serversManagerTitleShort, onPressed: _pushServers));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue