Skip to content

Commit

Permalink
new: webdav sync test
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit committed Dec 4, 2023
1 parent 2dc86a9 commit 38cdef9
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 50 deletions.
6 changes: 6 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,12 @@ abstract class S {
/// **'Terminal'**
String get terminal;

/// No description provided for @test.
///
/// In en, this message translates to:
/// **'Test'**
String get test;

/// No description provided for @theme.
///
/// In en, this message translates to:
Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ class SDe extends S {
@override
String get terminal => 'Terminal';

@override
String get test => 'Prüfung';

@override
String get theme => 'Themen';

Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ class SEn extends S {
@override
String get terminal => 'Terminal';

@override
String get test => 'Test';

@override
String get theme => 'Theme';

Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_id.dart
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ class SId extends S {
@override
String get terminal => 'Terminal';

@override
String get test => 'pengujian';

@override
String get theme => ' Tema';

Expand Down
6 changes: 6 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ class SZh extends S {
@override
String get terminal => '终端';

@override
String get test => '测试';

@override
String get theme => '主题';

Expand Down Expand Up @@ -1477,6 +1480,9 @@ class SZhTw extends SZh {
@override
String get terminal => '终端機';

@override
String get test => '測試';

@override
String get theme => '主題';

Expand Down
36 changes: 18 additions & 18 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -596,7 +596,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -720,7 +720,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -730,7 +730,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -748,7 +748,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -758,7 +758,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -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 = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -792,7 +792,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
Expand All @@ -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 = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -831,7 +831,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -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 = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -867,7 +867,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -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 = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
Expand All @@ -902,7 +902,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
Expand Down Expand Up @@ -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 = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
Expand All @@ -943,7 +943,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
Expand All @@ -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 = 654;
CURRENT_PROJECT_VERSION = 660;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
Expand All @@ -981,7 +981,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.654;
MARKETING_VERSION = 1.0.660;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
Expand Down
2 changes: 0 additions & 2 deletions lib/core/persistant_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class PersistentStore {
//encryptionCipher: SecureStore._cipher,
);


/// Get all db filenames.
///
/// - [suffixs] defaults to ['.hive']
Expand All @@ -69,7 +68,6 @@ class PersistentStore {
files.map((e) => e.path.replaceFirst('$docPath/', '')).toList();
return paths;
}

}

extension BoxX on Box {
Expand Down
11 changes: 11 additions & 0 deletions lib/core/utils/sync/webdav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ abstract final class Webdav {
pwd: Stores.setting.webdavPwd.fetch(),
);

static Future<String?> test(String url, String user, String pwd) async {
final client = WebdavClient(url: url, user: user, pwd: pwd);
try {
await client.ping();
return null;
} catch (e, s) {
Loggers.app.warning('Webdav test failed', e, s);
return e.toString();
}
}

static Future<WebdavErr?> upload({
required String relativePath,
String? localPath,
Expand Down
6 changes: 4 additions & 2 deletions lib/data/model/app/error.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ enum ErrFrom {
ssh,
status,
icloud,
webdav,;
webdav,
;
}

abstract class Err<T> {
Expand Down Expand Up @@ -73,7 +74,8 @@ class ICloudErr extends Err<ICloudErrType> {

enum WebdavErrType {
generic,
notFound,;
notFound,
;
}

class WebdavErr extends Err<WebdavErrType> {
Expand Down
13 changes: 0 additions & 13 deletions lib/data/model/app/remote_storage.dart

This file was deleted.

6 changes: 3 additions & 3 deletions lib/data/res/build_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

class BuildData {
static const String name = "ServerBox";
static const int build = 654;
static const int build = 660;
static const String engine = "3.16.2";
static const String buildAt = "2023-12-02 00:21:29";
static const int modifications = 2;
static const String buildAt = "2023-12-04 13:43:20";
static const int modifications = 11;
static const int script = 31;
}
1 change: 1 addition & 0 deletions lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"tag": "Tags",
"temperature": "Temperatur",
"terminal": "Terminal",
"test": "Prüfung",
"theme": "Themen",
"themeMode": "Themen-Modus",
"times": "x",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"tag": "Tags",
"temperature": "Temperature",
"terminal": "Terminal",
"test": "Test",
"theme": "Theme",
"themeMode": "Theme mode",
"times": "Times",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_id.arb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"tag": "Tag",
"temperature": "Suhu",
"terminal": "Terminal",
"test": "pengujian",
"theme": " Tema",
"themeMode": "Mode tema",
"times": "Waktu",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"tag": "标签",
"temperature": "温度",
"terminal": "终端",
"test": "测试",
"theme": "主题",
"themeMode": "主题模式",
"times": "次",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_zh_tw.arb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"tag": "标签",
"temperature": "溫度",
"terminal": "终端機",
"test": "測試",
"theme": "主題",
"themeMode": "主題模式",
"times": "次",
Expand Down
Loading

0 comments on commit 38cdef9

Please sign in to comment.