- move out btns from more vert btn (docker, sftp & etc.)
- redesigned routes
- confirmation before deleting private key
This commit is contained in:
lollipopkit
2023-08-20 18:30:08 +08:00
parent f88f5c3bda
commit a59286473f
16 changed files with 380 additions and 261 deletions

View File

@@ -9,7 +9,6 @@ import 'package:toolbox/data/provider/sftp.dart';
import 'package:toolbox/data/res/misc.dart';
import 'package:toolbox/locator.dart';
import 'package:toolbox/view/page/editor.dart';
import 'package:toolbox/view/page/storage/sftp.dart';
import 'package:toolbox/view/widget/input_field.dart';
import 'package:toolbox/view/widget/picker.dart';
import 'package:toolbox/view/widget/round_rect_card.dart';
@@ -312,12 +311,9 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
if (spi == null) {
return;
}
final remotePath = await AppRoute(
SftpPage(
spi,
selectPath: true,
),
'SFTP page (select)',
final remotePath = await AppRoute.sftp(
spi: spi,
isSelect: true,
).go<String>(context);
if (remotePath == null) {
return;

View File

@@ -37,11 +37,11 @@ class SftpPage extends StatefulWidget {
final String? initPath;
final bool selectPath;
const SftpPage(
this.spi, {
const SftpPage({
Key? key,
required this.spi,
required this.selectPath,
this.initPath,
this.selectPath = false,
}) : super(key: key);
@override
@@ -479,10 +479,7 @@ class _SftpPageState extends State<SftpPage> {
}
_listDir();
},
child: Text(
_s.delete,
style: const TextStyle(color: Colors.red),
),
child: Text(_s.delete, style: textRed),
),
],
);
@@ -523,10 +520,7 @@ class _SftpPageState extends State<SftpPage> {
context.pop();
_listDir();
},
child: Text(
_s.ok,
style: const TextStyle(color: Colors.red),
),
child: Text(_s.ok, style: textRed),
),
],
);
@@ -569,10 +563,7 @@ class _SftpPageState extends State<SftpPage> {
context.pop();
_listDir();
},
child: Text(
_s.ok,
style: const TextStyle(color: Colors.red),
),
child: Text(_s.ok, style: textRed),
),
],
);
@@ -610,10 +601,7 @@ class _SftpPageState extends State<SftpPage> {
context.pop();
_listDir();
},
child: Text(
_s.rename,
style: const TextStyle(color: Colors.red),
),
child: Text(_s.rename, style: textRed),
),
],
);