From 4daa7652473521f2b6cef360df38f1155acdae1e Mon Sep 17 00:00:00 2001 From: igoogolx <27353191+igoogolx@users.noreply.github.com> Date: Sun, 19 Jan 2025 19:48:38 +0800 Subject: [PATCH] v1.28.0-beat.2 (#77) * fix: external urls are opened * fix: invalid userDataFolder on windows * chore: upgrade deps * feat: upgrade core * chore: v1.28.0-beat.2 --- lib/dashboard.dart | 15 +++++---------- lib/main.dart | 3 ++- pubspec.lock | 36 ++++++++++++++++++------------------ pubspec.yaml | 2 +- scripts/init.dart | 2 +- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/lib/dashboard.dart b/lib/dashboard.dart index fbda2f6..be0a003 100644 --- a/lib/dashboard.dart +++ b/lib/dashboard.dart @@ -61,17 +61,12 @@ class _WebViewDashboard extends State { return NavigationActionPolicy.ALLOW; } - if (!["http", "https", "file", "chrome", "data", "javascript", "about"] - .contains(uri.scheme)) { - if (await canLaunchUrl(uri)) { - await launchUrl( - uri, - ); - return NavigationActionPolicy.CANCEL; - } + if (await canLaunchUrl(uri)) { + await launchUrl( + uri, + ); } - - return NavigationActionPolicy.ALLOW; + return NavigationActionPolicy.CANCEL; }, onReceivedError: (controller, request, error) {}, onProgressChanged: (controller, progress) { diff --git a/lib/main.dart b/lib/main.dart index 415bc5f..69d4e63 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -45,8 +45,9 @@ void main(args) async { if (Platform.isWindows) { final availableVersion = await WebViewEnvironment.getAvailableVersion(); isWebviewAvailable = availableVersion != null; + String cacheDir = path.join(homeDir, 'cache_webview'); webViewEnvironment = await WebViewEnvironment.create( - settings: WebViewEnvironmentSettings(userDataFolder: homeDir)); + settings: WebViewEnvironmentSettings(userDataFolder: cacheDir)); } await windowManager.ensureInitialized(); diff --git a/pubspec.lock b/pubspec.lock index d6a1c23..050cc1f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: "direct main" description: name: connectivity_plus - sha256: e0817759ec6d2d8e57eb234e6e57d2173931367a865850c7acea40d4b4f9c27d + sha256: "8a68739d3ee113e51ad35583fdf9ab82c55d09d693d3c39da1aebab87c938412" url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "6.1.2" connectivity_plus_platform_interface: dependency: transitive description: @@ -226,10 +226,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "31cd0885738e87c72d6f055564d37fabcdacee743b396b78c7636c169cac64f5" + sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c url: "https://pub.dev" source: hosted - version: "0.14.2" + version: "0.14.3" flutter_lints: dependency: "direct dev" description: @@ -269,10 +269,10 @@ packages: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" image: dependency: transitive description: @@ -317,10 +317,10 @@ packages: dependency: transitive description: name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" local_notifier: dependency: "direct main" description: @@ -365,10 +365,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "70c421fe9d9cc1a9a7f3b05ae56befd469fe4f8daa3b484823141a55442d858d" + sha256: "739e0a5c3c4055152520fa321d0645ee98e932718b4c8efeeb51451968fe0790" url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "8.1.3" package_info_plus_platform_interface: dependency: transitive description: @@ -626,18 +626,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.0" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" + sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "3.1.4" uuid: dependency: "direct main" description: @@ -682,10 +682,10 @@ packages: dependency: transitive description: name: win32 - sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69" + sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29" url: "https://pub.dev" source: hosted - version: "5.9.0" + version: "5.10.0" window_manager: dependency: "direct main" description: @@ -719,5 +719,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 55cf5e8..a27ef66 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.28.0-beat.1 +version: 1.28.0-beat.2 environment: sdk: '>=3.0.6 <4.0.0' diff --git a/scripts/init.dart b/scripts/init.dart index fcf6b53..9fcb04d 100644 --- a/scripts/init.dart +++ b/scripts/init.dart @@ -13,7 +13,7 @@ final assetsPath = final binDir = Directory(path.join(assetsPath, 'bin')); const rawCoreName = 'itun2socks'; -const rawCoreVersion = '1.26.0'; +const rawCoreVersion = '1.26.1'; Future downloadLatestCore(String arch, String token) async { final dio = Dio();