Random Cleanup + OPDS Base Url Support (#1926)

* Updated a ton of dependencies. PDFs reader got a big update from PDF.js 2.6 -> 3.x

* Rolled back fontawesome update

* Updated to latest angular patch. Fixed search being too long instead of just to the end of the browser screen.

* Fixed alignment on download icon for download indicator in cards

* Include progress information on Want To Read API and when marking something as Read, perform cleanup service on want to read.

* Removed mark-read updating want to read. As there are series restrictions and it could be misleading.

* Tweaked login page spacing when form is dirty

* Replaced an object instantiation

* Commented out a few tests that always break when updating NetVips (but always work)

* Updated ngx-toastr

* Added styles for alerts to Kavita. They were somehow missing. Fixed an issue where when OPDS was disabled, user preferences wouldn't tell them.

* Wired up a reset base url button to match Ip Addresses

* Disable ipAddress and port for docker users

* Removed cache dir since it's kinda pointless currently

* Started the update for OPDS BaseUrl support

* Fixed OPDS url not reflecting base url on localhost

* Added extra plumbing to allow sending a real email when testing a custom service.

* Implemented OPDS support under Base Url. Added pagination to all APIs where applicable.

* Added a swallowing of permission denied on Updating baseurl in index.html for inapplicable users.

* Fixed a bad test
This commit is contained in:
Joe Milazzo 2023-04-14 19:44:35 -05:00 committed by GitHub
parent 1bf4fde58f
commit 21a9f28923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 2519 additions and 1219 deletions

View file

@ -6,6 +6,7 @@ using System.Threading.Tasks;
using API.Data;
using API.DTOs.Email;
using API.Entities.Enums;
using Flurl;
using Flurl.Http;
using Kavita.Common;
using Kavita.Common.EnvironmentInfo;
@ -22,7 +23,7 @@ public interface IEmailService
Task<bool> SendMigrationEmail(EmailMigrationDto data);
Task<bool> SendPasswordResetEmail(PasswordResetEmailDto data);
Task<bool> SendFilesToEmail(SendToDto data);
Task<EmailTestResultDto> TestConnectivity(string emailUrl);
Task<EmailTestResultDto> TestConnectivity(string emailUrl, string adminEmail, bool sendEmail);
Task<bool> IsDefaultEmailService();
Task SendEmailChangeEmail(ConfirmationEmailDto data);
}
@ -55,7 +56,7 @@ public class EmailService : IEmailService
/// <remarks>This will do some basic filtering to auto return false if the emailUrl is a LAN ip</remarks>
/// <param name="emailUrl"></param>
/// <returns></returns>
public async Task<EmailTestResultDto> TestConnectivity(string emailUrl)
public async Task<EmailTestResultDto> TestConnectivity(string emailUrl, string adminEmail, bool sendEmail)
{
var result = new EmailTestResultDto();
try
@ -65,7 +66,7 @@ public class EmailService : IEmailService
result.Successful = false;
result.ErrorMessage = "This is a local IP address";
}
result.Successful = await SendEmailWithGet(emailUrl + "/api/test");
result.Successful = await SendEmailWithGet($"{emailUrl}/api/test?adminEmail={Url.Encode(adminEmail)}&sendEmail={sendEmail}");
}
catch (KavitaException ex)
{