mirror of
https://github.com/venera-app/venera.git
synced 2025-12-16 15:11:14 +00:00
Compare commits
1 Commits
fix/deb-de
...
feat/login
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ccf0eea43 |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -143,7 +143,7 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
||||||
dart pub global activate flutter_to_debian --source git https://github.com/venera-app/flutter_to_debian.git
|
dart pub global activate flutter_to_debian
|
||||||
- run: python3 debian/build.py x64
|
- run: python3 debian/build.py x64
|
||||||
- run: dart run flutter_to_arch
|
- run: dart run flutter_to_arch
|
||||||
- run: |
|
- run: |
|
||||||
@@ -171,7 +171,7 @@ jobs:
|
|||||||
flutter pub get
|
flutter pub get
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
||||||
dart pub global activate flutter_to_debian --source git https://github.com/venera-app/flutter_to_debian.git
|
dart pub global activate flutter_to_debian
|
||||||
- name: "Patch font"
|
- name: "Patch font"
|
||||||
run: |
|
run: |
|
||||||
dart run patch/font.dart
|
dart run patch/font.dart
|
||||||
|
|||||||
@@ -1245,6 +1245,15 @@ class _LoginPageState extends State<_LoginPage> {
|
|||||||
if (widget.config.checkLoginStatus != null &&
|
if (widget.config.checkLoginStatus != null &&
|
||||||
widget.config.checkLoginStatus!(url, title)) {
|
widget.config.checkLoginStatus!(url, title)) {
|
||||||
var cookies = (await c.getCookies(url)) ?? [];
|
var cookies = (await c.getCookies(url)) ?? [];
|
||||||
|
var localStorageItems = await c.webStorage.localStorage.getItems();
|
||||||
|
var mappedLocalStorage = <String, dynamic>{};
|
||||||
|
for (var item in localStorageItems) {
|
||||||
|
if (item.key != null) {
|
||||||
|
mappedLocalStorage[item.key!] = item.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
widget.source.data['_localStorage'] = mappedLocalStorage;
|
||||||
|
await widget.source.saveData();
|
||||||
SingleInstanceCookieJar.instance?.saveFromResponse(
|
SingleInstanceCookieJar.instance?.saveFromResponse(
|
||||||
Uri.parse(url),
|
Uri.parse(url),
|
||||||
cookies,
|
cookies,
|
||||||
@@ -1306,6 +1315,20 @@ class _LoginPageState extends State<_LoginPage> {
|
|||||||
Uri.parse(url),
|
Uri.parse(url),
|
||||||
cookies,
|
cookies,
|
||||||
);
|
);
|
||||||
|
var localStorageJson = await webview.evaluateJavascript(
|
||||||
|
"JSON.stringify(window.localStorage);",
|
||||||
|
);
|
||||||
|
var localStorage = <String, dynamic>{};
|
||||||
|
try {
|
||||||
|
var decoded = jsonDecode(localStorageJson ?? '');
|
||||||
|
if (decoded is Map<String, dynamic>) {
|
||||||
|
localStorage = decoded;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
Log.error("ComicSourcePage", "Failed to parse localStorage JSON\n$e");
|
||||||
|
}
|
||||||
|
widget.source.data['_localStorage'] = localStorage;
|
||||||
|
await widget.source.saveData();
|
||||||
success = true;
|
success = true;
|
||||||
widget.config.onLoginWithWebviewSuccess?.call();
|
widget.config.onLoginWithWebviewSuccess?.call();
|
||||||
webview.close();
|
webview.close();
|
||||||
|
|||||||
@@ -478,11 +478,10 @@ packages:
|
|||||||
flutter_to_debian:
|
flutter_to_debian:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
path: "."
|
name: flutter_to_debian
|
||||||
ref: HEAD
|
sha256: d23534407334b331ce20fbaa8395b9ecc255d0c047136b8998715f36933ee696
|
||||||
resolved-ref: "3777c91b6b1cc0b7c03357c67ca216d4313c3db5"
|
url: "https://pub.dev"
|
||||||
url: "https://github.com/venera-app/flutter_to_debian.git"
|
source: hosted
|
||||||
source: git
|
|
||||||
version: "2.0.2"
|
version: "2.0.2"
|
||||||
flutter_web_plugins:
|
flutter_web_plugins:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
|
|||||||
@@ -93,9 +93,7 @@ dev_dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^5.0.0
|
||||||
flutter_to_arch: ^1.0.1
|
flutter_to_arch: ^1.0.1
|
||||||
flutter_to_debian:
|
flutter_to_debian: ^2.0.2
|
||||||
git:
|
|
||||||
url: https://github.com/venera-app/flutter_to_debian.git
|
|
||||||
archive: any
|
archive: any
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|
|||||||
Reference in New Issue
Block a user