mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 15:54:35 +01:00
fix: snippet tag
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:provider/provider.dart';
|
||||
import 'package:toolbox/core/extension/context/common.dart';
|
||||
import 'package:toolbox/core/extension/context/dialog.dart';
|
||||
import 'package:toolbox/core/extension/context/locale.dart';
|
||||
import 'package:toolbox/core/extension/numx.dart';
|
||||
import 'package:toolbox/core/extension/ssh_client.dart';
|
||||
import 'package:toolbox/core/extension/widget.dart';
|
||||
import 'package:toolbox/core/utils/platform/base.dart';
|
||||
@@ -431,7 +432,9 @@ class _ServerPageState extends State<ServerPage>
|
||||
return FadeTransition(opacity: animation, child: child);
|
||||
},
|
||||
child: _buildIOData(
|
||||
isSpeed ? '${l10n.read}:\n$r' : 'Total:\n${rootDisk?.size}',
|
||||
isSpeed
|
||||
? '${l10n.read}:\n$r'
|
||||
: 'Total:\n${rootDisk?.size.kb2Str}',
|
||||
isSpeed ? '${l10n.write}:\n$w' : 'Used:\n${rootDisk?.usedPercent}%',
|
||||
onTap: () {
|
||||
cardNoti.value = cardNoti.value.copyWith(diskIO: !isSpeed);
|
||||
|
||||
@@ -136,9 +136,9 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
||||
onChanged: (p0) => setState(() {
|
||||
_tags = p0;
|
||||
}),
|
||||
allTags: [...Pros.server.tags],
|
||||
allTags: [...Pros.snippet.tags],
|
||||
onRenameTag: (old, n) => setState(() {
|
||||
Pros.server.renameTag(old, n);
|
||||
Pros.snippet.renameTag(old, n);
|
||||
}),
|
||||
),
|
||||
Input(
|
||||
@@ -157,11 +157,18 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
||||
|
||||
Widget _buildTip() {
|
||||
return CardX(
|
||||
child: MarkdownBody(data: '''
|
||||
child: MarkdownBody(
|
||||
data: '''
|
||||
📌 ${l10n.supportFmtArgs}
|
||||
|
||||
${Snippet.fmtArgs.keys.map((e) => '`$e`').join(', ')}
|
||||
''').padding(const EdgeInsets.all(13)),
|
||||
''',
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
codeblockDecoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
),
|
||||
).padding(const EdgeInsets.all(13)),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user