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

@@ -470,7 +470,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -478,7 +478,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -602,7 +602,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -610,7 +610,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -628,7 +628,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -636,7 +636,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -657,7 +657,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -670,7 +670,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
@@ -696,7 +696,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -709,7 +709,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -732,7 +732,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -745,7 +745,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 423;
static const int build = 425;
static const String engine = "3.10.6";
static const String buildAt = "2023-08-05 21:13:42.622817";
static const String buildAt = "2023-08-05 21:55:28.557439";
static const int modifications = 7;
}

View File

@@ -37,6 +37,7 @@ const participants = <GhId>{
'wxdjs',
'Aeorq',
'allonmymind',
'Yuuki-Rin',
'LittleState',
'karuboniru',
'whosphp',

View File

@@ -65,31 +65,31 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const BackButtonIcon(),
onPressed: () {
if (_path != null) {
_path!.update('/');
}
context.pop();
},
),
title: Text(_s.download),
actions: [
IconButton(
icon: const Icon(Icons.downloading),
onPressed: () =>
AppRoute(const SftpMissionPage(), 'sftp downloading')
.go(context),
onPressed: () => AppRoute(
const SftpMissionPage(),
'sftp downloading',
).go(context),
)
],
),
body: FadeIn(
key: UniqueKey(),
child: _buildBody(),
child: _wrapPopScope(),
),
bottomNavigationBar: SafeArea(child: _buildPath()),
floatingActionButton: FloatingActionButton(
onPressed: () async {
final path = await pickOneFile();
if (path == null) return;
final name = getFileName(path) ?? 'imported';
await File(path).copy(pathJoin(_path!.path, name));
setState(() {});
},
child: const Icon(Icons.add),
),
);
}
@@ -99,13 +99,53 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Divider(),
(_path?.path ?? _s.loadingFiles).omitStartStr(),
_buildBtns(),
],
),
);
}
Widget _buildBtns() {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
onPressed: () {
_path?.update('..');
setState(() {});
},
icon: const Icon(Icons.arrow_back),
),
IconButton(
onPressed: () async {
final path = await pickOneFile();
if (path == null) return;
final name = getFileName(path) ?? 'imported';
await File(path).copy(pathJoin(_path!.path, name));
setState(() {});
},
icon: const Icon(Icons.add),
),
],
);
}
Widget _wrapPopScope() {
return WillPopScope(
onWillPop: () async {
if (_path == null) return true;
if (_path!.canBack) {
_path!.update('..');
setState(() {});
return false;
}
return true;
},
child: _buildBody(),
);
}
Widget _buildBody() {
if (_path == null) {
return const Center(
@@ -114,27 +154,10 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
}
final dir = Directory(_path!.path);
final files = dir.listSync();
final canGoBack = _path!.canBack;
if (files.isEmpty) {
return const Center(
child: Text('~'),
);
}
return ListView.builder(
itemCount: canGoBack ? files.length + 1 : files.length,
itemCount: files.length,
padding: const EdgeInsets.symmetric(vertical: 3, horizontal: 7),
itemBuilder: (context, index) {
if (index == 0 && canGoBack) {
return RoundRectCard(ListTile(
leading: const Icon(Icons.keyboard_arrow_left),
title: const Text('..'),
onTap: () {
_path!.update('..');
setState(() {});
},
));
}
index = canGoBack ? index - 1 : index;
var file = files[index];
var fileName = file.path.split('/').last;
var stat = file.statSync();

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),

View File

@@ -475,9 +475,9 @@
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -490,9 +490,9 @@
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
@@ -505,9 +505,9 @@
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CURRENT_PROJECT_VERSION = 423;
CURRENT_PROJECT_VERSION = 425;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0.423;
MARKETING_VERSION = 1.0.425;
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;

View File

@@ -146,12 +146,6 @@ Future<void> flutterBuildAndroid() async {
}
Future<void> scp2CDN() async {
print('scp2CDN? (Y/n)');
final str = stdin.readLineSync() ?? '';
if (str.isNotEmpty) {
print('skip scp2CDN');
return;
}
final result = await Process.run(
'scp',
[apkPath, 'hk:/var/www/res/serverbox/apks/$build.apk'],