diff --git a/API/Services/BookService.cs b/API/Services/BookService.cs
index a1efa297b..f4d07685b 100644
--- a/API/Services/BookService.cs
+++ b/API/Services/BookService.cs
@@ -430,6 +430,23 @@ public class BookService : IBookService
}
+ private static void InjectImages(HtmlDocument doc, EpubBookRef book, string apiBase)
+ {
+ var images = doc.DocumentNode.SelectNodes("//img")
+ ?? doc.DocumentNode.SelectNodes("//image") ?? doc.DocumentNode.SelectNodes("//svg");
+
+ if (images == null) return;
+
+ var parent = images[0].ParentNode;
+
+ foreach (var image in images)
+ {
+ // TODO: How do I make images clickable with state?
+ //image.AddClass("kavita-scale-width");
+ }
+
+ }
+
///
/// Returns the image key associated with the file. Contains some basic fallback logic.
///
@@ -1092,6 +1109,8 @@ public class BookService : IBookService
ScopeImages(doc, book, apiBase);
+ InjectImages(doc, book, apiBase);
+
// Inject PTOC Bookmark Icons
InjectPTOCBookmarks(doc, book, ptocBookmarks);
diff --git a/API/Services/EmailService.cs b/API/Services/EmailService.cs
index 35cfa7b04..2ab135dfc 100644
--- a/API/Services/EmailService.cs
+++ b/API/Services/EmailService.cs
@@ -423,11 +423,7 @@ public class EmailService : IEmailService
smtpClient.Timeout = 20000;
var ssl = smtpConfig.EnableSsl ? SecureSocketOptions.Auto : SecureSocketOptions.None;
- await smtpClient.ConnectAsync(smtpConfig.Host, smtpConfig.Port, ssl);
- if (!string.IsNullOrEmpty(smtpConfig.UserName) && !string.IsNullOrEmpty(smtpConfig.Password))
- {
- await smtpClient.AuthenticateAsync(smtpConfig.UserName, smtpConfig.Password);
- }
+
ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
@@ -445,6 +441,12 @@ public class EmailService : IEmailService
try
{
+ await smtpClient.ConnectAsync(smtpConfig.Host, smtpConfig.Port, ssl);
+ if (!string.IsNullOrEmpty(smtpConfig.UserName) && !string.IsNullOrEmpty(smtpConfig.Password))
+ {
+ await smtpClient.AuthenticateAsync(smtpConfig.UserName, smtpConfig.Password);
+ }
+
await smtpClient.SendAsync(email);
if (user != null)
{
diff --git a/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.html b/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.html
index e44b3d3e4..d4c616ee9 100644
--- a/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.html
+++ b/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.html
@@ -124,9 +124,7 @@
@if(isLoading) {
-
- {{t('loading-book')}}
-
+
} @else {
diff --git a/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.ts b/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.ts
index c25b27436..53a0b409d 100644
--- a/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.ts
+++ b/UI/Web/src/app/book-reader/_components/book-reader/book-reader.component.ts
@@ -182,10 +182,6 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
* The current page only contains an image. This is used to determine if we should show the image in the center of the screen.
*/
isSingleImagePage = false;
- /**
- * Belongs to drawer component
- */
- //drawerOpen = false;
/**
* If the word/line overlay is open
*/
@@ -1191,6 +1187,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
return of(null);
})).subscribe(res => {
this.nextChapterPrefetched = true;
+ this.cdRef.markForCheck();
});
}
} else if (this.pageNum() <= 10) {
@@ -1202,6 +1199,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
return of(null);
})).subscribe(res => {
this.prevChapterPrefetched = true;
+ this.cdRef.markForCheck();
});
}
}
@@ -1468,6 +1466,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
}
handleReaderSettingsUpdate(res: ReaderSettingUpdate) {
+ console.log('Handling ', res.setting, ' setting update to ', res.object);
switch (res.setting) {
case "pageStyle":
this.applyPageStyles(res.object as PageStyle);