diff --git a/CHANGELOG.md b/CHANGELOG.md index 66df25ce..9bf3da8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.14.1+19 + +1. 修复图标白边 +2. 修改包名 +3. 减小应用大小 + ## 2.14.0+18 1. 防止换页太快 diff --git a/android/app/build.gradle b/android/app/build.gradle index b8b532bd..e8f0f0c8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -36,7 +36,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.inter_knot" + applicationId "com.share121.inter-knot" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index b1017812..e76e11f3 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index fd03e871..bce93123 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 94ef1658..8bd824f6 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 3b4fb93a..faca8677 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 93bdc907..c68c21c1 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/assets/images/icon.webp b/assets/images/icon.webp deleted file mode 100644 index 0737cf4f..00000000 Binary files a/assets/images/icon.webp and /dev/null differ diff --git a/icon.webp b/icon.webp new file mode 100644 index 00000000..5770c4fb Binary files /dev/null and b/icon.webp differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 356ac08e..6014dc38 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -368,7 +368,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot; + PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -384,7 +384,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -401,7 +401,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -416,7 +416,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -547,7 +547,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot; + PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -569,7 +569,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot; + PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 9692d872..c6c97796 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 2d6b081c..4868cad5 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 1a44437b..07d4ffc3 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index ddfd963f..f161696d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index ed741c8f..e2814628 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 03113342..e59b1ab8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 9eaa6416..c2df7e7d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 1a44437b..07d4ffc3 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 7c8edd24..7319a5d2 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index f07df23c..ceb9dcb8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png index 3bb3b762..cae2c118 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png index 58149791..f29dd365 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index 3e7b8444..6607ee06 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index a6a1a326..5fc09b14 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index f07df23c..ceb9dcb8 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index a6466fc6..2cc18e1d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index b3988525..8664d6c1 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index ca669351..e786adae 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 7047bafa..4f6b1b2d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 02f734c4..86880724 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 4655b392..3458901f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/api_root/get_discussion.dart b/lib/api_root/get_discussion.dart index a97d8267..49a082b3 100644 --- a/lib/api_root/get_discussion.dart +++ b/lib/api_root/get_discussion.dart @@ -38,7 +38,6 @@ Future getDiscussion(int number) async { lastEditedAt: lastEditedAt == null ? null : DateTime.tryParse(lastEditedAt), commentsCount: commentsCount, - isPin: false, ); } return null; diff --git a/lib/api_user/get_discussion.dart b/lib/api_user/get_discussion.dart index f29d8ea4..a6529f62 100644 --- a/lib/api_user/get_discussion.dart +++ b/lib/api_user/get_discussion.dart @@ -38,7 +38,6 @@ Future getDiscussion(int number) async { lastEditedAt: lastEditedAt == null ? null : DateTime.tryParse(lastEditedAt), commentsCount: commentsCount, - isPin: false, ); } return null; diff --git a/lib/data.dart b/lib/data.dart index 91908470..8d442c3b 100644 --- a/lib/data.dart +++ b/lib/data.dart @@ -51,10 +51,10 @@ class Controller extends GetxController { late final info = PackageInfo.fromPlatform(); - bool canVisit(Article article) => + bool canVisit(Article article, bool isPin) => report[article.number] == null || [owner, ...collaborators].contains(article.author.login) || - article.isPin || + isPin || report[article.number]!.length < 6; @override @@ -277,5 +277,5 @@ class Controller extends GetxController { } } -bool canReport(Article article) => - ![owner, ...collaborators].contains(article.author.login) && !article.isPin; +bool canReport(Article article, bool isPin) => + ![owner, ...collaborators].contains(article.author.login) && !isPin; diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 51c767c9..c0443ffa 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -26,9 +26,6 @@ class $AssetsImagesGen { /// File path: assets/images/github.svg String get github => 'assets/images/github.svg'; - /// File path: assets/images/icon.webp - AssetGenImage get icon => const AssetGenImage('assets/images/icon.webp'); - /// File path: assets/images/profile-photo.webp AssetGenImage get profilePhoto => const AssetGenImage('assets/images/profile-photo.webp'); @@ -44,17 +41,8 @@ class $AssetsImagesGen { AssetGenImage get zzz => const AssetGenImage('assets/images/zzz.webp'); /// List of all assets - List get values => [ - bh3, - defaultCover, - drawerCover, - github, - icon, - profilePhoto, - sr, - yuanshen, - zzz - ]; + List get values => + [bh3, defaultCover, drawerCover, github, profilePhoto, sr, yuanshen, zzz]; } class Assets { diff --git a/lib/interface.dart b/lib/interface.dart index 5a1693e2..2bd42d84 100644 --- a/lib/interface.dart +++ b/lib/interface.dart @@ -82,7 +82,6 @@ class Article extends GetxController { final comments = {}.obs; var hasNextPage = true.obs; String? endCursor; - final bool isPin; late final bodyText = rawBodyText.replaceAll(RegExp(r'\s+'), ' ').trim(); final cache = {}; @@ -108,7 +107,6 @@ class Article extends GetxController { required this.createdAt, required this.commentsCount, this.lastEditedAt, - required this.isPin, }); @override @@ -202,8 +200,7 @@ class HData { HData(this.number, {this.isPin = false}); HData.fromStr(String number) : this(int.parse(number)); - HData.fromArtilce(Article article) - : this(article.number, isPin: article.isPin); + HData.fromArtilce(Article article) : this(article.number); @override operator ==(Object other) => other is HData && other.number == number; diff --git a/lib/l10n.dart b/lib/l10n.dart index 4e8f665e..d2f26396 100644 --- a/lib/l10n.dart +++ b/lib/l10n.dart @@ -92,6 +92,7 @@ class Messages extends Translations { 'User Api': '用户接口', 'Announcement': '公告', 'Polls': '投票', + 'Toolkit': '工具', }, 'zh_TC': { 'Inter-Knot': '绳网', @@ -180,6 +181,7 @@ class Messages extends Translations { 'User Api': '用户接口', 'Announcement': '公告', 'Polls': '投票', + 'Toolkit': '工具', }, }; } diff --git a/lib/main.dart b/lib/main.dart index b0086f88..ec4661e6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:get/get.dart'; +import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import 'package:url_launcher/url_launcher_string.dart'; import 'package:window_manager/window_manager.dart'; @@ -15,6 +16,7 @@ import 'pages/history_page.dart'; import 'pages/liked_page.dart'; import 'pages/partition_page.dart'; import 'pages/notifications_page.dart'; +import 'pages/toolkit_page.dart'; import 'widget/github_button.dart'; import 'widget/discord_button.dart'; import 'widget/doc_button.dart'; @@ -72,7 +74,7 @@ class MyApp extends StatelessWidget { locale: Get.deviceLocale, themeMode: ThemeMode.dark, fallbackLocale: const Locale('en'), - home: const DragToResizeArea(child: MyHomePage()), + home: const MyHomePage(), debugShowCheckedModeBanner: false, ); } @@ -103,6 +105,11 @@ final destinations = [ selectedIcon: const Icon(Icons.history), label: Text('History'.tr), ), + NavigationRailDestination( + icon: Icon(MdiIcons.toolboxOutline), + selectedIcon: Icon(MdiIcons.toolbox), + label: Text('Toolkit'.tr), + ), NavigationRailDestination( icon: const Icon(Icons.settings_outlined), selectedIcon: const Icon(Icons.settings), @@ -183,14 +190,14 @@ class MyHomePage extends StatelessWidget { LayoutBuilder(builder: (context, con) { return SingleChildScrollView( child: SizedBox( - height: max(con.maxHeight, 292), + height: max(con.maxHeight, 336), child: Obx(() { return NavigationRail( destinations: destinations, selectedIndex: c.selectedIndex(), onDestinationSelected: (index) => c.animateToPage(index), - labelType: con.maxHeight < 392 + labelType: con.maxHeight < 456 ? NavigationRailLabelType.selected : NavigationRailLabelType.all, ); @@ -209,6 +216,7 @@ class MyHomePage extends StatelessWidget { PartitionPage(), LikedPage(), HistoryPage(), + ToolkitPage(), SettingsPage(), ][index], ), diff --git a/lib/pages/article_page.dart b/lib/pages/article_page.dart index c414452c..c3df2690 100644 --- a/lib/pages/article_page.dart +++ b/lib/pages/article_page.dart @@ -16,10 +16,16 @@ import '../data.dart'; import '../widget/window_buttons.dart'; class ArticlePage extends StatefulWidget { - const ArticlePage({super.key, required this.article, required this.heroKey}); + const ArticlePage({ + super.key, + required this.article, + required this.heroKey, + required this.isPin, + }); final Article article; final Object heroKey; + final bool isPin; @override State createState() => _ArticlePageState(); @@ -126,7 +132,7 @@ class _ArticlePageState extends State { ), child: const Icon(Icons.arrow_upward), ), - if (canReport(widget.article)) ...[ + if (canReport(widget.article, widget.isPin)) ...[ const SizedBox(height: 8), FloatingActionButton( heroTag: null, diff --git a/lib/pages/toolkit_page.dart b/lib/pages/toolkit_page.dart new file mode 100644 index 00000000..95860180 --- /dev/null +++ b/lib/pages/toolkit_page.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:waterfall_flow/waterfall_flow.dart'; + +class ToolkitPage extends StatelessWidget { + const ToolkitPage({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: NestedScrollView( + headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) => + [SliverAppBar(title: Text('Toolkit'.tr))], + floatHeaderSlivers: true, + body: WaterfallFlow.extent( + maxCrossAxisExtent: 270, + padding: const EdgeInsets.all(8), + children: [ + Card( + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + children: [ + Text( + 'Toolkit', + style: Theme.of(context).textTheme.headlineSmall, + ), + ], + ), + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/widget/article_grid.dart b/lib/widget/article_grid.dart index b3932822..7a1779cf 100644 --- a/lib/widget/article_grid.dart +++ b/lib/widget/article_grid.dart @@ -58,9 +58,13 @@ class ArticleGrid extends StatelessWidget { if (snaphost.hasData) { return DiscussionCard( article: snaphost.data!, + isPin: item.isPin, onTap: (heroKey) { - Get.to(() => - ArticlePage(heroKey: heroKey, article: snaphost.data!)); + Get.to(() => ArticlePage( + heroKey: heroKey, + article: snaphost.data!, + isPin: item.isPin, + )); }, ); } diff --git a/lib/widget/discussion_card.dart b/lib/widget/discussion_card.dart index b6dc8a70..5926c280 100644 --- a/lib/widget/discussion_card.dart +++ b/lib/widget/discussion_card.dart @@ -10,9 +10,11 @@ import 'avatar.dart'; import 'comment_count.dart'; class DiscussionCard extends StatefulWidget { - const DiscussionCard({super.key, this.onTap, required this.article}); + const DiscussionCard( + {super.key, this.onTap, required this.article, required this.isPin}); final Article article; + final bool isPin; final void Function(Object heroKey)? onTap; @override @@ -29,7 +31,7 @@ class _DiscussionCardState extends State { clipBehavior: Clip.antiAlias, elevation: elevation, child: Obx(() { - if (!c.canVisit(widget.article)) { + if (!c.canVisit(widget.article, widget.isPin)) { return AspectRatio( aspectRatio: 5 / 6, child: InkWell( @@ -75,7 +77,7 @@ class _DiscussionCardState extends State { color: Colors.white, ), ), - if (widget.article.isPin) + if (widget.isPin) Positioned( top: 8, right: 12, diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png index b21a63e6..94fca402 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index d00c7d93..b2b2f3a0 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index 3cc3f03a..47b115a8 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png index 82bc9311..39957df7 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png index 8c516b48..922941e1 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png index ff99da85..c7e471ba 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 51d64830..e3e10f6d 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index d4952093..710a4a93 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -8,7 +8,7 @@ PRODUCT_NAME = 绳网 // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.share121.interKnot +PRODUCT_BUNDLE_IDENTIFIER = com.share121.inter-knot // The copyright displayed in application information PRODUCT_COPYRIGHT = Copyright © 2024 com.share121. All rights reserved. diff --git a/pubspec.lock b/pubspec.lock index 5206415a..c0d058eb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -222,14 +222,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" - console: - dependency: transitive - description: - name: console - sha256: e04e7824384c5b39389acdd6dc7d33f3efe6b232f6f16d7626f194f6a01ad69a - url: "https://pub.flutter-io.cn" - source: hosted - version: "4.1.0" convert: dependency: transitive description: @@ -562,14 +554,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.6.6" - get_it: - dependency: transitive - description: - name: get_it - sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 - url: "https://pub.flutter-io.cn" - source: hosted - version: "7.7.0" glob: dependency: transitive description: @@ -770,6 +754,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.11.1" + material_design_icons_flutter: + dependency: "direct main" + description: + name: material_design_icons_flutter + sha256: "6f986b7a51f3ad4c00e33c5c84e8de1bdd140489bbcdc8b66fc1283dad4dea5a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.7296" meta: dependency: transitive description: @@ -786,14 +778,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" - msix: - dependency: "direct dev" - description: - name: msix - sha256: c50d6bd1aafe0d071a3c1e5a5ccb056404502935cb0a549e3178c4aae16caf33 - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.16.8" nested: dependency: transitive description: @@ -970,14 +954,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.27.7" - schedulers: - dependency: "direct main" - description: - name: schedulers - sha256: "11a3694c700735b85d6955ffebde32fd5e06ed5f52f2679e30973e6437fcc998" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" screen_retriever: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 5b67c98c..9c2ea37e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: inter_knot description: 绳网是一个游戏、技术交流平台 publish_to: none -version: 2.14.0+18 +version: 2.14.1+19 repository: https://github.com/share121/inter_knot environment: @@ -31,8 +31,8 @@ dependencies: flutter_svg: ^2.0.10+1 package_info_plus: ^8.0.2 pub_semver: ^2.1.4 - schedulers: ^1.0.1 flutter_keyboard_visibility: ^6.0.0 + material_design_icons_flutter: ^7.0.7296 dev_dependencies: flutter_test: @@ -41,13 +41,12 @@ dev_dependencies: flutter_gen_runner: ^5.6.0 build_runner: ^2.4.12 flutter_launcher_icons: ^0.13.1 - msix: ^3.16.8 flutter_launcher_icons: android: true ios: true remove_alpha_ios: true - image_path: assets/images/icon.png + image_path: icon.webp web: generate: true windows: @@ -67,9 +66,9 @@ msix_config: publisher_display_name: share121 identity_name: com.share121.inter-knot msix_version: 1.0.0.0 - logo_path: assets/images/icon.png + logo_path: icon.webp capabilities: internetClient - languages: zh-CN, en-US + languages: zh-CN, zh-TC, en-US false_secrets: - assets/private_key.pem diff --git a/release-content.md b/release-content.md index 363cab9e..167c1984 100644 --- a/release-content.md +++ b/release-content.md @@ -1,2 +1,3 @@ -1. 防止换页太快 -2. 优化加载机制 +1. 修复图标白边 +2. 修改包名 +3. 减小应用大小 diff --git a/web/favicon.png b/web/favicon.png index 3cc3f03a..47b115a8 100644 Binary files a/web/favicon.png and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png index 93bdc907..c68c21c1 100644 Binary files a/web/icons/Icon-192.png and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png index ff99da85..c7e471ba 100644 Binary files a/web/icons/Icon-512.png and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png index 93bdc907..c68c21c1 100644 Binary files a/web/icons/Icon-maskable-192.png and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png index ff99da85..c7e471ba 100644 Binary files a/web/icons/Icon-maskable-512.png and b/web/icons/Icon-maskable-512.png differ diff --git a/web/manifest.json b/web/manifest.json index 8595a4b5..13d2fe67 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,35 +1,35 @@ { - "name": "绳网", - "short_name": "绳网", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "绳网是一个游戏、技术交流平台", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} + "name": "绳网", + "short_name": "绳网", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "绳网是一个游戏、技术交流平台", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} \ No newline at end of file diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 441cd72c..8ed55285 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -92,7 +92,7 @@ BEGIN VALUE "CompanyName", "com.share121" "\0" VALUE "FileDescription", "inter_knot" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "inter_knot" "\0" + VALUE "InternalName", "com.share121.inter-knot" "\0" VALUE "LegalCopyright", "Copyright (C) 2024 com.share121. All rights reserved." "\0" VALUE "OriginalFilename", "inter_knot.exe" "\0" VALUE "ProductName", "inter_knot" "\0" diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico index 6ed58e7c..05fda3ca 100644 Binary files a/windows/runner/resources/app_icon.ico and b/windows/runner/resources/app_icon.ico differ