mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: webdav
This commit is contained in:
@@ -586,7 +586,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -596,7 +596,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -720,7 +720,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -730,7 +730,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -748,7 +748,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -758,7 +758,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -779,7 +779,7 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
@@ -792,7 +792,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||
@@ -818,7 +818,7 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
@@ -831,7 +831,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -854,7 +854,7 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
@@ -867,7 +867,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -890,7 +890,7 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_ASSET_PATHS = "";
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@@ -902,7 +902,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
||||
@@ -931,7 +931,7 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_ASSET_PATHS = "";
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@@ -943,7 +943,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
||||
PRODUCT_NAME = ServerBox;
|
||||
@@ -969,7 +969,7 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 678;
|
||||
CURRENT_PROJECT_VERSION = 682;
|
||||
DEVELOPMENT_ASSET_PATHS = "";
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@@ -981,7 +981,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.678;
|
||||
MARKETING_VERSION = 1.0.682;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
||||
PRODUCT_NAME = ServerBox;
|
||||
|
||||
@@ -9,6 +9,8 @@ import 'package:toolbox/data/res/store.dart';
|
||||
import 'package:webdav_client/webdav_client.dart';
|
||||
|
||||
abstract final class Webdav {
|
||||
static const _prefix = 'srvbox/';
|
||||
|
||||
static var _client = WebdavClient(
|
||||
url: Stores.setting.webdavUrl.fetch(),
|
||||
user: Stores.setting.webdavUser.fetch(),
|
||||
@@ -35,7 +37,7 @@ abstract final class Webdav {
|
||||
try {
|
||||
await _client.writeFile(
|
||||
localPath ?? '${await Paths.doc}/$relativePath',
|
||||
relativePath,
|
||||
_prefix + relativePath,
|
||||
);
|
||||
} catch (e, s) {
|
||||
_logger.warning('Upload $relativePath failed', e, s);
|
||||
@@ -46,7 +48,7 @@ abstract final class Webdav {
|
||||
|
||||
static Future<WebdavErr?> delete(String relativePath) async {
|
||||
try {
|
||||
await _client.remove(relativePath);
|
||||
await _client.remove(_prefix + relativePath);
|
||||
} catch (e, s) {
|
||||
_logger.warning('Delete $relativePath failed', e, s);
|
||||
return WebdavErr(type: WebdavErrType.generic, message: '$e');
|
||||
@@ -60,7 +62,7 @@ abstract final class Webdav {
|
||||
}) async {
|
||||
try {
|
||||
await _client.readFile(
|
||||
relativePath,
|
||||
_prefix + relativePath,
|
||||
localPath ?? '${await Paths.doc}/$relativePath',
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 678;
|
||||
static const String engine = "3.16.3";
|
||||
static const String buildAt = "2023-12-17 18:43:29";
|
||||
static const int modifications = 8;
|
||||
static const int script = 31;
|
||||
static const int build = 682;
|
||||
static const String engine = "3.16.4";
|
||||
static const String buildAt = "2023-12-19 15:18:22";
|
||||
static const int modifications = 10;
|
||||
static const int script = 32;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ class SettingStore extends PersistentStore {
|
||||
true,
|
||||
);
|
||||
|
||||
|
||||
/// Lanch page idx
|
||||
late final launchPage = property(
|
||||
'launchPage',
|
||||
|
||||
@@ -37,7 +37,7 @@ import 'view/widget/appbar.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
_runInZone(() async {
|
||||
await initApp();
|
||||
await _initApp();
|
||||
runApp(
|
||||
MultiProvider(
|
||||
providers: [
|
||||
@@ -72,7 +72,7 @@ void _runInZone(void Function() body) {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> initApp() async {
|
||||
Future<void> _initApp() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await _initDesktopWindow();
|
||||
|
||||
|
||||
@@ -123,7 +123,8 @@ class BackupPage extends StatelessWidget {
|
||||
child: ExpandTile(
|
||||
leading: const Icon(Icons.storage),
|
||||
title: const Text('WebDAV'),
|
||||
initiallyExpanded: !(isIOS || isMacOS),
|
||||
initiallyExpanded:
|
||||
!(isIOS || isMacOS) && Stores.setting.webdavSync.fetch(),
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text(l10n.setting),
|
||||
|
||||
@@ -135,7 +135,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
(e) => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(e.key.i18n, style: UIs.textSize15),
|
||||
Text(e.key.i18n, style: UIs.textSize13),
|
||||
Text(e.value, style: UIs.textSize13Grey)
|
||||
],
|
||||
).padding(const EdgeInsets.symmetric(vertical: 2)),
|
||||
|
||||
@@ -296,7 +296,8 @@ class _ServerPageState extends State<ServerPage>
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_wrapWithSizedbox(_buildPercentCircle(ss.cpu.usedPercent()), true),
|
||||
_wrapWithSizedbox(_buildPercentCircle(ss.mem.usedPercent * 100), true),
|
||||
_wrapWithSizedbox(
|
||||
_buildPercentCircle(ss.mem.usedPercent * 100), true),
|
||||
_wrapWithSizedbox(_buildNet(ss, spi.id)),
|
||||
_wrapWithSizedbox(_buildDisk(ss, spi.id)),
|
||||
],
|
||||
@@ -357,10 +358,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
children: [
|
||||
Text(
|
||||
spi.name,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: UIs.textSize13Bold,
|
||||
),
|
||||
const Icon(
|
||||
Icons.keyboard_arrow_right,
|
||||
@@ -584,7 +582,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
!Stores.setting.serverTabUseOldUI.fetch()) {
|
||||
return 135;
|
||||
}
|
||||
return 105;
|
||||
return 106;
|
||||
}
|
||||
|
||||
void _askFor({
|
||||
|
||||
@@ -56,18 +56,20 @@ class _SettingPageState extends State<SettingPage> {
|
||||
final _netViewTypeKey = GlobalKey<PopupMenuButtonState<NetViewType>>();
|
||||
final _setting = Stores.setting;
|
||||
|
||||
final _selectedColorValue = ValueNotifier(0);
|
||||
final _nightMode = ValueNotifier(0);
|
||||
final _maxRetryCount = ValueNotifier(0);
|
||||
final _updateInterval = ValueNotifier(0);
|
||||
final _termFontSize = ValueNotifier(0.0);
|
||||
final _editorFontSize = ValueNotifier(0.0);
|
||||
final _localeCode = ValueNotifier('');
|
||||
final _editorTheme = ValueNotifier('');
|
||||
final _editorDarkTheme = ValueNotifier('');
|
||||
final _keyboardType = ValueNotifier(0);
|
||||
final _rotateQuarter = ValueNotifier(0);
|
||||
final _netViewType = ValueNotifier(NetViewType.speed);
|
||||
late final _selectedColorValue = ValueNotifier(_setting.primaryColor.fetch());
|
||||
late final _nightMode = ValueNotifier(_setting.themeMode.fetch());
|
||||
late final _maxRetryCount = ValueNotifier(_setting.maxRetryCount.fetch());
|
||||
late final _updateInterval =
|
||||
ValueNotifier(_setting.serverStatusUpdateInterval.fetch());
|
||||
late final _termFontSize = ValueNotifier(_setting.termFontSize.fetch());
|
||||
late final _editorFontSize = ValueNotifier(_setting.editorFontSize.fetch());
|
||||
late final _localeCode = ValueNotifier('');
|
||||
late final _editorTheme = ValueNotifier(_setting.editorTheme.fetch());
|
||||
late final _editorDarkTheme = ValueNotifier(_setting.editorDarkTheme.fetch());
|
||||
late final _keyboardType = ValueNotifier(_setting.keyboardType.fetch());
|
||||
late final _rotateQuarter =
|
||||
ValueNotifier(_setting.fullScreenRotateQuarter.fetch());
|
||||
late final _netViewType = ValueNotifier(_setting.netViewType.fetch());
|
||||
late final _textScaler = ValueNotifier(_setting.textFactor.fetch());
|
||||
|
||||
@override
|
||||
@@ -81,22 +83,6 @@ class _SettingPageState extends State<SettingPage> {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_nightMode.value = _setting.themeMode.fetch();
|
||||
_updateInterval.value = _setting.serverStatusUpdateInterval.fetch();
|
||||
_maxRetryCount.value = _setting.maxRetryCount.fetch();
|
||||
_selectedColorValue.value = _setting.primaryColor.fetch();
|
||||
_termFontSize.value = _setting.termFontSize.fetch();
|
||||
_editorFontSize.value = _setting.editorFontSize.fetch();
|
||||
_editorTheme.value = _setting.editorTheme.fetch();
|
||||
_editorDarkTheme.value = _setting.editorDarkTheme.fetch();
|
||||
_keyboardType.value = _setting.keyboardType.fetch();
|
||||
_rotateQuarter.value = _setting.fullScreenRotateQuarter.fetch();
|
||||
_netViewType.value = _setting.netViewType.fetch();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
||||
Reference in New Issue
Block a user