mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-09 20:45:00 +08:00
Compare commits
6 Commits
88f0ab1dea
...
2.0.8.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b9403a329 | ||
|
|
c44e92dcc8 | ||
|
|
14d1c37df5 | ||
|
|
78b3df4019 | ||
|
|
9acb32aaeb | ||
|
|
50070997de |
@@ -236,6 +236,20 @@ class LoginPageController extends GetxController
|
||||
}
|
||||
}
|
||||
|
||||
static String validateCookie(String cookie) {
|
||||
return cookie
|
||||
.split(';')
|
||||
.where((e) {
|
||||
try {
|
||||
Cookie.fromSetCookieValue(e.trim());
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.join(';');
|
||||
}
|
||||
|
||||
// cookie登录
|
||||
Future<void> loginByCookie() async {
|
||||
if (cookieTextController.text.isEmpty) {
|
||||
@@ -247,7 +261,7 @@ class LoginPageController extends GetxController
|
||||
"/x/member/web/account",
|
||||
options: Options(
|
||||
headers: {
|
||||
"cookie": cookieTextController.text,
|
||||
"cookie": validateCookie(cookieTextController.text),
|
||||
},
|
||||
extra: {'account': AnonymousAccount()},
|
||||
),
|
||||
|
||||
@@ -11,7 +11,6 @@ import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/accounts/account.dart';
|
||||
import 'package:PiliPlus/utils/extension/scroll_controller_ext.dart';
|
||||
import 'package:PiliPlus/utils/login_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
@@ -112,20 +111,22 @@ class MineController extends CommonDataController<FavFolderData, FavFolderData>
|
||||
..face.value = response.face!
|
||||
..isLogin.value = true;
|
||||
} else {
|
||||
LoginUtils.onLogoutMain();
|
||||
_onLogoutMain();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
final errMsg = res.toString();
|
||||
SmartDialog.showToast(errMsg);
|
||||
if (errMsg == '账号未登录') {
|
||||
LoginUtils.onLogoutMain();
|
||||
_onLogoutMain();
|
||||
return;
|
||||
}
|
||||
}
|
||||
queryUserStatOwner();
|
||||
}
|
||||
|
||||
void _onLogoutMain() => Accounts.deleteAll({Accounts.main});
|
||||
|
||||
Future<void> queryUserStatOwner() async {
|
||||
final res = await UserHttp.userStatOwner();
|
||||
if (res case Success(:final response)) {
|
||||
|
||||
13
lib/scripts/navigation_drawer.patch
Normal file
13
lib/scripts/navigation_drawer.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/packages/flutter/lib/src/material/navigation_drawer.dart b/packages/flutter/lib/src/material/navigation_drawer.dart
|
||||
index 8a16764cb0c..6b8545c3781 100644
|
||||
--- a/packages/flutter/lib/src/material/navigation_drawer.dart
|
||||
+++ b/packages/flutter/lib/src/material/navigation_drawer.dart
|
||||
@@ -410,7 +410,7 @@ class _NavigationDestinationBuilder extends StatelessWidget {
|
||||
child: _NavigationDestinationSemantics(
|
||||
child: SizedBox(
|
||||
height: navigationDrawerTheme.tileHeight ?? defaults.tileHeight,
|
||||
- child: inkWell,
|
||||
+ child: Material(type: MaterialType.transparency, child: inkWell),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -26,6 +26,9 @@ $ImageAnimPatch = "lib/scripts/image_anim.patch"
|
||||
|
||||
$LayoutBuilderPatch = "lib/scripts/layout_builder.patch"
|
||||
|
||||
# https://github.com/bggRGjQaUbCoE/PiliPlus/issues/2308
|
||||
$NavigationDrawerPatch = "lib/scripts/navigation_drawer.patch"
|
||||
|
||||
# TODO: remove
|
||||
# https://github.com/flutter/flutter/issues/90223
|
||||
$ModalBarrierPatch = "lib/scripts/modal_barrier.patch"
|
||||
@@ -46,7 +49,7 @@ Set-Location $env:FLUTTER_ROOT
|
||||
$picks = @()
|
||||
$reverts = @()
|
||||
$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch,
|
||||
$ImageAnimPatch, $LayoutBuilderPatch)
|
||||
$ImageAnimPatch, $LayoutBuilderPatch, $NavigationDrawerPatch)
|
||||
|
||||
switch ($platform.ToLower()) {
|
||||
"android" {
|
||||
@@ -103,12 +106,7 @@ foreach ($patch in $patches) {
|
||||
|
||||
# TODO: remove
|
||||
if ($platform.ToLower() -eq "android") {
|
||||
git stash
|
||||
git cherry-pick 625275cfae17b27c9049b0740a9ef67d626b3b1c -X ours
|
||||
git reset --soft HEAD~1
|
||||
git stash pop
|
||||
git restore DEPS
|
||||
"f84bd039a0692e5cab5383a8de29bc41151a4dfd" | Set-Content -Path .\bin\internal\engine.version
|
||||
"df67bb3b55323961184ae7117cc91c054f36a42c" | Set-Content -Path .\bin\internal\engine.version
|
||||
Remove-Item -Path ".\bin\cache" -Recurse -Force
|
||||
flutter --version
|
||||
}
|
||||
@@ -234,7 +234,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: b442c6c8309a17d8b9d395d08eadc401b42f4f8f
|
||||
resolved-ref: "697d4516df2fc3ba7417c7ce9aba079d34ba13e5"
|
||||
url: "https://github.com/bggRGjQaUbCoE/canvas_danmaku.git"
|
||||
source: git
|
||||
version: "0.2.6"
|
||||
@@ -2001,4 +2001,4 @@ packages:
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.12.0 <4.0.0"
|
||||
flutter: "3.44.0"
|
||||
flutter: "3.44.1"
|
||||
|
||||
@@ -21,7 +21,7 @@ version: 2.0.8+1
|
||||
|
||||
environment:
|
||||
sdk: ">=3.12.0"
|
||||
flutter: 3.44.0
|
||||
flutter: 3.44.1
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
|
||||
Reference in New Issue
Block a user