mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
Center title in SFTP/Apt
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 102;
|
||||
static const int build = 106;
|
||||
static const String engine =
|
||||
"Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 7e9793dee1 (5 days ago) • 2022-03-02 11:23:12 -0600\nEngine • revision bd539267b4\nTools • Dart 2.16.1 • DevTools 2.9.2\n";
|
||||
static const String buildAt = "2022-03-07 19:19:07.115966";
|
||||
static const int modifications = 18;
|
||||
"Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 7e9793dee1 (6 days ago) • 2022-03-02 11:23:12 -0600\nEngine • revision bd539267b4\nTools • Dart 2.16.1 • DevTools 2.9.2\n";
|
||||
static const String buildAt = "2022-03-08 18:06:40.014600";
|
||||
static const int modifications = 8;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TwoLineText extends StatelessWidget {
|
||||
const TwoLineText({Key? key, required this.up, required this.down}) : super(key: key);
|
||||
const TwoLineText({Key? key, required this.up, required this.down})
|
||||
: super(key: key);
|
||||
final String up;
|
||||
final String down;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Text(up, style: const TextStyle(fontSize: 15),),
|
||||
Text(down, style: const TextStyle(fontSize: 11),)
|
||||
],
|
||||
);
|
||||
children: [
|
||||
Text(
|
||||
up,
|
||||
style: const TextStyle(fontSize: 15),
|
||||
),
|
||||
Text(
|
||||
down,
|
||||
style: const TextStyle(fontSize: 11),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,6 +335,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.11"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.3"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -521,7 +528,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.3"
|
||||
version: "0.4.8"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user