mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
feat: set envs in term (#485)
This commit is contained in:
@@ -250,6 +250,9 @@ class AppRoutes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static AppRoutes kvEditor({Key? key, required Map<String, String> data}) {
|
static AppRoutes kvEditor({Key? key, required Map<String, String> data}) {
|
||||||
return AppRoutes(KvEditor(key: key, data: data), 'kv_editor');
|
return AppRoutes(
|
||||||
|
KvEditor(key: key, args: KvEditorArgs(data: data)),
|
||||||
|
'kv_editor',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ class ServerPrivateInfo {
|
|||||||
@HiveField(11)
|
@HiveField(11)
|
||||||
final WakeOnLanCfg? wolCfg;
|
final WakeOnLanCfg? wolCfg;
|
||||||
|
|
||||||
|
/// It only applies to SSH terminal.
|
||||||
|
@HiveField(12)
|
||||||
|
final Map<String, String>? envs;
|
||||||
|
|
||||||
final String id;
|
final String id;
|
||||||
|
|
||||||
const ServerPrivateInfo({
|
const ServerPrivateInfo({
|
||||||
@@ -57,6 +61,7 @@ class ServerPrivateInfo {
|
|||||||
this.jumpId,
|
this.jumpId,
|
||||||
this.custom,
|
this.custom,
|
||||||
this.wolCfg,
|
this.wolCfg,
|
||||||
|
this.envs,
|
||||||
}) : id = '$user@$ip:$port';
|
}) : id = '$user@$ip:$port';
|
||||||
|
|
||||||
static ServerPrivateInfo fromJson(Map<String, dynamic> json) {
|
static ServerPrivateInfo fromJson(Map<String, dynamic> json) {
|
||||||
@@ -76,6 +81,15 @@ class ServerPrivateInfo {
|
|||||||
final wolCfg = json["wolCfg"] == null
|
final wolCfg = json["wolCfg"] == null
|
||||||
? null
|
? null
|
||||||
: WakeOnLanCfg.fromJson(json["wolCfg"].cast<String, dynamic>());
|
: WakeOnLanCfg.fromJson(json["wolCfg"].cast<String, dynamic>());
|
||||||
|
final envs_ = json["envs"] as Map<String, dynamic>?;
|
||||||
|
final envs = <String, String>{};
|
||||||
|
if (envs_ != null) {
|
||||||
|
envs_.forEach((key, value) {
|
||||||
|
if (value is String) {
|
||||||
|
envs[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return ServerPrivateInfo(
|
return ServerPrivateInfo(
|
||||||
name: name,
|
name: name,
|
||||||
@@ -90,6 +104,7 @@ class ServerPrivateInfo {
|
|||||||
jumpId: jumpId,
|
jumpId: jumpId,
|
||||||
custom: custom,
|
custom: custom,
|
||||||
wolCfg: wolCfg,
|
wolCfg: wolCfg,
|
||||||
|
envs: envs.isEmpty ? null : envs,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +138,9 @@ class ServerPrivateInfo {
|
|||||||
if (wolCfg != null) {
|
if (wolCfg != null) {
|
||||||
data["wolCfg"] = wolCfg?.toJson();
|
data["wolCfg"] = wolCfg?.toJson();
|
||||||
}
|
}
|
||||||
|
if (envs != null) {
|
||||||
|
data["envs"] = envs;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,13 +29,14 @@ class ServerPrivateInfoAdapter extends TypeAdapter<ServerPrivateInfo> {
|
|||||||
jumpId: fields[9] as String?,
|
jumpId: fields[9] as String?,
|
||||||
custom: fields[10] as ServerCustom?,
|
custom: fields[10] as ServerCustom?,
|
||||||
wolCfg: fields[11] as WakeOnLanCfg?,
|
wolCfg: fields[11] as WakeOnLanCfg?,
|
||||||
|
envs: (fields[12] as Map?)?.cast<String, String>(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void write(BinaryWriter writer, ServerPrivateInfo obj) {
|
void write(BinaryWriter writer, ServerPrivateInfo obj) {
|
||||||
writer
|
writer
|
||||||
..writeByte(12)
|
..writeByte(13)
|
||||||
..writeByte(0)
|
..writeByte(0)
|
||||||
..write(obj.name)
|
..write(obj.name)
|
||||||
..writeByte(1)
|
..writeByte(1)
|
||||||
@@ -59,7 +60,9 @@ class ServerPrivateInfoAdapter extends TypeAdapter<ServerPrivateInfo> {
|
|||||||
..writeByte(10)
|
..writeByte(10)
|
||||||
..write(obj.custom)
|
..write(obj.custom)
|
||||||
..writeByte(11)
|
..writeByte(11)
|
||||||
..write(obj.wolCfg);
|
..write(obj.wolCfg)
|
||||||
|
..writeByte(12)
|
||||||
|
..write(obj.envs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"editorHighlightTip": "Die Leistung der aktuellen Codehervorhebung ist schlechter und kann zur Verbesserung optional ausgeschaltet werden.",
|
"editorHighlightTip": "Die Leistung der aktuellen Codehervorhebung ist schlechter und kann zur Verbesserung optional ausgeschaltet werden.",
|
||||||
"encode": "Encode",
|
"encode": "Encode",
|
||||||
|
"envVars": "Umgebungsvariable",
|
||||||
"error": "Fehler",
|
"error": "Fehler",
|
||||||
"exampleName": "Servername",
|
"exampleName": "Servername",
|
||||||
"experimentalFeature": "Experimentelles Feature",
|
"experimentalFeature": "Experimentelles Feature",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"editorHighlightTip": "The current code highlighting performance is not ideal and can be optionally turned off to improve.",
|
"editorHighlightTip": "The current code highlighting performance is not ideal and can be optionally turned off to improve.",
|
||||||
"encode": "Encode",
|
"encode": "Encode",
|
||||||
|
"envVars": "Environment variable",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"exampleName": "Example name",
|
"exampleName": "Example name",
|
||||||
"experimentalFeature": "Experimental feature",
|
"experimentalFeature": "Experimental feature",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"editorHighlightTip": "El rendimiento del resaltado de código es bastante pobre actualmente, puedes elegir desactivarlo para mejorar.",
|
"editorHighlightTip": "El rendimiento del resaltado de código es bastante pobre actualmente, puedes elegir desactivarlo para mejorar.",
|
||||||
"encode": "Codificar",
|
"encode": "Codificar",
|
||||||
|
"envVars": "Variable de entorno",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
"exampleName": "Ejemplo de nombre",
|
"exampleName": "Ejemplo de nombre",
|
||||||
"experimentalFeature": "Función experimental",
|
"experimentalFeature": "Función experimental",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Éditeur",
|
"editor": "Éditeur",
|
||||||
"editorHighlightTip": "La performance actuelle de mise en surbrillance du code est pire et peut être désactivée en option pour s'améliorer.",
|
"editorHighlightTip": "La performance actuelle de mise en surbrillance du code est pire et peut être désactivée en option pour s'améliorer.",
|
||||||
"encode": "Encoder",
|
"encode": "Encoder",
|
||||||
|
"envVars": "Variable d’environnement",
|
||||||
"error": "Erreur",
|
"error": "Erreur",
|
||||||
"exampleName": "Nom de l'exemple",
|
"exampleName": "Nom de l'exemple",
|
||||||
"experimentalFeature": "Fonctionnalité expérimentale",
|
"experimentalFeature": "Fonctionnalité expérimentale",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"editorHighlightTip": "Performa penyorotan kode saat ini lebih buruk, dan dapat dimatikan secara opsional untuk perbaikan.",
|
"editorHighlightTip": "Performa penyorotan kode saat ini lebih buruk, dan dapat dimatikan secara opsional untuk perbaikan.",
|
||||||
"encode": "Menyandi",
|
"encode": "Menyandi",
|
||||||
|
"envVars": "Variabel lingkungan",
|
||||||
"error": "Kesalahan",
|
"error": "Kesalahan",
|
||||||
"exampleName": "Nama contoh",
|
"exampleName": "Nama contoh",
|
||||||
"experimentalFeature": "Fitur eksperimental",
|
"experimentalFeature": "Fitur eksperimental",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "エディター",
|
"editor": "エディター",
|
||||||
"editorHighlightTip": "現在のコードハイライトのパフォーマンスはかなり悪いため、改善するために無効にすることを選択できます。",
|
"editorHighlightTip": "現在のコードハイライトのパフォーマンスはかなり悪いため、改善するために無効にすることを選択できます。",
|
||||||
"encode": "エンコード",
|
"encode": "エンコード",
|
||||||
|
"envVars": "環境変数",
|
||||||
"error": "エラー",
|
"error": "エラー",
|
||||||
"exampleName": "名前例",
|
"exampleName": "名前例",
|
||||||
"experimentalFeature": "実験的な機能",
|
"experimentalFeature": "実験的な機能",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"editorHighlightTip": "De huidige codehighlighting-prestaties zijn slechter en kunnen optioneel worden uitgeschakeld om te verbeteren.",
|
"editorHighlightTip": "De huidige codehighlighting-prestaties zijn slechter en kunnen optioneel worden uitgeschakeld om te verbeteren.",
|
||||||
"encode": "Coderen",
|
"encode": "Coderen",
|
||||||
|
"envVars": "Omgevingsvariabele",
|
||||||
"error": "Fout",
|
"error": "Fout",
|
||||||
"exampleName": "Voorbeeldnaam",
|
"exampleName": "Voorbeeldnaam",
|
||||||
"experimentalFeature": "Experimentele functie",
|
"experimentalFeature": "Experimentele functie",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "Editor",
|
"editor": "Editor",
|
||||||
"editorHighlightTip": "O desempenho do destaque de código atualmente é ruim, pode optar por desativá-lo para melhorar.",
|
"editorHighlightTip": "O desempenho do destaque de código atualmente é ruim, pode optar por desativá-lo para melhorar.",
|
||||||
"encode": "Codificar",
|
"encode": "Codificar",
|
||||||
|
"envVars": "Variável de ambiente",
|
||||||
"error": "Erro",
|
"error": "Erro",
|
||||||
"exampleName": "Exemplo de nome",
|
"exampleName": "Exemplo de nome",
|
||||||
"experimentalFeature": "Recurso experimental",
|
"experimentalFeature": "Recurso experimental",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "редактор",
|
"editor": "редактор",
|
||||||
"editorHighlightTip": "Текущая производительность подсветки кода неудовлетворительна, можно отключить для улучшения.",
|
"editorHighlightTip": "Текущая производительность подсветки кода неудовлетворительна, можно отключить для улучшения.",
|
||||||
"encode": "кодировать",
|
"encode": "кодировать",
|
||||||
|
"envVars": "Переменная окружения",
|
||||||
"error": "ошибка",
|
"error": "ошибка",
|
||||||
"exampleName": "пример имени",
|
"exampleName": "пример имени",
|
||||||
"experimentalFeature": "экспериментальная функция",
|
"experimentalFeature": "экспериментальная функция",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "编辑器",
|
"editor": "编辑器",
|
||||||
"editorHighlightTip": "目前的代码高亮性能较为糟糕,可以选择关闭以改善。",
|
"editorHighlightTip": "目前的代码高亮性能较为糟糕,可以选择关闭以改善。",
|
||||||
"encode": "编码",
|
"encode": "编码",
|
||||||
|
"envVars": "环境变量",
|
||||||
"error": "错误",
|
"error": "错误",
|
||||||
"exampleName": "名称示例",
|
"exampleName": "名称示例",
|
||||||
"experimentalFeature": "实验性功能",
|
"experimentalFeature": "实验性功能",
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
"editor": "編輯器",
|
"editor": "編輯器",
|
||||||
"editorHighlightTip": "目前的代碼高亮性能較為糟糕,可以選擇關閉以改善。",
|
"editorHighlightTip": "目前的代碼高亮性能較為糟糕,可以選擇關閉以改善。",
|
||||||
"encode": "編碼",
|
"encode": "編碼",
|
||||||
|
"envVars": "環境變量",
|
||||||
"error": "錯誤",
|
"error": "錯誤",
|
||||||
"exampleName": "名稱範例",
|
"exampleName": "名稱範例",
|
||||||
"experimentalFeature": "實驗性功能",
|
"experimentalFeature": "實驗性功能",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class ServerEditPage extends StatefulWidget {
|
|||||||
State<ServerEditPage> createState() => _ServerEditPageState();
|
State<ServerEditPage> createState() => _ServerEditPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ServerEditPageState extends State<ServerEditPage> {
|
class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
||||||
final _nameController = TextEditingController();
|
final _nameController = TextEditingController();
|
||||||
final _ipController = TextEditingController();
|
final _ipController = TextEditingController();
|
||||||
final _altUrlController = TextEditingController();
|
final _altUrlController = TextEditingController();
|
||||||
@@ -49,58 +49,10 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
final _autoConnect = ValueNotifier(true);
|
final _autoConnect = ValueNotifier(true);
|
||||||
final _jumpServer = ValueNotifier<String?>(null);
|
final _jumpServer = ValueNotifier<String?>(null);
|
||||||
final _pveIgnoreCert = ValueNotifier(false);
|
final _pveIgnoreCert = ValueNotifier(false);
|
||||||
|
final _env = <String, String>{}.vn;
|
||||||
|
|
||||||
var _tags = <String>[];
|
var _tags = <String>[];
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
|
|
||||||
final spi = widget.spi;
|
|
||||||
if (spi != null) {
|
|
||||||
_nameController.text = spi.name;
|
|
||||||
_ipController.text = spi.ip;
|
|
||||||
_portController.text = spi.port.toString();
|
|
||||||
_usernameController.text = spi.user;
|
|
||||||
if (spi.keyId == null) {
|
|
||||||
_passwordController.text = spi.pwd ?? '';
|
|
||||||
} else {
|
|
||||||
_keyIdx.value = Pros.key.pkis.indexWhere(
|
|
||||||
(e) => e.id == widget.spi!.keyId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// List in dart is passed by pointer, so you need to copy it here
|
|
||||||
_tags.addAll(spi.tags ?? []);
|
|
||||||
|
|
||||||
_altUrlController.text = spi.alterUrl ?? '';
|
|
||||||
_autoConnect.value = spi.autoConnect ?? true;
|
|
||||||
_jumpServer.value = spi.jumpId;
|
|
||||||
|
|
||||||
final custom = spi.custom;
|
|
||||||
if (custom != null) {
|
|
||||||
_pveAddrCtrl.text = custom.pveAddr ?? '';
|
|
||||||
_pveIgnoreCert.value = custom.pveIgnoreCert;
|
|
||||||
try {
|
|
||||||
// Add a null check here to prevent setting `null` to the controller
|
|
||||||
final encoded = json.encode(custom.cmds!);
|
|
||||||
if (encoded.isNotEmpty) {
|
|
||||||
_customCmdCtrl.text = encoded;
|
|
||||||
}
|
|
||||||
} catch (_) {}
|
|
||||||
_preferTempDevCtrl.text = custom.preferTempDev ?? '';
|
|
||||||
_logoUrlCtrl.text = custom.logoUrl ?? '';
|
|
||||||
}
|
|
||||||
|
|
||||||
final wol = spi.wolCfg;
|
|
||||||
if (wol != null) {
|
|
||||||
_wolMacCtrl.text = wol.mac;
|
|
||||||
_wolIpCtrl.text = wol.ip;
|
|
||||||
_wolPwdCtrl.text = wol.pwd ?? '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@@ -246,6 +198,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
_buildAuth(),
|
_buildAuth(),
|
||||||
|
_buildEnvs(),
|
||||||
_buildJumpServer(),
|
_buildJumpServer(),
|
||||||
_buildMore(),
|
_buildMore(),
|
||||||
];
|
];
|
||||||
@@ -302,12 +255,13 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildKeyAuth() {
|
Widget _buildKeyAuth() {
|
||||||
|
const padding = EdgeInsets.only(left: 23, right: 13);
|
||||||
return Consumer<PrivateKeyProvider>(
|
return Consumer<PrivateKeyProvider>(
|
||||||
builder: (_, key, __) {
|
builder: (_, key, __) {
|
||||||
final tiles = List<Widget>.generate(key.pkis.length, (index) {
|
final tiles = List<Widget>.generate(key.pkis.length, (index) {
|
||||||
final e = key.pkis[index];
|
final e = key.pkis[index];
|
||||||
return ListTile(
|
return ListTile(
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
|
contentPadding: padding,
|
||||||
leading: Text(
|
leading: Text(
|
||||||
'#${index + 1}',
|
'#${index + 1}',
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
||||||
@@ -329,7 +283,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
tiles.add(
|
tiles.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(l10n.addPrivateKey),
|
title: Text(l10n.addPrivateKey),
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 17),
|
contentPadding: padding,
|
||||||
trailing: const Padding(
|
trailing: const Padding(
|
||||||
padding: EdgeInsets.only(right: 13),
|
padding: EdgeInsets.only(right: 13),
|
||||||
child: Icon(Icons.add),
|
child: Icon(Icons.add),
|
||||||
@@ -347,6 +301,31 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildEnvs() {
|
||||||
|
return _env.listenVal((val) {
|
||||||
|
final subtitle = val.isEmpty
|
||||||
|
? null
|
||||||
|
: Text(val.keys.join(','), style: UIs.textGrey);
|
||||||
|
return ListTile(
|
||||||
|
leading: const Padding(
|
||||||
|
padding: EdgeInsets.only(left: 10),
|
||||||
|
child: Icon(HeroIcons.variable),
|
||||||
|
),
|
||||||
|
subtitle: subtitle,
|
||||||
|
title: Text(l10n.envVars),
|
||||||
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
|
onTap: () async {
|
||||||
|
final res = await KvEditor.route.go(
|
||||||
|
context,
|
||||||
|
args: KvEditorArgs(data: widget.spi?.envs ?? {}),
|
||||||
|
);
|
||||||
|
if (res == null) return;
|
||||||
|
_env.value = res;
|
||||||
|
},
|
||||||
|
).cardx;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildMore() {
|
Widget _buildMore() {
|
||||||
return ExpandTile(
|
return ExpandTile(
|
||||||
title: Text(l10n.more),
|
title: Text(l10n.more),
|
||||||
@@ -630,6 +609,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
jumpId: _jumpServer.value,
|
jumpId: _jumpServer.value,
|
||||||
custom: custom,
|
custom: custom,
|
||||||
wolCfg: wol,
|
wolCfg: wol,
|
||||||
|
envs: _env.value.isEmpty ? null : _env.value,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (widget.spi == null) {
|
if (widget.spi == null) {
|
||||||
@@ -655,4 +635,53 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
|||||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
trailing: const Icon(Icons.keyboard_arrow_right),
|
||||||
).cardx;
|
).cardx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void afterFirstLayout(BuildContext context) {
|
||||||
|
final spi = widget.spi;
|
||||||
|
if (spi != null) {
|
||||||
|
_nameController.text = spi.name;
|
||||||
|
_ipController.text = spi.ip;
|
||||||
|
_portController.text = spi.port.toString();
|
||||||
|
_usernameController.text = spi.user;
|
||||||
|
if (spi.keyId == null) {
|
||||||
|
_passwordController.text = spi.pwd ?? '';
|
||||||
|
} else {
|
||||||
|
_keyIdx.value = Pros.key.pkis.indexWhere(
|
||||||
|
(e) => e.id == widget.spi!.keyId,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// List in dart is passed by pointer, so you need to copy it here
|
||||||
|
_tags.addAll(spi.tags ?? []);
|
||||||
|
|
||||||
|
_altUrlController.text = spi.alterUrl ?? '';
|
||||||
|
_autoConnect.value = spi.autoConnect ?? true;
|
||||||
|
_jumpServer.value = spi.jumpId;
|
||||||
|
|
||||||
|
final custom = spi.custom;
|
||||||
|
if (custom != null) {
|
||||||
|
_pveAddrCtrl.text = custom.pveAddr ?? '';
|
||||||
|
_pveIgnoreCert.value = custom.pveIgnoreCert;
|
||||||
|
try {
|
||||||
|
// Add a null check here to prevent setting `null` to the controller
|
||||||
|
final encoded = json.encode(custom.cmds!);
|
||||||
|
if (encoded.isNotEmpty) {
|
||||||
|
_customCmdCtrl.text = encoded;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
_preferTempDevCtrl.text = custom.preferTempDev ?? '';
|
||||||
|
_logoUrlCtrl.text = custom.logoUrl ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
final wol = spi.wolCfg;
|
||||||
|
if (wol != null) {
|
||||||
|
_wolMacCtrl.text = wol.mac;
|
||||||
|
_wolIpCtrl.text = wol.ip;
|
||||||
|
_wolPwdCtrl.text = wol.pwd ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
_env.value = spi.envs ?? {};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -393,12 +393,13 @@ class SSHPageState extends State<SSHPage>
|
|||||||
width: _terminal.viewWidth,
|
width: _terminal.viewWidth,
|
||||||
height: _terminal.viewHeight,
|
height: _terminal.viewHeight,
|
||||||
),
|
),
|
||||||
|
environment: widget.spi.envs,
|
||||||
);
|
);
|
||||||
|
|
||||||
//_setupDiscontinuityTimer();
|
//_setupDiscontinuityTimer();
|
||||||
|
|
||||||
if (session == null) {
|
if (session == null) {
|
||||||
_writeLn('Null session');
|
_writeLn('Null session, please back and retry\r\n');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -385,8 +385,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "v1.0.82"
|
ref: "v1.0.84"
|
||||||
resolved-ref: "424b976ff383222f49cd6053c79340597a5a8429"
|
resolved-ref: "4069be5204fb1866ca72b702df47fa334b189d1a"
|
||||||
url: "https://github.com/lppcg/fl_lib"
|
url: "https://github.com/lppcg/fl_lib"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ dependencies:
|
|||||||
fl_lib:
|
fl_lib:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lppcg/fl_lib
|
url: https://github.com/lppcg/fl_lib
|
||||||
ref: v1.0.82
|
ref: v1.0.84
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
# dartssh2:
|
# dartssh2:
|
||||||
|
|||||||
Reference in New Issue
Block a user