This commit is contained in:
lollipopkit
2023-08-05 22:09:54 +08:00
parent 7f35ddfe30
commit 8abdcf15d4
7 changed files with 92 additions and 59 deletions

View File

@@ -76,6 +76,15 @@ class _SftpPageState extends State<SftpPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const BackButtonIcon(),
onPressed: () {
if (_status.path != null) {
_status.path!.update('/');
}
context.pop();
},
),
centerTitle: true,
title: TwoLineText(up: 'SFTP', down: widget.spi.name),
actions: [
@@ -277,6 +286,12 @@ class _SftpPageState extends State<SftpPage> {
return centerLoading;
}
if (_status.files!.isEmpty) {
return const Center(
child: Text('~'),
);
}
return RefreshIndicator(
child: FadeIn(
key: Key(widget.spi.name + _status.path!.path),