Skip to content

A cross platform Audiobookshelf client for Android and iOS

Dart

Translate the ebook reader, add a Read button to book details, and turn pages by tapping

Barnabas1d3d06e0e74d
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index aa23152f..728950f9 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -3799,5 +3799,65 @@
"libUpdated": "Library updated",
"libUpdateFailed": "Couldn't update library",
"libRemoveFoldersTitle": "Remove folders?",
- "libRemoveFoldersBody": "Removing a folder deletes its items from the library. This can't be undone."
+ "libRemoveFoldersBody": "Removing a folder deletes its items from the library. This can't be undone.",
+
+ "readEbook": "Read",
+ "moreActions": "More",
+ "readerChapters": "Chapters",
+ "readerSettings": "Reader Settings",
+ "readerFontSize": "Font Size",
+ "readerLineSpacing": "Line Spacing",
+ "readerSideMargins": "Side margins",
+ "readerTopBottom": "Top & bottom",
+ "readerPageLayout": "Page layout",
+ "readerLayoutAuto": "Auto",
+ "readerLayoutSingle": "Single",
+ "readerLayoutTwoPage": "Two-page",
+ "readerTheme": "Theme",
+ "readerFont": "Font",
+ "readerMoreFonts": "Download more fonts",
+ "readerFontRemove": "Remove download",
+ "readerFontDownloadFailed": "Couldn't download {font}",
+ "@readerFontDownloadFailed": {
+ "placeholders": {
+ "font": {"type": "String"}
+ }
+ },
+ "readerAnnotations": "Annotations",
+ "readerHighlights": "Highlights ({count})",
+ "@readerHighlights": {
+ "placeholders": {
+ "count": {"type": "int"}
+ }
+ },
+ "readerBookmarks": "Bookmarks ({count})",
+ "@readerBookmarks": {
+ "placeholders": {
+ "count": {"type": "int"}
+ }
+ },
+ "readerNoHighlights": "No highlights yet",
+ "readerNoBookmarks": "No bookmarks yet",
+ "readerBookmarkDefault": "Bookmark",
+ "readerNoteTitle": "Note",
+ "readerNoteHint": "Add a note...",
+ "readerCopied": "Copied to clipboard",
+ "readerTooltipCopy": "Copy",
+ "readerTooltipSearch": "Search",
+ "readerTooltipDefine": "Define",
+ "readerSearchHint": "Search this book…",
+ "readerSearchMatches": "{count, plural, one{{count} match for \"{query}\"} other{{count} matches for \"{query}\"}}",
+ "@readerSearchMatches": {
+ "placeholders": {
+ "count": {"type": "int"},
+ "query": {"type": "String"}
+ }
+ },
+ "readerSearchEmpty": "Type a word or phrase and tap search.",
+ "readerSearchNoResults": "No matches for \"{query}\".",
+ "@readerSearchNoResults": {
+ "placeholders": {
+ "query": {"type": "String"}
+ }
+ }
}
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index 00cbd9e3..c36b3b21 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -11381,6 +11381,204 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Removing a folder deletes its items from the library. This can\'t be undone.'**
String get libRemoveFoldersBody;
+
+ /// No description provided for @readEbook.
+ ///
+ /// In en, this message translates to:
+ /// **'Read'**
+ String get readEbook;
+
+ /// No description provided for @moreActions.
+ ///
+ /// In en, this message translates to:
+ /// **'More'**
+ String get moreActions;
+
+ /// No description provided for @readerChapters.
+ ///
+ /// In en, this message translates to:
+ /// **'Chapters'**
+ String get readerChapters;
+
+ /// No description provided for @readerSettings.
+ ///
+ /// In en, this message translates to:
+ /// **'Reader Settings'**
+ String get readerSettings;
+
+ /// No description provided for @readerFontSize.
+ ///
+ /// In en, this message translates to:
+ /// **'Font Size'**
+ String get readerFontSize;
+
+ /// No description provided for @readerLineSpacing.
+ ///
+ /// In en, this message translates to:
+ /// **'Line Spacing'**
+ String get readerLineSpacing;
+
+ /// No description provided for @readerSideMargins.
+ ///
+ /// In en, this message translates to:
+ /// **'Side margins'**
+ String get readerSideMargins;
+
+ /// No description provided for @readerTopBottom.
+ ///
+ /// In en, this message translates to:
+ /// **'Top & bottom'**
+ String get readerTopBottom;
+
+ /// No description provided for @readerPageLayout.
+ ///
+ /// In en, this message translates to:
+ /// **'Page layout'**
+ String get readerPageLayout;
+
+ /// No description provided for @readerLayoutAuto.
+ ///
+ /// In en, this message translates to:
+ /// **'Auto'**
+ String get readerLayoutAuto;
+
+ /// No description provided for @readerLayoutSingle.
+ ///
+ /// In en, this message translates to:
+ /// **'Single'**
+ String get readerLayoutSingle;
+
+ /// No description provided for @readerLayoutTwoPage.
+ ///
+ /// In en, this message translates to:
+ /// **'Two-page'**
+ String get readerLayoutTwoPage;
+
+ /// No description provided for @readerTheme.
+ ///
+ /// In en, this message translates to:
+ /// **'Theme'**
+ String get readerTheme;
+
+ /// No description provided for @readerFont.
+ ///
+ /// In en, this message translates to:
+ /// **'Font'**
+ String get readerFont;
+
+ /// No description provided for @readerMoreFonts.
+ ///
+ /// In en, this message translates to:
+ /// **'Download more fonts'**
+ String get readerMoreFonts;
+
+ /// No description provided for @readerFontRemove.
+ ///
+ /// In en, this message translates to:
+ /// **'Remove download'**
+ String get readerFontRemove;
+
+ /// No description provided for @readerFontDownloadFailed.
+ ///
+ /// In en, this message translates to:
+ /// **'Couldn\'t download {font}'**
+ String readerFontDownloadFailed(String font);
+
+ /// No description provided for @readerAnnotations.
+ ///
+ /// In en, this message translates to:
+ /// **'Annotations'**
+ String get readerAnnotations;
+
+ /// No description provided for @readerHighlights.
+ ///
+ /// In en, this message translates to:
+ /// **'Highlights ({count})'**
+ String readerHighlights(int count);
+
+ /// No description provided for @readerBookmarks.
+ ///
+ /// In en, this message translates to:
+ /// **'Bookmarks ({count})'**
+ String readerBookmarks(int count);
+
+ /// No description provided for @readerNoHighlights.
+ ///
+ /// In en, this message translates to:
+ /// **'No highlights yet'**
+ String get readerNoHighlights;
+
+ /// No description provided for @readerNoBookmarks.
+ ///
+ /// In en, this message translates to:
+ /// **'No bookmarks yet'**
+ String get readerNoBookmarks;
+
+ /// No description provided for @readerBookmarkDefault.
+ ///
+ /// In en, this message translates to:
+ /// **'Bookmark'**
+ String get readerBookmarkDefault;
+
+ /// No description provided for @readerNoteTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Note'**
+ String get readerNoteTitle;
+
+ /// No description provided for @readerNoteHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Add a note...'**
+ String get readerNoteHint;
+
+ /// No description provided for @readerCopied.
+ ///
+ /// In en, this message translates to:
+ /// **'Copied to clipboard'**
+ String get readerCopied;
+
+ /// No description provided for @readerTooltipCopy.
+ ///
+ /// In en, this message translates to:
+ /// **'Copy'**
+ String get readerTooltipCopy;
+
+ /// No description provided for @readerTooltipSearch.
+ ///
+ /// In en, this message translates to:
+ /// **'Search'**
+ String get readerTooltipSearch;
+
+ /// No description provided for @readerTooltipDefine.
+ ///
+ /// In en, this message translates to:
+ /// **'Define'**
+ String get readerTooltipDefine;
+
+ /// No description provided for @readerSearchHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Search this book…'**
+ String get readerSearchHint;
+
+ /// No description provided for @readerSearchMatches.
+ ///
+ /// In en, this message translates to:
+ /// **'{count, plural, one{{count} match for \"{query}\"} other{{count} matches for \"{query}\"}}'**
+ String readerSearchMatches(int count, String query);
+
+ /// No description provided for @readerSearchEmpty.
+ ///
+ /// In en, this message translates to:
+ /// **'Type a word or phrase and tap search.'**
+ String get readerSearchEmpty;
+
+ /// No description provided for @readerSearchNoResults.
+ ///
+ /// In en, this message translates to:
+ /// **'No matches for \"{query}\".'**
+ String readerSearchNoResults(String query);
}
class _AppLocalizationsDelegate
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index 6668f194..384427d9 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -6551,4 +6551,119 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_el.dart b/lib/l10n/app_localizations_el.dart
index e81f2d98..0980f31b 100644
--- a/lib/l10n/app_localizations_el.dart
+++ b/lib/l10n/app_localizations_el.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsEl extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index b2876f0d..2d1d4c8f 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index b029acf7..2d45b113 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index 77d06c45..184ccadc 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -6486,4 +6486,119 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index d1687b6a..9bf43112 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index 7ce594c9..8be777f7 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_no.dart b/lib/l10n/app_localizations_no.dart
index 70263005..d370abba 100644
--- a/lib/l10n/app_localizations_no.dart
+++ b/lib/l10n/app_localizations_no.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsNo extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index bc964e58..a91515a1 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_ro.dart b/lib/l10n/app_localizations_ro.dart
index 647f8603..30a913cd 100644
--- a/lib/l10n/app_localizations_ro.dart
+++ b/lib/l10n/app_localizations_ro.dart
@@ -6484,4 +6484,119 @@ class AppLocalizationsRo extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index 13f8a2f9..db8b053d 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -6487,4 +6487,119 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index 037c96d3..8f9b0752 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -6407,4 +6407,119 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get libRemoveFoldersBody =>
'Removing a folder deletes its items from the library. This can\'t be undone.';
+
+ @override
+ String get readEbook => 'Read';
+
+ @override
+ String get moreActions => 'More';
+
+ @override
+ String get readerChapters => 'Chapters';
+
+ @override
+ String get readerSettings => 'Reader Settings';
+
+ @override
+ String get readerFontSize => 'Font Size';
+
+ @override
+ String get readerLineSpacing => 'Line Spacing';
+
+ @override
+ String get readerSideMargins => 'Side margins';
+
+ @override
+ String get readerTopBottom => 'Top & bottom';
+
+ @override
+ String get readerPageLayout => 'Page layout';
+
+ @override
+ String get readerLayoutAuto => 'Auto';
+
+ @override
+ String get readerLayoutSingle => 'Single';
+
+ @override
+ String get readerLayoutTwoPage => 'Two-page';
+
+ @override
+ String get readerTheme => 'Theme';
+
+ @override
+ String get readerFont => 'Font';
+
+ @override
+ String get readerMoreFonts => 'Download more fonts';
+
+ @override
+ String get readerFontRemove => 'Remove download';
+
+ @override
+ String readerFontDownloadFailed(String font) {
+ return 'Couldn\'t download $font';
+ }
+
+ @override
+ String get readerAnnotations => 'Annotations';
+
+ @override
+ String readerHighlights(int count) {
+ return 'Highlights ($count)';
+ }
+
+ @override
+ String readerBookmarks(int count) {
+ return 'Bookmarks ($count)';
+ }
+
+ @override
+ String get readerNoHighlights => 'No highlights yet';
+
+ @override
+ String get readerNoBookmarks => 'No bookmarks yet';
+
+ @override
+ String get readerBookmarkDefault => 'Bookmark';
+
+ @override
+ String get readerNoteTitle => 'Note';
+
+ @override
+ String get readerNoteHint => 'Add a note...';
+
+ @override
+ String get readerCopied => 'Copied to clipboard';
+
+ @override
+ String get readerTooltipCopy => 'Copy';
+
+ @override
+ String get readerTooltipSearch => 'Search';
+
+ @override
+ String get readerTooltipDefine => 'Define';
+
+ @override
+ String get readerSearchHint => 'Search this book…';
+
+ @override
+ String readerSearchMatches(int count, String query) {
+ String _temp0 = intl.Intl.pluralLogic(
+ count,
+ locale: localeName,
+ other: '$count matches for \"$query\"',
+ one: '$count match for \"$query\"',
+ );
+ return '$_temp0';
+ }
+
+ @override
+ String get readerSearchEmpty => 'Type a word or phrase and tap search.';
+
+ @override
+ String readerSearchNoResults(String query) {
+ return 'No matches for \"$query\".';
+ }
}
diff --git a/lib/widgets/book_detail_sheet.dart b/lib/widgets/book_detail_sheet.dart
index 5563fb35..ec434dea 100644
--- a/lib/widgets/book_detail_sheet.dart
+++ b/lib/widgets/book_detail_sheet.dart
@@ -569,7 +569,7 @@ class _BookDetailSheetContentState extends State<_BookDetailSheetContent> {
},
),
),
- // ─── Action row: Download | Finished | More ─────────────────
+ // Primary action row: Download | Fully Absorb | Read (when ebook)
const SizedBox(height: 12),
Row(children: [
if (!isEbookOnly) ...[
@@ -604,21 +604,44 @@ class _BookDetailSheetContentState extends State<_BookDetailSheetContent> {
]),
),
)),
- const SizedBox(width: 8),
- // More button - opens styled bottom sheet with secondary actions
- GestureDetector(
- onTap: () => _showMoreSheet(context, auth, lib, title, authorName, progress, isFinished, duration, ebookFile, isEbookOnly, serverPath),
- child: Container(
- height: 36, width: 44,
- decoration: BoxDecoration(
- color: cs.onSurface.withValues(alpha: 0.06),
- borderRadius: BorderRadius.circular(14),
- border: Border.all(color: cs.onSurface.withValues(alpha: 0.1)),
+ if (ebookFile != null) ...[
+ const SizedBox(width: 8),
+ Expanded(child: GestureDetector(
+ onTap: () => _openEbookReader(context, auth, ebookFile, title),
+ child: Container(
+ height: 36,
+ decoration: BoxDecoration(
+ color: cs.onSurface.withValues(alpha: 0.06),
+ borderRadius: BorderRadius.circular(14),
+ border: Border.all(color: cs.onSurface.withValues(alpha: 0.08)),
+ ),
+ child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
+ Icon(Icons.menu_book_rounded, size: 16, color: cs.onSurfaceVariant),
+ const SizedBox(width: 6),
+ Text(l.readEbook, style: TextStyle(color: cs.onSurfaceVariant, fontSize: 12, fontWeight: FontWeight.w500)),
+ ]),
),
- child: Icon(Icons.more_horiz_rounded, size: 18, color: cs.onSurfaceVariant),
+ )),
+ ],
+ ]),
+ // More button below primary row
+ const SizedBox(height: 8),
+ GestureDetector(
+ onTap: () => _showMoreSheet(context, auth, lib, title, authorName, progress, isFinished, duration, ebookFile, isEbookOnly, serverPath),
+ child: Container(
+ height: 36,
+ decoration: BoxDecoration(
+ color: cs.onSurface.withValues(alpha: 0.06),
+ borderRadius: BorderRadius.circular(14),
+ border: Border.all(color: cs.onSurface.withValues(alpha: 0.1)),
),
+ child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
+ Icon(Icons.more_horiz_rounded, size: 16, color: cs.onSurfaceVariant),
+ const SizedBox(width: 6),
+ Text(l.moreActions, style: TextStyle(color: cs.onSurfaceVariant, fontSize: 12, fontWeight: FontWeight.w500)),
+ ]),
),
- ]),
+ ),
const SizedBox(height: 16),
Wrap(spacing: 8, runSpacing: 8, children: [
if (year.isNotEmpty) _chip(Icons.calendar_today_rounded, year),
diff --git a/lib/widgets/ebook_reader_view.dart b/lib/widgets/ebook_reader_view.dart
index b636739e..49f264b7 100644
--- a/lib/widgets/ebook_reader_view.dart
+++ b/lib/widgets/ebook_reader_view.dart
@@ -7,6 +7,7 @@ import 'package:url_launcher/url_launcher.dart';
import 'package:path_provider/path_provider.dart';
import 'package:http/http.dart' as http;
import 'package:provider/provider.dart';
+import '../l10n/app_localizations.dart';
import '../providers/auth_provider.dart';
import '../providers/library_provider.dart';
import '../services/audio_player_service.dart';
@@ -89,8 +90,6 @@ class EbookReaderViewState extends State<EbookReaderView> {
double? _touchDownY;
double? _ptrDownX;
double? _ptrDownY;
- // TEMP iOS tap diagnostic - shows which input path actually fires on iOS.
- String _touchDebug = 'tap test: no input yet';
// Key to force-rebuild EpubViewer when layout mode changes
int _viewerKey = 0;
@@ -409,19 +408,12 @@ class EbookReaderViewState extends State<EbookReaderView> {
final now = DateTime.now();
if (now.difference(_lastReaderTap).inMilliseconds < 350) return;
_lastReaderTap = now;
- String action;
if (frac < 0.25) {
_epubController?.prev();
- action = 'prev';
} else if (frac > 0.75) {
_epubController?.next();
- action = 'next';
} else {
_toggleControls();
- action = 'toggle';
- }
- if (mounted) {
- setState(() => _touchDebug = '$source frac=${frac.toStringAsFixed(2)} -> $action');
}
}
@@ -461,9 +453,27 @@ class EbookReaderViewState extends State<EbookReaderView> {
}
function attach(doc){
try {
- doc.addEventListener('click', function(e){ onTap(e,'click'); }, true);
- doc.addEventListener('pointerup', function(e){ onTap(e,'pointerup'); }, true);
- doc.addEventListener('touchend', function(e){ onTap(e,'touchend'); }, true);
+ // Track the touch start and whether the gesture became a drag, so a
+ // swipe doesn't fall through to a center-tap (menu toggle) on release.
+ var _tsx=null,_tsy=null,_dragged=false;
+ doc.addEventListener('touchstart',function(e){
+ if(e.touches.length===1){_tsx=e.touches[0].clientX;_tsy=e.touches[0].clientY;_dragged=false;}
+ else{_tsx=null;}
+ },{passive:true});
+ doc.addEventListener('touchmove',function(e){
+ if(_tsx==null)return;
+ var dx=Math.abs(e.touches[0].clientX-_tsx),dy=Math.abs(e.touches[0].clientY-_tsy);
+ if(dx>10||dy>10)_dragged=true;
+ // Swallow horizontal drags so epub.js can't partially scroll the column.
+ if(dx>dy)e.preventDefault();
+ },{passive:false});
+ function onTapGuarded(e,kind){
+ if(_dragged){ if(kind==='touchend')_dragged=false; return; }
+ onTap(e,kind);
+ }
+ doc.addEventListener('click', function(e){ onTapGuarded(e,'click'); }, true);
+ doc.addEventListener('pointerup', function(e){ onTapGuarded(e,'pointerup'); }, true);
+ doc.addEventListener('touchend', function(e){ onTapGuarded(e,'touchend'); }, true);
} catch(e){}
}
try { rendition.getContents().forEach(function(c){ attach(c.document); }); } catch(e){}
@@ -732,7 +742,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
Clipboard.setData(ClipboardData(text: _selectionText!));
_dismissSelection();
ScaffoldMessenger.of(context).showSnackBar(
- const SnackBar(content: Text('Copied to clipboard'), duration: Duration(seconds: 1)),
+ SnackBar(content: Text(AppLocalizations.of(context)!.readerCopied), duration: const Duration(seconds: 1)),
);
}
@@ -762,27 +772,28 @@ class EbookReaderViewState extends State<EbookReaderView> {
Future<void> _addNoteToAnnotation(EbookAnnotation annotation) async {
final controller = TextEditingController(text: annotation.note ?? '');
+ final l = AppLocalizations.of(context)!;
final result = await showDialog<String>(
context: context,
builder: (ctx) => AlertDialog(
- title: const Text('Note'),
+ title: Text(l.readerNoteTitle),
content: TextField(
controller: controller,
maxLines: 5,
autofocus: true,
decoration: InputDecoration(
- hintText: 'Add a note...',
+ hintText: l.readerNoteHint,
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
),
),
actions: [
TextButton(
onPressed: () => Navigator.pop(ctx),
- child: const Text('Cancel'),
+ child: Text(l.cancel),
),
FilledButton(
onPressed: () => Navigator.pop(ctx, controller.text),
- child: const Text('Save'),
+ child: Text(l.save),
),
],
),
@@ -836,7 +847,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
children: [
Padding(
padding: const EdgeInsets.all(16),
- child: Text('Chapters', style: Theme.of(ctx).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600, color: cs.onSurface)),
+ child: Text(AppLocalizations.of(ctx)!.readerChapters, style: Theme.of(ctx).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600, color: cs.onSurface)),
),
Flexible(
child: ListView.builder(
@@ -876,7 +887,9 @@ class EbookReaderViewState extends State<EbookReaderView> {
),
isScrollControlled: true,
builder: (ctx) => StatefulBuilder(
- builder: (ctx, setSheetState) => SafeArea(
+ builder: (ctx, setSheetState) {
+ final l = AppLocalizations.of(ctx)!;
+ return SafeArea(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.fromLTRB(24, 16, 24, 16),
@@ -894,14 +907,14 @@ class EbookReaderViewState extends State<EbookReaderView> {
),
),
const SizedBox(height: 16),
- Text('Reader Settings', style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600)),
+ Text(l.readerSettings, style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600)),
const SizedBox(height: 20),
// Font size
Row(children: [
Icon(Icons.text_fields_rounded, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Font Size', style: tt.bodyMedium),
+ Text(l.readerFontSize, style: tt.bodyMedium),
const Spacer(),
IconButton(
icon: Icon(Icons.remove_rounded, size: 20, color: cs.onSurfaceVariant),
@@ -925,7 +938,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
Row(children: [
Icon(Icons.format_line_spacing_rounded, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Line Spacing', style: tt.bodyMedium),
+ Text(l.readerLineSpacing, style: tt.bodyMedium),
const Spacer(),
Text(_lineHeight.toStringAsFixed(1), style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
]),
@@ -945,7 +958,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
Row(children: [
Icon(Icons.padding_rounded, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Side margins', style: tt.bodyMedium),
+ Text(l.readerSideMargins, style: tt.bodyMedium),
const Spacer(),
Text('${hPreview}px', style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
]),
@@ -963,7 +976,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
Row(children: [
Icon(Icons.vertical_align_center_rounded, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Top & bottom', style: tt.bodyMedium),
+ Text(l.readerTopBottom, style: tt.bodyMedium),
const Spacer(),
Text('${_marginV}px', style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
]),
@@ -983,16 +996,16 @@ class EbookReaderViewState extends State<EbookReaderView> {
Row(children: [
Icon(Icons.auto_stories_rounded, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Page layout', style: tt.bodyMedium),
+ Text(l.readerPageLayout, style: tt.bodyMedium),
]),
const SizedBox(height: 8),
SizedBox(
width: double.infinity,
child: SegmentedButton<int>(
- segments: const [
- ButtonSegment(value: 0, label: Text('Auto')),
- ButtonSegment(value: 1, label: Text('Single')),
- ButtonSegment(value: 2, label: Text('Two-page')),
+ segments: [
+ ButtonSegment(value: 0, label: Text(l.readerLayoutAuto)),
+ ButtonSegment(value: 1, label: Text(l.readerLayoutSingle)),
+ ButtonSegment(value: 2, label: Text(l.readerLayoutTwoPage)),
],
selected: {_spreadModes.indexOf(_spread)},
showSelectedIcon: false,
@@ -1008,7 +1021,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
Row(children: [
Icon(Icons.palette_outlined, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Theme', style: tt.bodyMedium),
+ Text(l.readerTheme, style: tt.bodyMedium),
]),
const SizedBox(height: 10),
Row(
@@ -1038,7 +1051,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
child: Row(children: [
Icon(Icons.font_download_outlined, size: 20, color: cs.onSurfaceVariant),
const SizedBox(width: 12),
- Text('Font', style: tt.bodyMedium),
+ Text(l.readerFont, style: tt.bodyMedium),
const Spacer(),
Text(_font.label,
style: tt.bodyMedium?.copyWith(fontWeight: FontWeight.w600)),
@@ -1051,7 +1064,8 @@ class EbookReaderViewState extends State<EbookReaderView> {
),
),
),
- ),
+ );
+ },
),
);
}
@@ -1121,7 +1135,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
? IconButton(
icon: Icon(Icons.delete_outline_rounded,
color: cs.onSurfaceVariant),
- tooltip: 'Remove download',
+ tooltip: AppLocalizations.of(context)!.readerFontRemove,
onPressed: () => svc.remove(f.id),
)
: Icon(Icons.download_rounded, color: cs.primary))
@@ -1137,7 +1151,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
_updateReaderFont(f.id);
if (mounted) Navigator.of(ctx).pop();
} else if (mounted) {
- showOverlayToast(context, "Couldn't download ${f.label}",
+ showOverlayToast(context, AppLocalizations.of(context)!.readerFontDownloadFailed(f.label),
icon: Icons.error_outline_rounded);
}
},
@@ -1161,7 +1175,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
padding: const EdgeInsets.all(16),
child: Align(
alignment: Alignment.centerLeft,
- child: Text('Font',
+ child: Text(AppLocalizations.of(ctx)!.readerFont,
style: tt.titleMedium?.copyWith(
fontWeight: FontWeight.w600, color: cs.onSurface)),
),
@@ -1173,7 +1187,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
for (final f in kBuiltinReaderFonts) tile(f),
Padding(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 4),
- child: Text('Download more fonts',
+ child: Text(AppLocalizations.of(ctx)!.readerMoreFonts,
style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant)),
),
for (final f in kDownloadableReaderFonts) tile(f),
@@ -1346,7 +1360,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
padding: const EdgeInsets.fromLTRB(16, 12, 16, 0),
child: Row(
children: [
- Text('Annotations', style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600)),
+ Text(AppLocalizations.of(ctx)!.readerAnnotations, style: tt.titleMedium?.copyWith(fontWeight: FontWeight.w600)),
const Spacer(),
Text(
'${_annotations.length}',
@@ -1357,8 +1371,8 @@ class EbookReaderViewState extends State<EbookReaderView> {
),
TabBar(
tabs: [
- Tab(text: 'Highlights (${highlights.length})'),
- Tab(text: 'Bookmarks (${bookmarks.length})'),
+ Tab(text: AppLocalizations.of(ctx)!.readerHighlights(highlights.length)),
+ Tab(text: AppLocalizations.of(ctx)!.readerBookmarks(bookmarks.length)),
],
labelColor: cs.primary,
unselectedLabelColor: cs.onSurfaceVariant,
@@ -1369,7 +1383,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
children: [
// Highlights tab
highlights.isEmpty
- ? Center(child: Text('No highlights yet', style: TextStyle(color: cs.onSurfaceVariant)))
+ ? Center(child: Text(AppLocalizations.of(ctx)!.readerNoHighlights, style: TextStyle(color: cs.onSurfaceVariant)))
: ListView.builder(
controller: scrollController,
padding: const EdgeInsets.symmetric(vertical: 8),
@@ -1418,7 +1432,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
// Bookmarks tab
bookmarks.isEmpty
- ? Center(child: Text('No bookmarks yet', style: TextStyle(color: cs.onSurfaceVariant)))
+ ? Center(child: Text(AppLocalizations.of(ctx)!.readerNoBookmarks, style: TextStyle(color: cs.onSurfaceVariant)))
: ListView.builder(
controller: scrollController,
padding: const EdgeInsets.symmetric(vertical: 8),
@@ -1447,7 +1461,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
child: ListTile(
leading: Icon(Icons.bookmark_rounded, color: cs.primary),
title: Text(
- bm.note ?? 'Bookmark',
+ bm.note ?? AppLocalizations.of(ctx)!.readerBookmarkDefault,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: tt.bodyMedium,
@@ -1661,7 +1675,10 @@ class EbookReaderViewState extends State<EbookReaderView> {
displaySettings: EpubDisplaySettings(
flow: EpubFlow.paginated,
spread: _spread,
- snap: true,
+ // Swipe-to-turn via epub.js's snap manager is janky inside the
+ // WebView and never fires on iOS, so it's off. Page turns come
+ // from edge taps; horizontal drags are swallowed below.
+ snap: false,
useSnapAnimationAndroid: false,
// Font size at load time, not applied after: a post-load
// setFontSize reflows the text after initialCfi has displayed,
@@ -1726,8 +1743,6 @@ class EbookReaderViewState extends State<EbookReaderView> {
onTouchDown: (x, y) {
_touchDownX = x;
_touchDownY = y;
- if (mounted) setState(() => _touchDebug =
- 'DOWN ${x.toStringAsFixed(2)},${y.toStringAsFixed(2)}');
},
onTouchUp: (x, y) {
// onTouchDown doesn't fire reliably on iOS; if we never got a
@@ -1792,7 +1807,7 @@ class EbookReaderViewState extends State<EbookReaderView> {
),
IconButton(
icon: Icon(Icons.search_rounded, color: fg),
- tooltip: 'Search',
+ tooltip: AppLocalizations.of(context)!.readerTooltipSearch,
onPressed: _openSearchScreen,
),
IconButton(
@@ -1909,19 +1924,19 @@ class EbookReaderViewState extends State<EbookReaderView> {
IconButton(
icon: Icon(Icons.copy_rounded, size: 20, color: cs.onSurfaceVariant),
onPressed: _copySelection,
- tooltip: 'Copy',
+ tooltip: AppLocalizations.of(context)!.readerTooltipCopy,
visualDensity: VisualDensity.compact,
),
IconButton(
icon: Icon(Icons.search_rounded, size: 20, color: cs.onSurfaceVariant),
onPressed: _searchSelection,
- tooltip: 'Search',
+ tooltip: AppLocalizations.of(context)!.readerTooltipSearch,
visualDensity: VisualDensity.compact,
),
IconButton(
icon: Icon(Icons.menu_book_rounded, size: 20, color: cs.onSurfaceVariant),
onPressed: _defineSelection,
- tooltip: 'Define',
+ tooltip: AppLocalizations.of(context)!.readerTooltipDefine,
visualDensity: VisualDensity.compact,
),
_divider(cs),
@@ -1937,25 +1952,6 @@ class EbookReaderViewState extends State<EbookReaderView> {
),
),
- // TEMP iOS tap diagnostic - remove once taps are fixed.
- Positioned(
- top: 0, left: 0, right: 0,
- child: SafeArea(
- bottom: false,
- child: IgnorePointer(
- child: Container(
- color: Colors.black.withValues(alpha: 0.65),
- padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 8),
- child: Text(
- _touchDebug,
- textAlign: TextAlign.center,
- style: const TextStyle(
- color: Colors.yellow, fontSize: 13, fontWeight: FontWeight.w700),
- ),
- ),
- ),
- ),
- ),
],
);
return _wrap(viewerBody, bg);
@@ -2057,7 +2053,7 @@ class _EbookSearchScreenState extends State<_EbookSearchScreen> {
autofocus: true,
textInputAction: TextInputAction.search,
decoration: InputDecoration(
- hintText: 'Search this book…',
+ hintText: AppLocalizations.of(context)!.readerSearchHint,
border: InputBorder.none,
),
onSubmitted: (_) => _run(),
@@ -2082,7 +2078,7 @@ class _EbookSearchScreenState extends State<_EbookSearchScreen> {
child: Row(
children: [
Text(
- '${_results.length} ${_results.length == 1 ? 'match' : 'matches'} for "$_lastQuery"',
+ AppLocalizations.of(context)!.readerSearchMatches(_results.length, _lastQuery),
style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant),
),
],
@@ -2097,8 +2093,8 @@ class _EbookSearchScreenState extends State<_EbookSearchScreen> {
padding: const EdgeInsets.all(24),
child: Text(
_lastQuery.isEmpty
- ? 'Type a word or phrase and tap search.'
- : 'No matches for "$_lastQuery".',
+ ? AppLocalizations.of(context)!.readerSearchEmpty
+ : AppLocalizations.of(context)!.readerSearchNoResults(_lastQuery),
textAlign: TextAlign.center,
style: TextStyle(color: cs.onSurfaceVariant),
),
diff --git a/pubspec.yaml b/pubspec.yaml
index 18cfe3e1..600ea031 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
name: absorb
description: An Audiobookshelf Client
publish_to: 'none'
-version: 1.9.1+193
+version: 1.9.1+194
environment:
sdk: '>=3.1.0 <4.0.0'