mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-18 17:41:27 +03:00
mobile virtual display, resolution menu, proxy setting (#8717)
1. Merge code of mobile and desktop virtual display menu. 2. Mobile add seperate resolution menu, only support changing resolutions. 3. Android add proxy setting Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common/widgets/setting_widgets.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
@@ -83,6 +84,8 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
var _fingerprint = "";
|
||||
var _buildDate = "";
|
||||
var _autoDisconnectTimeout = "";
|
||||
var _hideServer = false;
|
||||
var _hideProxy = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -109,6 +112,8 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
bind.mainGetOptionSync(key: kOptionAllowAutoDisconnect));
|
||||
_autoDisconnectTimeout =
|
||||
bind.mainGetOptionSync(key: kOptionAutoDisconnectTimeout);
|
||||
_hideServer = bind.mainGetLocalOption(key: kOptionHideServerSetting) == 'Y';
|
||||
_hideProxy = bind.mainGetLocalOption(key: kOptionHideProxySetting) == 'Y';
|
||||
|
||||
() async {
|
||||
var update = false;
|
||||
@@ -553,13 +558,20 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
],
|
||||
),
|
||||
SettingsSection(title: Text(translate("Settings")), tiles: [
|
||||
if (!disabledSettings)
|
||||
if (!disabledSettings && !_hideServer)
|
||||
SettingsTile(
|
||||
title: Text(translate('ID/Relay Server')),
|
||||
leading: Icon(Icons.cloud),
|
||||
onPressed: (context) {
|
||||
showServerSettings(gFFI.dialogManager);
|
||||
}),
|
||||
if (!isIOS && !_hideProxy)
|
||||
SettingsTile(
|
||||
title: Text(translate('Socks5/Http(s) Proxy')),
|
||||
leading: Icon(Icons.network_ping),
|
||||
onPressed: (context) {
|
||||
changeSocks5Proxy();
|
||||
}),
|
||||
SettingsTile(
|
||||
title: Text(translate('Language')),
|
||||
leading: Icon(Icons.translate),
|
||||
|
||||
Reference in New Issue
Block a user