Skip to content

Commit

Permalink
fix: Fix new gacha link for international servers
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Oct 11, 2023
1 parent 53a78fe commit c702e2b
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 23 deletions.
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<application
android:label="Ascent"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
>
<activity
android:name=".MainActivity"
android:supportsPictureInPicture="true"
Expand Down
2 changes: 1 addition & 1 deletion lib/connect/connecting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class ConnectPage extends StatelessWidget {
execPath,
[
'shell',
'logcat -d | grep -E \'https://(webstatic|hk4e-api|webstatic-sea|hk4e-api-os|api-takumi|api-os-takumi).(mihoyo\\.com|hoyoverse\\.com)\' | grep -i \'gacha\' | tail -n 1'
'logcat -d | grep -E \'https://(webstatic|hk4e-api|webstatic-sea|hk4e-api-os|api-takumi|api-os-takumi|gs).(mihoyo\\.com|hoyoverse\\.com)\' | grep -i \'gacha\' | tail -n 1'
],
runInShell: false);
AscentLogger.INSTANCE.log(
Expand Down
2 changes: 2 additions & 0 deletions lib/constants.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
final class AscentConstants {
static const String UPDATE_URL = "https://feixiaoqiu.com/ascent/version.json";

//static const String UPDATE_URL = "https://test.403f.cafe/version.json";

static const String ADB_PAIRING_PORT = "adb_pairing_port";

static const String ADB_PAIRING_CODE = "adb_pairing_code";
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MessageLookup extends MessageLookupByLibrary {
"stage_pairing_description": MessageLookupByLibrary.simpleMessage(
"Ascent will send notifications, please enable \nSettings => Developer options => Wireless Debugging\nThen select \"Pair with pairing code.\"\nAfterwards, follow the notification prompts to enter the port and pairing code.\n(This process only needs to be performed once.)"),
"stage_pairing_guide_error": MessageLookupByLibrary.simpleMessage(
"Guide for your brand can\'t be found, please contact developers"),
"Guide for your brand can\'t be found, if you wish to help complete this, please contact developers"),
"stage_pairing_guide_error_brand":
MessageLookupByLibrary.simpleMessage("Brand"),
"stage_pairing_guide_error_version":
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/intl/messages_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MessageLookup extends MessageLookupByLibrary {
"stage_pairing_description": MessageLookupByLibrary.simpleMessage(
"Ascent将发送通知,请开启\n设置=>开发者选项=>无线调试\n然后选择使用配对码配对\n而后将根据通知提示输入端口和配对码\n(该过程只需要执行一次)"),
"stage_pairing_guide_error":
MessageLookupByLibrary.simpleMessage("机型教程未找到,请联系开发者"),
MessageLookupByLibrary.simpleMessage("机型教程未找到,若您愿意协助完善请联系开发者"),
"stage_pairing_guide_error_brand":
MessageLookupByLibrary.simpleMessage("品牌"),
"stage_pairing_guide_error_version":
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"notification_action": "Input",
"stages": "Ascent Stages",
"stage_pairing": "Phone Pairing",
"stage_pairing_guide_error": "Guide for your brand can't be found, please contact developers",
"stage_pairing_guide_error": "Guide for your brand can't be found, if you wish to help complete this, please contact developers",
"stage_pairing_guide_error_brand": "Brand",
"stage_pairing_guide_error_version": "Version",
"stage_pairing_start": "Start Pairing",
Expand Down
2 changes: 1 addition & 1 deletion lib/l10n/intl_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"notification_action": "输入",
"stages": "Ascent执行步骤",
"stage_pairing": "手机配对",
"stage_pairing_guide_error": "机型教程未找到,请联系开发者",
"stage_pairing_guide_error": "机型教程未找到,若您愿意协助完善请联系开发者",
"stage_pairing_guide_error_brand": "品牌",
"stage_pairing_guide_error_version": "版本",
"stage_pairing_start": "开始配对",
Expand Down
10 changes: 10 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import 'ffi.dart';
import 'generated/l10n.dart';

void main() async {
HttpOverrides.global = MyHttpOverrides();

// Storage initialize
await GetStorage.init();

Expand Down Expand Up @@ -273,3 +275,11 @@ class AscentMain extends StatelessWidget {
);
}
}

class MyHttpOverrides extends HttpOverrides{
@override
HttpClient createHttpClient(SecurityContext? context){
return super.createHttpClient(context)
..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
}
}
34 changes: 21 additions & 13 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.17.1"
version: "1.17.2"
colorize:
dependency: transitive
description:
Expand Down Expand Up @@ -489,10 +489,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.18.0"
version: "0.18.1"
intl_utils:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -553,18 +553,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -854,10 +854,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -902,10 +902,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.5.1"
version: "0.6.0"
timeline_list:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1042,6 +1042,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.4-beta"
web_socket_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -1099,5 +1107,5 @@ packages:
source: hosted
version: "2.1.1"
sdks:
dart: ">=3.0.0 <4.0.0"
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.3.0"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.0-beta+4
version: 1.0.1-beta+1

environment:
sdk: '>=3.0.0 <4.0.0'
Expand All @@ -39,7 +39,7 @@ dependencies:
cupertino_icons: ^1.0.2
get:
get_storage:
intl: 0.18.0
intl: 0.18.1
timeline_list: ^0.0.6
device_info_plus: ^9.0.1
floating: ^2.0.0
Expand Down

0 comments on commit c702e2b

Please sign in to comment.