mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
auto scroll on apt/yum upgrading.
This commit is contained in:
@@ -354,7 +354,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 112;
|
CURRENT_PROJECT_VERSION = 115;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.112;
|
MARKETING_VERSION = 1.0.115;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 112;
|
CURRENT_PROJECT_VERSION = 115;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -492,7 +492,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.112;
|
MARKETING_VERSION = 1.0.115;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 112;
|
CURRENT_PROJECT_VERSION = 115;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -516,7 +516,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.112;
|
MARKETING_VERSION = 1.0.115;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|||||||
@@ -11,12 +11,15 @@ class AptProvider extends BusyProvider {
|
|||||||
List<UpgradePkgInfo>? upgradeable;
|
List<UpgradePkgInfo>? upgradeable;
|
||||||
String? error;
|
String? error;
|
||||||
String? updateLog;
|
String? updateLog;
|
||||||
|
Function()? onUpgrade;
|
||||||
|
|
||||||
AptProvider();
|
AptProvider();
|
||||||
|
|
||||||
Future<void> init(SSHClient client, Distribution dist) async {
|
Future<void> init(
|
||||||
|
SSHClient client, Distribution dist, Function() onUpgrade) async {
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.dist = dist;
|
this.dist = dist;
|
||||||
|
this.onUpgrade = onUpgrade;
|
||||||
whoami = (await client.run('whoami').string).trim();
|
whoami = (await client.run('whoami').string).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +91,7 @@ class AptProvider extends BusyProvider {
|
|||||||
session.stdout.listen((data) {
|
session.stdout.listen((data) {
|
||||||
updateLog = (updateLog ?? '') + data.string;
|
updateLog = (updateLog ?? '') + data.string;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
onUpgrade!();
|
||||||
});
|
});
|
||||||
refreshInstalled();
|
refreshInstalled();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ class ServerProvider extends BusyProvider {
|
|||||||
|
|
||||||
void delServer(ServerPrivateInfo info) {
|
void delServer(ServerPrivateInfo info) {
|
||||||
final idx = _servers.indexWhere((s) => s.info == info);
|
final idx = _servers.indexWhere((s) => s.info == info);
|
||||||
|
if (idx == -1) return;
|
||||||
_servers[idx].client?.close();
|
_servers[idx].client?.close();
|
||||||
_servers.removeAt(idx);
|
_servers.removeAt(idx);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 114;
|
static const int build = 115;
|
||||||
static const String engine =
|
static const String engine =
|
||||||
"Flutter 2.10.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision c860cba910 (3 weeks ago) • 2022-03-25 00:23:12 -0500\nEngine • revision 57d3bac3dd\nTools • Dart 2.16.2 • DevTools 2.9.2\n";
|
"Flutter 2.10.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision c860cba910 (6 weeks ago) • 2022-03-25 00:23:12 -0500\nEngine • revision 57d3bac3dd\nTools • Dart 2.16.2 • DevTools 2.9.2\n";
|
||||||
static const String buildAt = "2022-04-15 20:20:29.860208";
|
static const String buildAt = "2022-05-03 08:33:56.199910";
|
||||||
static const int modifications = 1;
|
static const int modifications = 3;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class _AptManagePageState extends State<AptManagePage>
|
|||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
late MediaQueryData _media;
|
late MediaQueryData _media;
|
||||||
final greyStyle = const TextStyle(color: Colors.grey);
|
final greyStyle = const TextStyle(color: Colors.grey);
|
||||||
|
final scrollController = ScrollController();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
@@ -48,7 +49,7 @@ class _AptManagePageState extends State<AptManagePage>
|
|||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
locator<AptProvider>().init(si.client!, si.status.sysVer.dist);
|
locator<AptProvider>().init(si.client!, si.status.sysVer.dist, () => scrollController.jumpTo(scrollController.position.maxScrollExtent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -118,9 +119,10 @@ class _AptManagePageState extends State<AptManagePage>
|
|||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: _media.size.height * 0.73,
|
height: _media.size.height * 0.7,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: const EdgeInsets.all(18),
|
padding: const EdgeInsets.all(18),
|
||||||
|
controller: scrollController,
|
||||||
children: [Text(apt.updateLog!)],
|
children: [Text(apt.updateLog!)],
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user