From f0f305a6a84d6fe6466bd24b1c56c4edb45a185a Mon Sep 17 00:00:00 2001 From: 3003h Date: Wed, 1 Nov 2023 23:14:35 +0800 Subject: [PATCH] Bump version --- changelog/v1.4.8+518.md | 11 ++++++++ lib/pages/setting/block_rule_edit_page.dart | 31 +++++++++++++++++++++ lib/pages/setting/block_rules_page.dart | 30 ++++++++++++++++++++ lib/pages/setting/blockers_page.dart | 14 ++++++++++ lib/pages/tab/view/home_page_large.dart | 12 ++++++++ lib/route/app_pages.dart | 10 +++++++ lib/route/routes.dart | 2 ++ pubspec.yaml | 2 +- 8 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 changelog/v1.4.8+518.md create mode 100644 lib/pages/setting/block_rule_edit_page.dart create mode 100644 lib/pages/setting/block_rules_page.dart diff --git a/changelog/v1.4.8+518.md b/changelog/v1.4.8+518.md new file mode 100644 index 000000000..ac8b71bdd --- /dev/null +++ b/changelog/v1.4.8+518.md @@ -0,0 +1,11 @@ +## 修正 + +- 同步网站关于原图链接的更新,目前旧版本应该无法下载原图 +- 导入设置数据时,保持现有设置的下载路径设置,避免跨系统导入数据导致下载路径问题 + + +## 新增 + +- 样式设置中,添加画廊评论显示开关,缩略图显示开关 +- 添加水平缩略图布局,可在样式设置中启用 +- 将部分数据库操作放到在单独的isolate线程中进行,避免在主线程中进行数据库操作导致的卡顿 \ No newline at end of file diff --git a/lib/pages/setting/block_rule_edit_page.dart b/lib/pages/setting/block_rule_edit_page.dart new file mode 100644 index 000000000..0cc3e949a --- /dev/null +++ b/lib/pages/setting/block_rule_edit_page.dart @@ -0,0 +1,31 @@ +import 'package:fehviewer/common/controller/block_controller.dart'; +import 'package:fehviewer/common/service/theme_service.dart'; +import 'package:fehviewer/fehviewer.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:get/get.dart'; + +class BlockRuleEditPage extends GetView { + const BlockRuleEditPage({super.key}); + + @override + Widget build(BuildContext context) { + final String _title = L10n.of(context).blockers; + + return Obx(() { + return CupertinoPageScaffold( + backgroundColor: !ehTheme.isDarkMode + ? CupertinoColors.secondarySystemBackground + : null, + navigationBar: CupertinoNavigationBar( + padding: const EdgeInsetsDirectional.only(start: 0), + middle: Text(_title), + ), + child: SafeArea( + bottom: false, + top: false, + child: ListView(), + ), + ); + }); + } +} diff --git a/lib/pages/setting/block_rules_page.dart b/lib/pages/setting/block_rules_page.dart new file mode 100644 index 000000000..e2da6c307 --- /dev/null +++ b/lib/pages/setting/block_rules_page.dart @@ -0,0 +1,30 @@ +import 'package:fehviewer/common/controller/block_controller.dart'; +import 'package:fehviewer/common/service/theme_service.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:get/get.dart'; + +class BlockRulesPage extends GetView { + const BlockRulesPage({super.key}); + + @override + Widget build(BuildContext context) { + final String _title = 'Block Rules'; + + return Obx(() { + return CupertinoPageScaffold( + backgroundColor: !ehTheme.isDarkMode + ? CupertinoColors.secondarySystemBackground + : null, + navigationBar: CupertinoNavigationBar( + padding: const EdgeInsetsDirectional.only(start: 0), + middle: Text(_title), + ), + child: SafeArea( + bottom: false, + top: false, + child: ListView(), + ), + ); + }); + } +} diff --git a/lib/pages/setting/blockers_page.dart b/lib/pages/setting/blockers_page.dart index e6ca7a600..7c2eec1c9 100644 --- a/lib/pages/setting/blockers_page.dart +++ b/lib/pages/setting/blockers_page.dart @@ -1,8 +1,10 @@ import 'package:fehviewer/common/controller/block_controller.dart'; +import 'package:fehviewer/common/service/layout_service.dart'; import 'package:fehviewer/common/service/theme_service.dart'; import 'package:fehviewer/component/setting_base.dart'; import 'package:fehviewer/fehviewer.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:get/get.dart'; class BlockersPage extends GetView { @@ -63,6 +65,18 @@ class BlockersPage extends GetView { top: false, child: ListView( children: [ + if (!kReleaseMode) + SelectorSettingItem( + hideDivider: true, + title: 'Block Rules', + onTap: () { + Get.toNamed( + EHRoutes.blockRules, + id: isLayoutLarge ? 2 : null, + ); + }, + ), + if (!kReleaseMode) const ItemSpace(), // 开关 Obx(() { return TextSwitchItem( diff --git a/lib/pages/tab/view/home_page_large.dart b/lib/pages/tab/view/home_page_large.dart index b4785ae7c..c61f33997 100644 --- a/lib/pages/tab/view/home_page_large.dart +++ b/lib/pages/tab/view/home_page_large.dart @@ -12,6 +12,8 @@ import 'package:fehviewer/pages/gallery/view/sliver/gallery_page.dart'; import 'package:fehviewer/pages/setting/about_page.dart'; import 'package:fehviewer/pages/setting/advanced_setting_page.dart'; import 'package:fehviewer/pages/setting/avatar_setting_page.dart'; +import 'package:fehviewer/pages/setting/block_rule_edit_page.dart'; +import 'package:fehviewer/pages/setting/block_rules_page.dart'; import 'package:fehviewer/pages/setting/blockers_page.dart'; import 'package:fehviewer/pages/setting/controller/tab_setting_controller.dart'; import 'package:fehviewer/pages/setting/custom_hosts_page.dart'; @@ -219,6 +221,16 @@ class TabHomeLarge extends GetView { settings: settings, page: () => BlockersPage(), ); + case EHRoutes.blockRules: + return GetPageRoute( + settings: settings, + page: () => BlockRulesPage(), + ); + case EHRoutes.blockRuleEdit: + return GetPageRoute( + settings: settings, + page: () => BlockRuleEditPage(), + ); case EHRoutes.avatarSetting: return GetPageRoute( settings: settings, diff --git a/lib/route/app_pages.dart b/lib/route/app_pages.dart index f35401b1e..4cc277bce 100644 --- a/lib/route/app_pages.dart +++ b/lib/route/app_pages.dart @@ -16,6 +16,8 @@ import 'package:fehviewer/pages/login/view/web_login_in.dart'; import 'package:fehviewer/pages/setting/about_page.dart'; import 'package:fehviewer/pages/setting/advanced_setting_page.dart'; import 'package:fehviewer/pages/setting/avatar_setting_page.dart'; +import 'package:fehviewer/pages/setting/block_rule_edit_page.dart'; +import 'package:fehviewer/pages/setting/block_rules_page.dart'; import 'package:fehviewer/pages/setting/blockers_page.dart'; import 'package:fehviewer/pages/setting/controller/tab_setting_controller.dart'; import 'package:fehviewer/pages/setting/custom_hosts_page.dart'; @@ -245,6 +247,14 @@ class AppPages { name: EHRoutes.blockers, page: () => const BlockersPage(), ), + GetPage( + name: EHRoutes.blockRules, + page: () => const BlockRulesPage(), + ), + GetPage( + name: EHRoutes.blockRuleEdit, + page: () => const BlockRuleEditPage(), + ), GetPage( name: EHRoutes.logfile, page: () => LogPage(), diff --git a/lib/route/routes.dart b/lib/route/routes.dart index b7b288808..feec37a51 100644 --- a/lib/route/routes.dart +++ b/lib/route/routes.dart @@ -31,6 +31,8 @@ class EHRoutes { static const String userTags = '/userTags'; static const String tagTranslate = '/tagTranslate'; static const String blockers = '/blockers'; + static const String blockRules = '/blockRules'; + static const String blockRuleEdit = '/blockRuleEdit'; static const String imageHide = '/imageHide'; static const String mangaHidedImage = '/imageHide/mangaHidedImage'; diff --git a/pubspec.yaml b/pubspec.yaml index 65fe890bd..506c911dd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: fehviewer description: An unofficial e-hentai app publish_to: 'none' -version: 1.4.7+517 +version: 1.4.8+518 environment: sdk: '>=3.0.0 <4.0.0'