diff --git a/.github/workflows/flutter-ci.yaml b/.github/workflows/flutter-ci.yaml index f2b06f6..0225972 100644 --- a/.github/workflows/flutter-ci.yaml +++ b/.github/workflows/flutter-ci.yaml @@ -195,7 +195,7 @@ jobs: dist/*/*.zip build_ios_macos: - # needs: test + needs: test runs-on: macos-latest permissions: contents: write diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index ceb9105..366f634 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -5,6 +5,7 @@ on: workflow_dispatch: inputs: bump_type: + # 版本碰撞类型(补丁、次要、主要) description: "Type of version bump (patch, minor, major)" required: true type: choice diff --git a/lib/features/explore/view/explore_page.dart b/lib/features/explore/view/explore_page.dart index 88461ac..617e40e 100644 --- a/lib/features/explore/view/explore_page.dart +++ b/lib/features/explore/view/explore_page.dart @@ -62,8 +62,8 @@ class MySearchBar extends HookConsumerWidget { currentQuery = query; // In a real application, there should be some error handling here. - final options = await api.libraries - .search(libraryId: settings.activeLibraryId!, query: query, limit: 3); + final options = + await api.libraries.search(libraryId: settings.activeLibraryId!, query: query, limit: 3); // If another search happened after this one, throw away these options. if (currentQuery != query) { @@ -82,6 +82,7 @@ class MySearchBar extends HookConsumerWidget { dividerColor: Colors.transparent, builder: (context, controller) { return SearchBar( + constraints: const BoxConstraints(minWidth: 360.0, maxWidth: 1050.0, minHeight: 56.0), controller: controller, focusNode: searchBarFocusNode, // "What's your next page-turner?" @@ -98,10 +99,7 @@ class MySearchBar extends HookConsumerWidget { // opacity: 0.5 for the hint text hintStyle: WidgetStatePropertyAll( Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Theme.of(context) - .colorScheme - .onSurface - .withValues(alpha: 0.5), + color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.5), ), ), textInputAction: TextInputAction.search, @@ -234,9 +232,8 @@ class BookSearchResultMini extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final item = ref.watch(libraryItemProvider(book.libraryItemId)).valueOrNull; - final image = item == null - ? const AsyncValue.loading() - : ref.watch(coverImageProvider(item.id)); + final image = + item == null ? const AsyncValue.loading() : ref.watch(coverImageProvider(item.id)); return ListTile( leading: SizedBox( width: 50, diff --git a/lib/router/scaffold_with_nav_bar.dart b/lib/router/scaffold_with_nav_bar.dart index d5dd00c..5e608c6 100644 --- a/lib/router/scaffold_with_nav_bar.dart +++ b/lib/router/scaffold_with_nav_bar.dart @@ -116,8 +116,7 @@ class ScaffoldWithNavBar extends HookConsumerWidget { // extended: false, destinations: _navigationItems(context).map((item) { final isDestinationLibrary = item.name == S.of(context).library; - var currentLibrary = - ref.watch(currentLibraryProvider).valueOrNull; + var currentLibrary = ref.watch(currentLibraryProvider).valueOrNull; final libraryIcon = AbsIcons.getIconByName( currentLibrary?.icon, ); @@ -126,13 +125,9 @@ class ScaffoldWithNavBar extends HookConsumerWidget { isDestinationLibrary ? libraryIcon ?? item.icon : item.icon, ), selectedIcon: Icon( - isDestinationLibrary - ? libraryIcon ?? item.activeIcon - : item.activeIcon, + isDestinationLibrary ? libraryIcon ?? item.activeIcon : item.activeIcon, ), - label: Text(isDestinationLibrary - ? currentLibrary?.name ?? item.name - : item.name), + label: Text(isDestinationLibrary ? currentLibrary?.name ?? item.name : item.name), // tooltip: item.tooltip, ); // if (isDestinationLibrary) { @@ -171,8 +166,8 @@ class ScaffoldWithNavBar extends HookConsumerWidget { // useValueListenable(ref.watch(playerExpandProgressNotifierProvider)); final playerProgress = ref.watch(playerHeightProvider); final playerMaxHeight = MediaQuery.of(context).size.height; - var percentExpandedMiniPlayer = (playerProgress - playerMinHeight) / - (playerMaxHeight - playerMinHeight); + var percentExpandedMiniPlayer = + (playerProgress - playerMinHeight) / (playerMaxHeight - playerMinHeight); // Clamp the value between 0 and 1 percentExpandedMiniPlayer = percentExpandedMiniPlayer.clamp(0.0, 1.0); return Opacity( @@ -198,13 +193,9 @@ class ScaffoldWithNavBar extends HookConsumerWidget { isDestinationLibrary ? libraryIcon ?? item.icon : item.icon, ), selectedIcon: Icon( - isDestinationLibrary - ? libraryIcon ?? item.activeIcon - : item.activeIcon, + isDestinationLibrary ? libraryIcon ?? item.activeIcon : item.activeIcon, ), - label: isDestinationLibrary - ? currentLibrary?.name ?? item.name - : item.name, + label: isDestinationLibrary ? currentLibrary?.name ?? item.name : item.name, tooltip: item.tooltip, ); if (isDestinationLibrary) { @@ -239,7 +230,7 @@ class ScaffoldWithNavBar extends HookConsumerWidget { icon: Icons.book_outlined, activeIcon: Icons.book, // tooltip: 'Browse your library', - tooltip: S.of(context).exploreTooltip, + tooltip: S.of(context).libraryTooltip, ), _NavigationItem( // name: 'Explore',