opt.: add tip for upgrading pkgs (#326)

This commit is contained in:
lollipopkit
2024-04-07 00:44:47 -06:00
parent 2f96a090c4
commit f126a59ff2
12 changed files with 85 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ import 'package:toolbox/data/res/path.dart';
import 'package:toolbox/data/res/provider.dart';
import 'package:toolbox/data/res/store.dart';
import 'package:toolbox/data/res/ui.dart';
import 'package:toolbox/view/widget/count_down_btn.dart';
import '../../core/route.dart';
import '../../core/utils/server.dart';
@@ -279,12 +280,13 @@ Future<void> _onPkg(BuildContext context, ServerPrivateInfo spi) async {
final gotoUpgrade = await context.showRoundDialog<bool>(
title: Text(l10n.attention),
child: SingleChildScrollView(
child: Text('${l10n.foundNUpdate(upgradeable.length)}\n\n$upgradeCmd'),
child: Text('${l10n.pkgUpgradeTip}\n${l10n.foundNUpdate(upgradeable.length)}\n\n$upgradeCmd'),
),
actions: [
TextButton(
onPressed: () => context.pop(true),
child: Text(l10n.update),
CountDownBtn(
onTap: () => context.pop(true),
text: l10n.update,
afterColor: Colors.red,
),
],
);