Center title in SFTP/Apt
This commit is contained in:
@@ -54,6 +54,7 @@ class _AptManagePageState extends State<AptManagePage>
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: TwoLineText(up: 'Apt', down: widget.spi.ip),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
||||
@@ -57,6 +57,7 @@ class _DockerManagePageState extends State<DockerManagePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: TwoLineText(up: 'Docker', down: widget.spi.ip),
|
||||
),
|
||||
body: _buildMain(),
|
||||
@@ -125,7 +126,9 @@ class _DockerManagePageState extends State<DockerManagePage> {
|
||||
return ListTile(
|
||||
title: Text(item.image),
|
||||
subtitle: Text(item.status),
|
||||
trailing: docker.isBusy ? const CircularProgressIndicator() : _buildMoreBtn(item.running, item.containerId),
|
||||
trailing: docker.isBusy
|
||||
? const CircularProgressIndicator()
|
||||
: _buildMoreBtn(item.running, item.containerId),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
|
||||
@@ -195,8 +195,8 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
]);
|
||||
return;
|
||||
}
|
||||
_status.client!.mkdir(
|
||||
_status.path!.path + '/' + textController.text);
|
||||
_status.client!
|
||||
.mkdir(_status.path!.path + '/' + textController.text);
|
||||
Navigator.of(context).pop();
|
||||
listDir();
|
||||
},
|
||||
@@ -234,8 +234,7 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
]);
|
||||
return;
|
||||
}
|
||||
await _status
|
||||
.client!
|
||||
await _status.client!
|
||||
.rename(file.filename, textController.text);
|
||||
Navigator.of(context).pop();
|
||||
listDir();
|
||||
@@ -270,9 +269,8 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
final sftpc = await client.sftp();
|
||||
_status.client = sftpc;
|
||||
}
|
||||
final fs = await _status
|
||||
.client!
|
||||
.listdir(path ?? (_status.path?.path ?? '/'));
|
||||
final fs =
|
||||
await _status.client!.listdir(path ?? (_status.path?.path ?? '/'));
|
||||
fs.sort((a, b) => a.filename.compareTo(b.filename));
|
||||
fs.removeAt(0);
|
||||
if (mounted) {
|
||||
@@ -339,7 +337,7 @@ class _SFTPPageState extends State<SFTPPage> {
|
||||
_status.selected = true;
|
||||
_status.path = AbsolutePath('/');
|
||||
listDir(
|
||||
client: locator<ServerProvider>()
|
||||
client: locator<ServerProvider>()
|
||||
.servers
|
||||
.firstWhere((s) => s.info == spi)
|
||||
.client,
|
||||
|
||||
Reference in New Issue
Block a user