修复一下

This commit is contained in:
rang 2025-10-25 17:22:39 +08:00
parent 41ade02ace
commit debba61cad
4 changed files with 16 additions and 27 deletions

View file

@ -195,7 +195,7 @@ jobs:
dist/*/*.zip
build_ios_macos:
# needs: test
needs: test
runs-on: macos-latest
permissions:
contents: write

View file

@ -5,6 +5,7 @@ on:
workflow_dispatch:
inputs:
bump_type:
# 版本碰撞类型(补丁、次要、主要)
description: "Type of version bump (patch, minor, major)"
required: true
type: choice

View file

@ -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,

View file

@ -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',