Skip to content

Commit

Permalink
Merge pull request #147 from fa0311/pre
Browse files Browse the repository at this point in the history
v5.0.1
  • Loading branch information
fa0311 committed Mar 17, 2023
2 parents 9aee58f + beb5030 commit d6f5ed9
Show file tree
Hide file tree
Showing 36 changed files with 301 additions and 52 deletions.
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// IntelliSense を使用して利用可能な属性を学べます。
// 既存の属性の説明をホバーして表示します。
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "vrchat_mobile_client",
"request": "launch",
"type": "dart",
"args": [
"--no-sound-null-safety"
]
},
{
"name": "vrchat_mobile_client (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "vrchat_mobile_client (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
2 changes: 1 addition & 1 deletion README-ja.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img width="30%" src="assets/img/foreground.png">
<img width="250px" src="assets/img/foreground.png">
</h1>

<div align="center">
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img width="30%" src="assets/img/foreground.png">
<img width="250px" src="assets/img/foreground.png">
</h1>

<div align="center">
Expand Down
92 changes: 92 additions & 0 deletions android/agconnect-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"agcgw":{
"backurl":"connect-drcn.hispace.hicloud.com",
"url":"connect-drcn.dbankcloud.cn",
"websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com",
"websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn"
},
"agcgw_all":{
"CN":"connect-drcn.dbankcloud.cn",
"CN_back":"connect-drcn.hispace.hicloud.com",
"DE":"connect-dre.dbankcloud.cn",
"DE_back":"connect-dre.hispace.hicloud.com",
"RU":"connect-drru.hispace.dbankcloud.ru",
"RU_back":"connect-drru.hispace.dbankcloud.cn",
"SG":"connect-dra.dbankcloud.cn",
"SG_back":"connect-dra.hispace.hicloud.com"
},
"websocketgw_all":{
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
},
"client":{
"cp_id":"10081000046757831",
"product_id":"99536292102528522",
"client_id":"953099514367986880",
"client_secret":"F155CAADACED931F5B3255A9DE53124E69D0647BE281063CAAC5432176034AB8",
"project_id":"99536292102528522",
"app_id":"106854219",
"api_key":"DAEDAIMQ6n2RzTkSX2+NG0stch6zO8BOnEPNf9U86J/qKkcK6t4nXLR6DJ0iV2uyKFMGz/izCkVpf0VstHvU+e06iVR0Jbas94lbwA==",
"package_name":"com.yuki0311.vrchat_mobile_client"
},
"oauth_client":{
"client_id":"106854219",
"client_type":1
},
"app_info":{
"app_id":"106854219",
"package_name":"com.yuki0311.vrchat_mobile_client"
},
"service":{
"analytics":{
"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com",
"collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn",
"collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn",
"collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn",
"resource_id":"p1",
"channel_id":""
},
"search":{
"url":"https://search-drcn.cloud.huawei.com"
},
"cloudstorage":{
"storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia",
"storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru",
"storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru",
"storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu",
"storage_url_de":"https://ops-dre.agcstorage.link",
"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn",
"storage_url_sg":"https://ops-dra.agcstorage.link",
"storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn",
"storage_url_cn":"https://agc-storage-drcn.platform.dbankcloud.cn"
},
"ml":{
"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"
}
},
"region":"CN",
"configuration_version":"3.0",
"appInfos":[
{
"package_name":"com.yuki0311.vrchat_mobile_client",
"client":{
"app_id":"106854219"
},
"app_info":{
"package_name":"com.yuki0311.vrchat_mobile_client",
"app_id":"106854219"
},
"oauth_client":{
"client_type":1,
"client_id":"106854219"
}
}
]
}
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
/* Product */
"Macbook",
"appgallery",
/* HTTP */
"KHTML",
/* API */
"standalonewindows",
"totp",
Expand Down
16 changes: 8 additions & 8 deletions docs/user_policies/en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# User policy

[Japanese](ja.md) / [English](en.md)
[日本語](ja.md) / [English](en.md)

# Introduction
## Introduction

yuki0311 ("we", "us", "our", "we", "our") sets out the terms and conditions of use for the services provided on various devices for smartphones and mobile devices (the "Services").
In the event of any inconsistency between this English privacy policy and the corresponding privacy policy in other languages, the Japanese shall prevail.
Expand All @@ -16,20 +16,20 @@ Personal data obtained through the use of the Service is governed by the [privac
You must register for a third party [VRChat](https://hello.vrchat.com/) account to access most features of the Service.
The Service may use [VRChat](https://hello.vrchat.com/) login credentials to access certain features of the Platform.

## Copyright.
## Copyright

Please see [MIT LICENCE](/LICENSE) for the copyright of the Service.
Please see [MIT LICENSE](/LICENSE) for the copyright of the Service.

## Prohibitions

Please see [MIT LICENCE](/LICENSE) for information on the prohibitions of the Service.
Please see [MIT LICENSE](/LICENSE) for information on the prohibitions of the Service.
In addition, the User may not engage in any conduct prohibited by the Service when using third party services.

- [vrchat.com](https://hello.vrchat.com/legal)

## Disclaimer.
## Disclaimer

Please see [MIT LICENCE](/LICENSE) for a disclaimer of liability for the Service.
Please see [MIT LICENSE](/LICENSE) for a disclaimer of liability for the Service.

## Prohibition of transfer of rights and obligations

Expand All @@ -49,7 +49,7 @@ We may update the User Policy from time to time. As the User Policy is maintaine
All programmes of the Service are publicly available on Github.
For more information, see [here](https://github.com/fa0311/vrc_manager).

## How to contact us.
## How to contact us

If you have any questions regarding this user policy, please contact us at the following email address.

Expand Down
10 changes: 5 additions & 5 deletions docs/user_policies/ja.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ユーザーポリシー

[日本語](ja.md) / [英語](en.md)
[日本語](ja.md) / [English](en.md)

# はじめに
## はじめに

yuki0311 (以下,「私達」) は、スマートフォンおよびモバイル デバイス用のさまざまなデバイス上で提供するサービス(以下,「本サービス」)における利用条件を定めます。
この日本語のプライバシーポリシーとそれに対応する他の言語のプライバシーポリシーとに矛盾がある場合は、日本語を優先するものとします。
Expand All @@ -18,18 +18,18 @@ yuki0311 (以下,「私達」) は、スマートフォンおよびモバイ

## 著作権

本サービスの著作権については[MIT LICENCE](/LICENSE)をご覧ください。
本サービスの著作権については[MIT LICENSE](/LICENSE)をご覧ください。

## 禁止事項

本サービスの禁止事項については[MIT LICENCE](/LICENSE)をご覧ください。
本サービスの禁止事項については[MIT LICENSE](/LICENSE)をご覧ください。
また、ユーザーはサードパーティサービスの利用にあたりサービスが禁止している行為をしてはなりません。

- [vrchat.com](https://hello.vrchat.com/legal)

## 免責事項

本サービスの免責事項については[MIT LICENCE](/LICENSE)をご覧ください。
本サービスの免責事項については[MIT LICENSE](/LICENSE)をご覧ください。

## 権利義務の譲渡の禁止

Expand Down
3 changes: 2 additions & 1 deletion lib/api/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ class VRChatAPI {
final bool ignoreErrors = true;
final JsonEncoder encoder = const JsonEncoder.withIndent(" ");

VRChatAPI({String cookie = "", this.logger}) {
VRChatAPI({String cookie = "", String userAgent = "", this.logger}) {
vrchatSession.headers["cookie"] = cookie;
vrchatSession.headers["user-agent"] = userAgent;
}

String getCookie() {
Expand Down
5 changes: 4 additions & 1 deletion lib/assets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ class Assets {
// cspell:disable-next-line
static String charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._';

static String userAgentBase = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36";
static String userAgent(String version) => '$userAgentBase VRCManager/$version ($repository)';

static Uri github = Uri.https("github.com");
static Uri twitter = Uri.https("twitter.com");
static Uri googlePlay = Uri.https("play.google.com");

static Uri repository = Assets.github.resolve("/fa0311/vrc_manager");
static Uri issues = Assets.github.resolve("/fa0311/vrc_manager/issues/new/choose");
static Uri contact = Assets.twitter.resolve("/faa0311");
static Uri rate = Assets.twitter.replace(path: "/store/apps/details", queryParameters: {"id": "com.yuki0311.vrc_manager"});
static Uri rate = Assets.googlePlay.replace(path: "/store/apps/details", queryParameters: {"id": "com.yuki0311.vrc_manager"});
static Uri release = Assets.github.resolve("/fa0311/vrc_manager/releases");
static Uri report = Assets.github.replace(path: "/fa0311/vrc_manager/issues/new", queryParameters: {"template": "redirected-from-app.yml"});
static Uri userPolicy = Assets.github.resolve("/fa0311/vrc_manager/blob/master/docs/user_policies/ja.md");
Expand Down
5 changes: 4 additions & 1 deletion lib/assets/session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import 'dart:io';
import 'package:http/http.dart' as http;

class Session {
Map<String, String> headers = <String, String>{'cookie': ''};
Map<String, String> headers = <String, String>{
'cookie': '',
'user-agent': '',
};

Future<dynamic> get(Uri url) async {
http.Response response = await http.get(url, headers: headers);
Expand Down
4 changes: 2 additions & 2 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@
"tokenDetails": "View or change your credentials.",
"cookie": "Cookie",
"@__PERMISSIONS__": {},
"permissions": "permissions",
"permissions": "Permissions",
"domainVerification": "Associate apps with domains",
"domainVerificationDetails": "Please associate this app with vrchat.com.",
"notSupported": "Not supported",
"notSupportedDetails": "This permission is not supported on this device.",
"@____________________HELP____________________": {},
"help": "help",
"help": "Help",
"contribution": "Contribution",
"contributionDetails": "Contribute to development on Github.",
"reportDetails": "Report bugs and request new features to the developer.",
Expand Down
3 changes: 3 additions & 0 deletions lib/scenes/core/splash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart';

// Project imports:
Expand All @@ -29,6 +30,8 @@ final accountConfigProvider = ChangeNotifierProvider<AccountConfigNotifier>((ref
final accountListConfigProvider = ChangeNotifierProvider<AccountListConfigNotifier>((ref) => AccountListConfigNotifier());
final isFirstProvider = StateProvider<bool>((ref) => true);

final versionProvider = FutureProvider((ref) async => await PackageInfo.fromPlatform());

enum SplashData {
home,
login,
Expand Down
6 changes: 5 additions & 1 deletion lib/scenes/main/friend_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class VRChatMobileFriendRequestData {
}

final vrchatMobileFriendsRequestProvider = FutureProvider<VRChatMobileFriendRequestData>((ref) async {
VRChatAPI vrchatLoginSession = VRChatAPI(cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "", logger: logger);
VRChatAPI vrchatLoginSession = VRChatAPI(
cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "",
userAgent: ref.watch(accountConfigProvider).userAgent,
logger: logger,
);
List<Future> futureList = [];
List<VRChatUser> userList = [];
int len;
Expand Down
6 changes: 5 additions & 1 deletion lib/scenes/main/friends.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ class VRChatMobileFriendsData {
}

final vrchatMobileFriendsProvider = FutureProvider.family<VRChatMobileFriendsData, bool>((ref, offline) async {
VRChatAPI vrchatLoginSession = VRChatAPI(cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "", logger: logger);
VRChatAPI vrchatLoginSession = VRChatAPI(
cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "",
userAgent: ref.watch(accountConfigProvider).userAgent,
logger: logger,
);
List<Future> futureList = [];
Map<String, VRChatWorld?> locationMap = {};
Map<String, VRChatInstance?> instanceMap = {};
Expand Down
6 changes: 5 additions & 1 deletion lib/scenes/main/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ class VRChatMobileSearchData {
}

final vrchatMobileSearchProvider = FutureProvider<VRChatMobileSearchData>((ref) async {
VRChatAPI vrchatLoginSession = VRChatAPI(cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "", logger: logger);
VRChatAPI vrchatLoginSession = VRChatAPI(
cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "",
userAgent: ref.watch(accountConfigProvider).userAgent,
logger: logger,
);
List<VRChatUser> userList = [];
List<VRChatLimitedWorld> worldList = [];
int len;
Expand Down
12 changes: 10 additions & 2 deletions lib/scenes/main/worlds_favorite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ final vrchatMobileWorldFavoriteCounterProvider = StateProvider<int>((ref) => 0);

final vrchatMobileWorldFavoriteSortProvider = FutureProvider<VRChatMobileWorldFavoriteData>((ref) async {
Future getFavoriteWorld(FavoriteWorldData favoriteWorld) async {
VRChatAPI vrchatLoginSession = VRChatAPI(cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "", logger: logger);
VRChatAPI vrchatLoginSession = VRChatAPI(
cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "",
userAgent: ref.watch(accountConfigProvider).userAgent,
logger: logger,
);
int len;
do {
int offset = favoriteWorld.list.length;
Expand All @@ -46,7 +50,11 @@ final vrchatMobileWorldFavoriteSortProvider = FutureProvider<VRChatMobileWorldFa
} while (len > 0);
}

VRChatAPI vrchatLoginSession = VRChatAPI(cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "", logger: logger);
VRChatAPI vrchatLoginSession = VRChatAPI(
cookie: ref.watch(accountConfigProvider).loggedAccount?.cookie ?? "",
userAgent: ref.watch(accountConfigProvider).userAgent,
logger: logger,
);
List<Future> futureList = [];
List<FavoriteWorldData> favoriteWorld = [];
int len = 0;
Expand Down
5 changes: 2 additions & 3 deletions lib/scenes/setting/help.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ import 'package:package_info_plus/package_info_plus.dart';
import 'package:vrc_manager/assets.dart';
import 'package:vrc_manager/assets/license.dart';
import 'package:vrc_manager/main.dart';
import 'package:vrc_manager/scenes/core/splash.dart';
import 'package:vrc_manager/scenes/setting/logger.dart';
import 'package:vrc_manager/storage/accessibility.dart';
import 'package:vrc_manager/widgets/future/tile.dart';
import 'package:vrc_manager/widgets/share.dart';

final vrchatMobileVersionProvider = FutureProvider((ref) async => await PackageInfo.fromPlatform());

class VRChatMobileHelp extends ConsumerWidget {
const VRChatMobileHelp({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
AccessibilityConfigNotifier accessibilityConfig = ref.watch(accessibilityConfigProvider);
AsyncValue<PackageInfo> version = ref.watch(vrchatMobileVersionProvider);
AsyncValue<PackageInfo> version = ref.watch(versionProvider);

return Scaffold(
appBar: AppBar(
Expand Down

0 comments on commit d6f5ed9

Please sign in to comment.