Skip to content

Commit

Permalink
fix: hide system proxy settings on web
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Mar 1, 2024
1 parent ef25279 commit 118aad5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
23 changes: 12 additions & 11 deletions lib/view/pages/settings/client/chore_setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ class ChoreSetting extends StatelessWidget {
child: ExpansionTile(
title: const Text('杂项'),
children: [
ListTile(
title: const Text('使用系统代理(实验性)'),
trailing: Switch(
value: state.useSystemProxy ?? false,
onChanged: (value) {
context
.read<ClientSettingBloc>()
.add(ChangeUseSystemProxyEvent(value));
},
),
)
if (!PlatformHelper.isWeb())
ListTile(
title: const Text('使用系统代理(实验性)'),
trailing: Switch(
value: state.useSystemProxy ?? false,
onChanged: (value) {
context
.read<ClientSettingBloc>()
.add(ChangeUseSystemProxyEvent(value));
},
),
)
],
),
),
Expand Down
1 change: 1 addition & 0 deletions lib/view/pages/settings/client/client_setting_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';

import '../../../../bloc/client_setting/client_setting_bloc.dart';
import '../../../../bloc/main_bloc.dart';
import '../../../../common/platform.dart';
import '../../../../consts.dart';
import '../../../../l10n/l10n.dart';
import '../../../helper/spacing.dart';
Expand Down

0 comments on commit 118aad5

Please sign in to comment.