mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 15:54:35 +01:00
set LANG in shell
This commit is contained in:
@@ -247,8 +247,7 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
applicationIcon: _buildIcon(),
|
||||
aboutBoxChildren: [
|
||||
UrlText(
|
||||
text: s.madeWithLove(myGithub),
|
||||
replace: 'LollipopKit'),
|
||||
text: s.madeWithLove(myGithub), replace: 'LollipopKit'),
|
||||
UrlText(
|
||||
text: s.aboutThanks(rainSunMeGithub),
|
||||
replace: 'RainSunMe',
|
||||
|
||||
@@ -75,7 +75,10 @@ class _PingPageState extends State<PingPage>
|
||||
title: Text(result.serverName,
|
||||
style: TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.bold, color: primaryColor)),
|
||||
subtitle: Text(_buildPingSummary(result, unknown, ms), style: summaryTextStyle,),
|
||||
subtitle: Text(
|
||||
_buildPingSummary(result, unknown, ms),
|
||||
style: summaryTextStyle,
|
||||
),
|
||||
trailing: Text(
|
||||
s.pingAvg +
|
||||
(result.statistic?.avg?.toStringAsFixed(2) ?? s.unknown) +
|
||||
|
||||
@@ -92,8 +92,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage>
|
||||
final key = keyController.text;
|
||||
final pwd = pwdController.text;
|
||||
if (name.isEmpty || key.isEmpty) {
|
||||
showSnackBar(
|
||||
context, Text(s.fieldMustNotEmpty));
|
||||
showSnackBar(context, Text(s.fieldMustNotEmpty));
|
||||
return;
|
||||
}
|
||||
FocusScope.of(context).unfocus();
|
||||
|
||||
@@ -60,26 +60,22 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
||||
widget.spi != null
|
||||
? IconButton(
|
||||
onPressed: () {
|
||||
showRoundDialog(
|
||||
context,
|
||||
'Attention',
|
||||
Text(
|
||||
s.sureToDeleteServer(widget.spi!.name)),
|
||||
[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
_serverProvider.delServer(widget.spi!);
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
s.ok,
|
||||
style: const TextStyle(color: Colors.red),
|
||||
)),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(s.cancel))
|
||||
]);
|
||||
showRoundDialog(context, 'Attention',
|
||||
Text(s.sureToDeleteServer(widget.spi!.name)), [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
_serverProvider.delServer(widget.spi!);
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(
|
||||
s.ok,
|
||||
style: const TextStyle(color: Colors.red),
|
||||
)),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(s.cancel))
|
||||
]);
|
||||
},
|
||||
icon: const Icon(Icons.delete))
|
||||
: const SizedBox()
|
||||
@@ -93,8 +89,8 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
||||
TextField(
|
||||
controller: nameController,
|
||||
keyboardType: TextInputType.text,
|
||||
decoration:
|
||||
buildDecoration(s.name, icon: Icons.info, hint: s.exampleName),
|
||||
decoration: buildDecoration(s.name,
|
||||
icon: Icons.info, hint: s.exampleName),
|
||||
),
|
||||
TextField(
|
||||
controller: ipController,
|
||||
|
||||
@@ -30,7 +30,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
||||
super.initState();
|
||||
_provider = locator<SnippetProvider>();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
|
||||
@@ -122,7 +122,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
|
||||
TextButton(
|
||||
onPressed: () async =>
|
||||
await _import(_importFieldController.text.trim()),
|
||||
child: Text('GO'),
|
||||
child: const Text('GO'),
|
||||
)
|
||||
]);
|
||||
}
|
||||
@@ -246,11 +246,9 @@ class _SnippetListPageState extends State<SnippetListPage> {
|
||||
]));
|
||||
}), [
|
||||
TextButton(
|
||||
onPressed: () async => run(context, snippet),
|
||||
child: Text(s.run)),
|
||||
onPressed: () async => run(context, snippet), child: Text(s.run)),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(s.cancel)),
|
||||
onPressed: () => Navigator.of(context).pop(), child: Text(s.cancel)),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -261,8 +259,7 @@ class _SnippetListPageState extends State<SnippetListPage> {
|
||||
showRoundDialog(context, s.result,
|
||||
Text(result, style: const TextStyle(fontSize: 13)), [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(s.close))
|
||||
onPressed: () => Navigator.of(context).pop(), child: Text(s.close))
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user