relay server for android
This commit is contained in:
parent
9dadd76a8d
commit
4d64fee76d
@ -24,7 +24,7 @@ class ConnectionPage extends StatefulWidget implements PageShape {
|
|||||||
PopupMenuButton<String>(itemBuilder: (context) {
|
PopupMenuButton<String>(itemBuilder: (context) {
|
||||||
return [
|
return [
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate('ID Server')),
|
child: Text(translate('ID/Relay Server')),
|
||||||
value: "server",
|
value: "server",
|
||||||
),
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
|
@ -25,7 +25,7 @@ class SettingsPage extends StatelessWidget implements PageShape {
|
|||||||
title: Text("Common"),
|
title: Text("Common"),
|
||||||
tiles: [
|
tiles: [
|
||||||
SettingsTile.navigation(
|
SettingsTile.navigation(
|
||||||
title: Text(translate('ID Server')),
|
title: Text(translate('ID/Relay Server')),
|
||||||
leading: Icon(Icons.cloud),
|
leading: Icon(Icons.cloud),
|
||||||
onPressed: (context) {
|
onPressed: (context) {
|
||||||
showServer();
|
showServer();
|
||||||
@ -71,43 +71,49 @@ void showServer() {
|
|||||||
var key = '';
|
var key = '';
|
||||||
DialogManager.show((setState, close) {
|
DialogManager.show((setState, close) {
|
||||||
return CustomAlertDialog(
|
return CustomAlertDialog(
|
||||||
title: Text(translate('ID Server')),
|
title: Text(translate('ID/Relay Server')),
|
||||||
content: Form(
|
content: Form(
|
||||||
key: formKey,
|
key: formKey,
|
||||||
child: Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
child: Column(
|
||||||
TextFormField(
|
mainAxisSize: MainAxisSize.min,
|
||||||
initialValue: id0,
|
children: <Widget>[
|
||||||
decoration: InputDecoration(
|
TextFormField(
|
||||||
labelText: translate('ID Server'),
|
initialValue: id0,
|
||||||
),
|
decoration: InputDecoration(
|
||||||
validator: validate,
|
labelText: translate('ID Server'),
|
||||||
onSaved: (String? value) {
|
),
|
||||||
if (value != null) id = value.trim();
|
validator: validate,
|
||||||
},
|
onSaved: (String? value) {
|
||||||
),
|
if (value != null) id = value.trim();
|
||||||
/*
|
},
|
||||||
TextFormField(
|
)
|
||||||
initialValue: relay0,
|
] +
|
||||||
decoration: InputDecoration(
|
(isAndroid
|
||||||
labelText: translate('Relay Server'),
|
? [
|
||||||
|
TextFormField(
|
||||||
|
initialValue: relay0,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: translate('Relay Server'),
|
||||||
|
),
|
||||||
|
validator: validate,
|
||||||
|
onSaved: (String? value) {
|
||||||
|
if (value != null) relay = value.trim();
|
||||||
|
},
|
||||||
|
)
|
||||||
|
]
|
||||||
|
: []) +
|
||||||
|
[
|
||||||
|
TextFormField(
|
||||||
|
initialValue: key0,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: 'Key',
|
||||||
|
),
|
||||||
|
validator: null,
|
||||||
|
onSaved: (String? value) {
|
||||||
|
if (value != null) key = value.trim();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
validator: validate,
|
])),
|
||||||
onSaved: (String value) {
|
|
||||||
relay = value.trim();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
*/
|
|
||||||
TextFormField(
|
|
||||||
initialValue: key0,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: 'Key',
|
|
||||||
),
|
|
||||||
validator: null,
|
|
||||||
onSaved: (String? value) {
|
|
||||||
if (value != null) key = value.trim();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
])),
|
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
style: flatButtonStyle,
|
style: flatButtonStyle,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user