This commit is contained in:
niuhuan 2023-01-21 17:53:22 +08:00
parent 442cc5d045
commit 6bcfd68f34
11 changed files with 97 additions and 72 deletions

View File

@ -58,10 +58,13 @@ jobs:
flutter_version: '2.10.3'
- target: macos
host: macos-latest
flutter_version: '2.10.3'
flutter_version: '3.3.10'
- target: linux
host: ubuntu-latest
flutter_version: '3.3.10'
- target: ios
host: macos-latest
flutter_version: '3.3.4'
flutter_version: '3.3.10'
- target: android-arm32
host: ubuntu-latest
flutter_version: '2.10.5'
@ -73,13 +76,13 @@ jobs:
flutter_version: '2.10.5'
- target: android-arm32
host: ubuntu-latest
flutter_version: '3.3.4'
flutter_version: '3.3.10'
- target: android-arm64
host: ubuntu-latest
flutter_version: '3.3.4'
flutter_version: '3.3.10'
- target: android-x86_64
host: ubuntu-latest
flutter_version: '3.3.4'
flutter_version: '3.3.10'
runs-on: ${{ matrix.config.host }}
@ -210,7 +213,7 @@ jobs:
mv appimagetool-x86_64.AppImage ${GITHUB_WORKSPACE}/bin/appimagetool
echo ::add-path::${GITHUB_WORKSPACE}/bin
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev xorg-dev
sudo apt-get install -y libgl1-mesa-dev xorg-dev libfuse2
- name: Install hover (desktop)
if: steps.check_asset.outputs.skip_build != 'true' && ( matrix.config.target == 'linux' || matrix.config.target == 'windows' || matrix.config.target == 'macos')
@ -250,6 +253,7 @@ jobs:
- name: Build (windows)
if: steps.check_asset.outputs.skip_build != 'true' && matrix.config.target == 'windows'
run: |
sed -i "s/3316dd8728419ad3534e3f6112aa6291f587078a/ac5c83dd5ff1ddfae2f642401f67db550428aee3/g" pubspec.yaml
hover build windows
curl -JOL https://github.com/niuhuan/static-resources/releases/download/windows_build_tools/Resource_Hacker_5.1.8.zip
Expand-Archive .\Resource_Hacker_5.1.8.zip

View File

@ -1 +1 @@
v1.5.14
v1.6.1

View File

@ -1,20 +1,5 @@
## !! WARNING !!
IOS 用户请注意, 由于导出权限的问题, 本次升级后, 数据将会被移出数据库 并现显示到文件管理器, 您登录windows端后, 将文件复制到windows端的data目录并覆盖, 即可恢复数据继续阅读。 随后系统将会重新创建数据库, 您可将下载传输回手机。
其他平台用户不受影响。
##
v1.5.14
- [x] 🚀使用其他漫画软件的下载内容加速
v1.5.13
v1.6.2
- [x] ♻使用分流1和CDN-3分流进行直连
- [x] ♻升级flutter
- [x] 🚀IOS支持导出到文件
- [x] ♻消除WebToon横向阅读时的抖动
- [x] 🐛修复一些布局问题
- [x] ♻️反转下载章节的列表
- [x] 🚀下载支持搜索

View File

@ -92,7 +92,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
@ -102,7 +102,7 @@ SPEC CHECKSUMS:
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
uri_to_file: c4726881848febf4806f0a5707bd12903e02b0f0
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

View File

@ -504,8 +504,10 @@ class Method {
}
///
Future<List<DownloadComic>> allDownloads() async {
var data = await _flatInvoke("allDownloads", "");
Future<List<DownloadComic>> allDownloads(String search) async {
var data = await _flatInvoke("allDownloads", {
"search": search,
});
data = jsonDecode(data);
if (data == null) {
return [];

View File

@ -3,11 +3,12 @@ import 'package:flutter/material.dart';
import '../Method.dart';
var _imageAddresses = {
"-1": "跟随api分流",
"-3": "CDN-3",
"-2": "CDN-2",
"-1": "CDN-1",
"0": "不分流",
"1": "分流1 (推荐)",
"1": "分流1",
"2": "分流2",
"3": "分流3",
};
late String _currentImageAddress;

View File

@ -15,7 +15,7 @@ class DownloadExportGroupScreen extends StatefulWidget {
}
class _DownloadExportGroupScreenState extends State<DownloadExportGroupScreen> {
late Future<List<DownloadComic>> _f = method.allDownloads();
late Future<List<DownloadComic>> _f = method.allDownloads("");
@override
Widget build(BuildContext context) {
@ -68,7 +68,7 @@ class _DownloadExportGroupScreenState extends State<DownloadExportGroupScreen> {
onRefresh: () async {
setState(() {
selected.clear();
_f = method.allDownloads();
_f = method.allDownloads("");
});
},
child: ListView(

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_search_bar/flutter_search_bar.dart';
import 'package:pikapika/basic/Channels.dart';
import 'package:pikapika/basic/Common.dart';
import 'package:pikapika/basic/Entities.dart';
@ -22,9 +23,35 @@ class DownloadListScreen extends StatefulWidget {
}
class _DownloadListScreenState extends State<DownloadListScreen> {
String _search = "";
late final SearchBar _searchBar = SearchBar(
hintText: '搜索下载',
inBar: false,
setState: setState,
onSubmitted: (value) {
if (value.isNotEmpty) {
_search = value;
_f = method.allDownloads(_search);
_searchBar.controller.text = value;
}
},
buildDefaultAppBar: (BuildContext context) {
return AppBar(
title: Text(_search == "" ? "下载列表" : ('搜索下载 - $_search')),
actions: [
_searchBar.getSearchAction(context),
exportButton(),
importButton(),
resetFailedButton(),
pauseButton(),
],
);
},
);
DownloadComic? _downloading;
late bool _downloadRunning = false;
late Future<List<DownloadComic>> _f = method.allDownloads();
late Future<List<DownloadComic>> _f = method.allDownloads(_search);
void _onMessageChange(String event) {
print("EVENT");
@ -57,15 +84,7 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
@override
Widget build(BuildContext context) {
final screen = Scaffold(
appBar: AppBar(
title: const Text('下载列表'),
actions: [
exportButton(),
importButton(),
resetFailedButton(),
pauseButton(),
],
),
appBar: _searchBar.build(context),
body: FutureBuilder(
future: _f,
builder: (BuildContext context,
@ -97,7 +116,7 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
return RefreshIndicator(
onRefresh: () async {
setState(() {
_f = method.allDownloads();
_f = method.allDownloads(_search);
});
},
child: ListView(
@ -183,7 +202,7 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
),
);
setState(() {
_f = method.allDownloads();
_f = method.allDownloads(_search);
});
},
icon: Column(
@ -262,7 +281,7 @@ class _DownloadListScreenState extends State<DownloadListScreen> {
onPressed: () async {
await method.resetFailed();
setState(() {
_f = method.allDownloads();
_f = method.allDownloads(_search);
});
defaultToast(context, "所有失败的下载已经恢复");
},

View File

@ -182,8 +182,8 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
if (num == 0 || num > comicsPage.pages) {
return;
}
if (num > 50 && !isPro) {
defaultToast(context, "发电以后才能看50页以后的内容");
if (num > 10 && !isPro) {
defaultToast(context, "发电以后才能看10页以后的内容");
return;
}
_currentPage = num;
@ -218,8 +218,8 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
minWidth: 0,
onPressed: () {
if (comicsPage.page < comicsPage.pages) {
if (_currentPage >= 50 && !isPro) {
defaultToast(context, "发电以后才能看50页以后的内容");
if (_currentPage >= 10 && !isPro) {
defaultToast(context, "发电以后才能看10页以后的内容");
return;
}
_currentPage = comicsPage.page + 1;
@ -240,8 +240,8 @@ class _ControllerComicPagerState extends State<ControllerComicPager> {
if (comicsPage.page < comicsPage.pages) {
return FitButton(
onPressed: () {
if (_currentPage >= 50 && !isPro) {
defaultToast(context, "发电以后才能看50页以后的内容");
if (_currentPage >= 10 && !isPro) {
defaultToast(context, "发电以后才能看10页以后的内容");
return;
}
_currentPage = comicsPage.page + 1;
@ -317,7 +317,7 @@ class _StreamComicPagerState extends State<StreamComicPager> {
_maxPage = page.pages;
_list.addAll(page.docs);
_over = page.page >= page.pages;
_noPro = _currentPage > 50 && !isPro;
_noPro = _currentPage > 10 && !isPro;
});
} catch (e, s) {
_error = true;
@ -430,8 +430,8 @@ class _StreamComicPagerState extends State<StreamComicPager> {
if (num == 0 || num > _maxPage) {
return;
}
if (_currentPage >= 50 && !isPro) {
defaultToast(context, "发电以后才能看50页以后的内容");
if (_currentPage >= 10 && !isPro) {
defaultToast(context, "发电以后才能看10页以后的内容");
return;
}
_currentPage = num;

View File

@ -14,7 +14,7 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.2"
version: "3.3.5"
async:
dependency: transitive
description:
@ -57,6 +57,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
crop_image:
dependency: "direct main"
description:
@ -112,7 +119,7 @@ packages:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.2"
version: "5.2.5"
filesystem_picker:
dependency: "direct main"
description:
@ -202,7 +209,7 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.2"
version: "3.3.0"
image_cropper:
dependency: "direct main"
description:
@ -216,14 +223,14 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.6"
version: "0.8.6+1"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.5+3"
version: "0.8.5+5"
image_picker_for_web:
dependency: transitive
description:
@ -237,7 +244,7 @@ packages:
name: image_picker_ios
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.6+1"
version: "0.8.6+6"
image_picker_platform_interface:
dependency: transitive
description:
@ -307,7 +314,7 @@ packages:
name: multi_select_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.2"
version: "4.1.3"
path:
dependency: "direct main"
description:
@ -385,6 +392,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
pointycastle:
dependency: transitive
description:
name: pointycastle
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.2"
scrollable_positioned_list:
dependency: "direct main"
description:
@ -480,35 +494,35 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.6"
version: "6.1.8"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.20"
version: "6.0.23"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.17"
version: "6.0.18"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
url_launcher_platform_interface:
dependency: transitive
description:
@ -522,14 +536,14 @@ packages:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
version: "2.0.14"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
vector_math:
dependency: transitive
description:
@ -543,7 +557,7 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.1.3"
xml:
dependency: transitive
description:

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.5.14+8
version: 1.6.1+9
environment:
sdk: ">=2.12.0 <3.0.0"