mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-01-31 21:34:45 +01:00
chore: update l10n
This commit is contained in:
@@ -80,7 +80,8 @@ List<OneTimeCpuStatus> parseCPU(String raw) {
|
||||
if (item == '') break;
|
||||
final id = item.split(' ').first;
|
||||
final matches = item.replaceFirst(id, '').trim().split(' ');
|
||||
cpus.add(OneTimeCpuStatus(
|
||||
cpus.add(
|
||||
OneTimeCpuStatus(
|
||||
id,
|
||||
int.parse(matches[0]),
|
||||
int.parse(matches[1]),
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 476;
|
||||
static const int build = 477;
|
||||
static const String engine = "3.10.6";
|
||||
static const String buildAt = "2023-08-17 18:45:06.973608";
|
||||
static const int modifications = 5;
|
||||
static const String buildAt = "2023-08-17 21:39:55.328086";
|
||||
static const int modifications = 14;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"fullScreenJitterHelp": "Einbrennen des Bildschirms verhindern",
|
||||
"getPushTokenFailed": "Push-Token kann nicht abgerufen werden",
|
||||
"gettingToken": "Getting token...",
|
||||
"goBackQ": "Zurückkommen?",
|
||||
"goto": "Pfad öffnen",
|
||||
"homeWidgetUrlConfig": "Home-Widget-Link konfigurieren",
|
||||
"host": "Host",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"fullScreenJitterHelp": "To avoid screen burn-in",
|
||||
"getPushTokenFailed": "Can't fetch push token",
|
||||
"gettingToken": "Getting token...",
|
||||
"goBackQ": "Go back?",
|
||||
"goto": "Go to",
|
||||
"homeWidgetUrlConfig": "Config home widget url",
|
||||
"host": "Host",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"fullScreenJitterHelp": "Untuk menghindari pembakaran layar",
|
||||
"getPushTokenFailed": "Tidak bisa mengambil token dorong",
|
||||
"gettingToken": "Mendapatkan token ...",
|
||||
"goBackQ": "Datang kembali?",
|
||||
"goto": "Pergi ke",
|
||||
"homeWidgetUrlConfig": "Konfigurasi URL Widget Rumah",
|
||||
"host": "Host",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"fullScreenJitterHelp": "防止烧屏",
|
||||
"getPushTokenFailed": "未能获取到推送token",
|
||||
"gettingToken": "正在获取Token...",
|
||||
"goBackQ": "返回?",
|
||||
"goto": "前往",
|
||||
"homeWidgetUrlConfig": "桌面部件链接配置",
|
||||
"host": "主机",
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
"fullScreenJitterHelp": "防止燒屏",
|
||||
"getPushTokenFailed": "未能獲取到推送token",
|
||||
"gettingToken": "正在獲取Token...",
|
||||
"goBackQ": "返回?",
|
||||
"goto": "前往",
|
||||
"homeWidgetUrlConfig": "桌面部件鏈接配置",
|
||||
"host": "主機",
|
||||
|
||||
@@ -8,7 +8,6 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:toolbox/core/extension/navigator.dart';
|
||||
import 'package:toolbox/core/extension/uint8list.dart';
|
||||
import 'package:xterm/xterm.dart';
|
||||
|
||||
import '../../../core/route.dart';
|
||||
@@ -341,19 +340,7 @@ class _SSHPageState extends State<SSHPage> {
|
||||
),
|
||||
);
|
||||
|
||||
_discontinuityTimer = Timer.periodic(
|
||||
const Duration(seconds: 5),
|
||||
(_) async {
|
||||
var throwTimeout = true;
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
if (throwTimeout) {
|
||||
_catchTimeout();
|
||||
}
|
||||
});
|
||||
await _client?.run('echo 1').string;
|
||||
throwTimeout = false;
|
||||
},
|
||||
);
|
||||
_setupDiscontinuityTimer();
|
||||
|
||||
if (_session == null) {
|
||||
showSnackBar(context, const Text('Null session'));
|
||||
@@ -394,14 +381,30 @@ class _SSHPageState extends State<SSHPage> {
|
||||
.listen(_terminal.write);
|
||||
}
|
||||
|
||||
void _setupDiscontinuityTimer() {
|
||||
_discontinuityTimer = Timer.periodic(
|
||||
const Duration(seconds: 5),
|
||||
(_) async {
|
||||
var throwTimeout = true;
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
if (throwTimeout) {
|
||||
_catchTimeout();
|
||||
}
|
||||
});
|
||||
await _client?.ping();
|
||||
throwTimeout = false;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _catchTimeout() {
|
||||
_discontinuityTimer?.cancel();
|
||||
if (!mounted) return;
|
||||
_write('\n\nConnection lost\r\n');
|
||||
showRoundDialog(
|
||||
context: context,
|
||||
title: Text(_s.disconnected),
|
||||
child: Text('Go back?'),
|
||||
title: Text(_s.attention),
|
||||
child: Text('${_s.disconnected}\n${_s.goBackQ}'),
|
||||
barrierDismiss: false,
|
||||
actions: [
|
||||
TextButton(
|
||||
|
||||
Reference in New Issue
Block a user