diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 01de1fb82..1fe2d72e8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,10 @@ assignees: '' --- +**If this is a feature request, request [here](https://feats.kavitareader.com/) instead. Feature requests will be deleted from Github.** + + + **Describe the bug** A clear and concise description of what the bug is. diff --git a/API/DTOs/Update/UpdateNotificationDto.cs b/API/DTOs/Update/UpdateNotificationDto.cs index 7a16fa18e..03c56c567 100644 --- a/API/DTOs/Update/UpdateNotificationDto.cs +++ b/API/DTOs/Update/UpdateNotificationDto.cs @@ -1,4 +1,6 @@ -namespace API.DTOs.Update +using System; + +namespace API.DTOs.Update { /// /// Update Notification denoting a new release available for user to update to @@ -34,5 +36,9 @@ /// Is this a pre-release /// public bool IsPrerelease { get; init; } + /// + /// Date of the publish + /// + public string PublishDate { get; init; } } } diff --git a/API/Entities/AppUserPreferences.cs b/API/Entities/AppUserPreferences.cs index e78c4b015..01587431b 100644 --- a/API/Entities/AppUserPreferences.cs +++ b/API/Entities/AppUserPreferences.cs @@ -16,7 +16,7 @@ namespace API.Entities /// /// Manga Reader Option: Which side of a split image should we show first /// - public PageSplitOption PageSplitOption { get; set; } = PageSplitOption.SplitRightToLeft; + public PageSplitOption PageSplitOption { get; set; } = PageSplitOption.FitSplit; /// /// Manga Reader Option: How the manga reader should perform paging or reading of the file /// @@ -25,14 +25,15 @@ namespace API.Entities /// /// public ReaderMode ReaderMode { get; set; } + /// /// Manga Reader Option: Allow the menu to close after 6 seconds without interaction /// - public bool AutoCloseMenu { get; set; } + public bool AutoCloseMenu { get; set; } = true; /// /// Book Reader Option: Should the background color be dark /// - public bool BookReaderDarkMode { get; set; } = false; + public bool BookReaderDarkMode { get; set; } = true; /// /// Book Reader Option: Override extra Margin /// @@ -62,10 +63,10 @@ namespace API.Entities /// UI Site Global Setting: Whether the UI should render in Dark mode or not. /// public bool SiteDarkMode { get; set; } = true; - - - + + + public AppUser AppUser { get; set; } public int AppUserId { get; set; } } -} \ No newline at end of file +} diff --git a/API/Entities/Enums/PageSplitOption.cs b/API/Entities/Enums/PageSplitOption.cs index ae44530c7..5234a4cce 100644 --- a/API/Entities/Enums/PageSplitOption.cs +++ b/API/Entities/Enums/PageSplitOption.cs @@ -4,6 +4,7 @@ { SplitLeftToRight = 0, SplitRightToLeft = 1, - NoSplit = 2 + NoSplit = 2, + FitSplit = 3 } -} \ No newline at end of file +} diff --git a/API/Interfaces/ITaskScheduler.cs b/API/Interfaces/ITaskScheduler.cs index 08a450ac2..215cccf80 100644 --- a/API/Interfaces/ITaskScheduler.cs +++ b/API/Interfaces/ITaskScheduler.cs @@ -17,6 +17,6 @@ namespace API.Interfaces void RefreshSeriesMetadata(int libraryId, int seriesId, bool forceUpdate = false); void ScanSeries(int libraryId, int seriesId, bool forceUpdate = false); void CancelStatsTasks(); - void RunStatCollection(); + Task RunStatCollection(); } } diff --git a/API/Services/HostedServices/StartupTasksHostedService.cs b/API/Services/HostedServices/StartupTasksHostedService.cs index 58b6eec25..486b45513 100644 --- a/API/Services/HostedServices/StartupTasksHostedService.cs +++ b/API/Services/HostedServices/StartupTasksHostedService.cs @@ -29,7 +29,7 @@ namespace API.Services.HostedServices // These methods will automatically check if stat collection is disabled to prevent sending any data regardless // of when setting was changed await taskScheduler.ScheduleStatsTasks(); - taskScheduler.RunStatCollection(); + await taskScheduler.RunStatCollection(); } catch (Exception) { diff --git a/API/Services/TaskScheduler.cs b/API/Services/TaskScheduler.cs index 146fb7dcd..77c745535 100644 --- a/API/Services/TaskScheduler.cs +++ b/API/Services/TaskScheduler.cs @@ -23,7 +23,6 @@ namespace API.Services private readonly IStatsService _statsService; private readonly IVersionUpdaterService _versionUpdaterService; - private const string SendDataTask = "finalize-stats"; public static BackgroundJobServer Client => new BackgroundJobServer(); private static readonly Random Rnd = new Random(); @@ -89,19 +88,27 @@ namespace API.Services } _logger.LogDebug("Scheduling stat collection daily"); - RecurringJob.AddOrUpdate(SendDataTask, () => _statsService.Send(), Cron.Daily(Rnd.Next(0, 22)), TimeZoneInfo.Local); + RecurringJob.AddOrUpdate("report-stats", () => _statsService.Send(), Cron.Daily(Rnd.Next(0, 22)), TimeZoneInfo.Local); } public void CancelStatsTasks() { _logger.LogDebug("Cancelling/Removing StatsTasks"); - RecurringJob.RemoveIfExists(SendDataTask); + RecurringJob.RemoveIfExists("report-stats"); } - public void RunStatCollection() + /// + /// First time run stat collection. Executes immediately on a background thread. Does not block. + /// + public async Task RunStatCollection() { - _logger.LogInformation("Enqueuing stat collection"); + var allowStatCollection = (await _unitOfWork.SettingsRepository.GetSettingsDtoAsync()).AllowStatCollection; + if (!allowStatCollection) + { + _logger.LogDebug("User has opted out of stat collection, not sending stats"); + return; + } BackgroundJob.Enqueue(() => _statsService.Send()); } diff --git a/API/Services/Tasks/VersionUpdaterService.cs b/API/Services/Tasks/VersionUpdaterService.cs index fbd3d4f10..64e21d39a 100644 --- a/API/Services/Tasks/VersionUpdaterService.cs +++ b/API/Services/Tasks/VersionUpdaterService.cs @@ -38,6 +38,11 @@ namespace API.Services.Tasks /// // ReSharper disable once InconsistentNaming public string Html_Url { get; init; } + /// + /// Date Release was Published + /// + // ReSharper disable once InconsistentNaming + public string Published_At { get; init; } } public class UntrustedCertClientFactory : DefaultHttpClientFactory @@ -109,7 +114,8 @@ namespace API.Services.Tasks UpdateBody = _markdown.Transform(update.Body.Trim()), UpdateTitle = update.Name, UpdateUrl = update.Html_Url, - IsDocker = new OsInfo(Array.Empty()).IsDocker + IsDocker = new OsInfo(Array.Empty()).IsDocker, + PublishDate = update.Published_At }; } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9befd8a5..5b0417947 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ We're always looking for people to help make Kavita even better, there are a number of ways to contribute. ## Documentation ## -Setup guides, FAQ, the more information we have on the [wiki](https://github.com/Kareadita/Kavita/wiki) the better. +Setup guides, FAQ, the more information we have on the [wiki](https://wiki.kavitareader.com/) the better. ## Development ## diff --git a/README.md b/README.md index 0bf98f2c8..d32b48c26 100644 --- a/README.md +++ b/README.md @@ -80,15 +80,15 @@ services: **Note: Kavita is under heavy development and is being updated all the time, so the tag for current builds is `:nightly`. The `:latest` tag will be the latest stable release.** ## Feature Requests -Got a great idea? Throw it up on the FeatHub or vote on another idea. Please check the [Project Board](https://github.com/Kareadita/Kavita/projects) first for a list of planned features. - -[![Feature Requests](https://feathub.com/Kareadita/Kavita?format=svg)](https://feathub.com/Kareadita/Kavita) +Got a great idea? Throw it up on our [Feature Request site](https://feats.kavitareader.com/) or vote on another idea. Please check the [Project Board](https://github.com/Kareadita/Kavita/projects) first for a list of planned features. ## Contributors This project exists thanks to all the people who contribute. [Contribute](CONTRIBUTING.md). - + + + ## Donate @@ -99,7 +99,7 @@ expenses related to Kavita. Back us through [OpenCollective](https://opencollect Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/Kavita#backer) - + ## Sponsors @@ -116,9 +116,6 @@ Thank you to [ JetBrains](http: * [ Rider](http://www.jetbrains.com/rider/) * [ dotTrace](http://www.jetbrains.com/dottrace/) -## Sentry -Thank you to [](https://sentry.io/welcome/) for providing us with free license to their software. - ### License * [GNU GPL v3](http://www.gnu.org/licenses/gpl.html) diff --git a/UI/Web/src/app/_interceptors/error.interceptor.ts b/UI/Web/src/app/_interceptors/error.interceptor.ts index 575ed21d6..a924b6b2e 100644 --- a/UI/Web/src/app/_interceptors/error.interceptor.ts +++ b/UI/Web/src/app/_interceptors/error.interceptor.ts @@ -46,10 +46,10 @@ export class ErrorInterceptor implements HttpInterceptor { } // If we are not on no-connection, redirect there and save current url so when we refersh, we redirect back there - if (this.router.url !== '/no-connection') { - localStorage.setItem(this.urlKey, this.router.url); - this.router.navigateByUrl('/no-connection'); - } + // if (this.router.url !== '/no-connection') { + // localStorage.setItem(this.urlKey, this.router.url); + // this.router.navigateByUrl('/no-connection'); + // } break; } return throwError(error); diff --git a/UI/Web/src/app/_models/events/update-version-event.ts b/UI/Web/src/app/_models/events/update-version-event.ts index d0754d81a..d5845881c 100644 --- a/UI/Web/src/app/_models/events/update-version-event.ts +++ b/UI/Web/src/app/_models/events/update-version-event.ts @@ -5,4 +5,5 @@ export interface UpdateVersionEvent { updateTitle: string; updateUrl: string; isDocker: boolean; + publishDate: string; } \ No newline at end of file diff --git a/UI/Web/src/app/_models/preferences/page-split-option.ts b/UI/Web/src/app/_models/preferences/page-split-option.ts index ed977a7bf..e4fc3c7e8 100644 --- a/UI/Web/src/app/_models/preferences/page-split-option.ts +++ b/UI/Web/src/app/_models/preferences/page-split-option.ts @@ -1,5 +1,18 @@ export enum PageSplitOption { + /** + * Renders the left side of the image then the right side + */ SplitLeftToRight = 0, + /** + * Renders the right side of the image then the left side + */ SplitRightToLeft = 1, - NoSplit = 2 + /** + * Don't split and show the image in original size + */ + NoSplit = 2, + /** + * Don't split and scale the image to fit screen space + */ + FitSplit = 3 } diff --git a/UI/Web/src/app/_models/preferences/preferences.ts b/UI/Web/src/app/_models/preferences/preferences.ts index db5bead01..7e44dbbee 100644 --- a/UI/Web/src/app/_models/preferences/preferences.ts +++ b/UI/Web/src/app/_models/preferences/preferences.ts @@ -26,5 +26,5 @@ export interface Preferences { export const readingDirections = [{text: 'Left to Right', value: ReadingDirection.LeftToRight}, {text: 'Right to Left', value: ReadingDirection.RightToLeft}]; export const scalingOptions = [{text: 'Automatic', value: ScalingOption.Automatic}, {text: 'Fit to Height', value: ScalingOption.FitToHeight}, {text: 'Fit to Width', value: ScalingOption.FitToWidth}, {text: 'Original', value: ScalingOption.Original}]; -export const pageSplitOptions = [{text: 'Right to Left', value: PageSplitOption.SplitRightToLeft}, {text: 'Left to Right', value: PageSplitOption.SplitLeftToRight}, {text: 'No Split', value: PageSplitOption.NoSplit}]; +export const pageSplitOptions = [{text: 'Fit to Screen', value: PageSplitOption.FitSplit}, {text: 'Right to Left', value: PageSplitOption.SplitRightToLeft}, {text: 'Left to Right', value: PageSplitOption.SplitLeftToRight}, {text: 'No Split', value: PageSplitOption.NoSplit}]; export const readingModes = [{text: 'Left to Right', value: READER_MODE.MANGA_LR}, {text: 'Up to Down', value: READER_MODE.MANGA_UD}, {text: 'Webtoon', value: READER_MODE.WEBTOON}]; diff --git a/UI/Web/src/app/admin/_models/server-info.ts b/UI/Web/src/app/admin/_models/server-info.ts index 5fc3150f9..d13419f96 100644 --- a/UI/Web/src/app/admin/_models/server-info.ts +++ b/UI/Web/src/app/admin/_models/server-info.ts @@ -1,8 +1,9 @@ export interface ServerInfo { os: string; - dotNetVersion: string; + dotnetVersion: string; runTimeVersion: string; kavitaVersion: string; - buildBranch: string; - culture: string; + NumOfCores: number; + installId: string; + isDocker: boolean; } \ No newline at end of file diff --git a/UI/Web/src/app/admin/changelog/changelog.component.html b/UI/Web/src/app/admin/changelog/changelog.component.html index 03ef9fe5d..9655fe18e 100644 --- a/UI/Web/src/app/admin/changelog/changelog.component.html +++ b/UI/Web/src/app/admin/changelog/changelog.component.html @@ -1,15 +1,19 @@ - +
+
-
{{update.updateTitle}}  +

{{update.updateTitle}}  Installed Available -

+ +
Published: {{update.publishDate | date: 'short'}}
+

           Download
         
-
+ +
diff --git a/UI/Web/src/app/admin/changelog/changelog.component.scss b/UI/Web/src/app/admin/changelog/changelog.component.scss index 0f737bca4..38f0fd181 100644 --- a/UI/Web/src/app/admin/changelog/changelog.component.scss +++ b/UI/Web/src/app/admin/changelog/changelog.component.scss @@ -2,4 +2,20 @@ width: 100%; word-wrap: break-word; white-space: pre-wrap; -} \ No newline at end of file +} + + + +::ng-deep .changelog { + + h1 { + font-size: 26px; + } + + p, ul { + margin-bottom: 0px; + } + + +} + diff --git a/UI/Web/src/app/admin/manage-system/manage-system.component.html b/UI/Web/src/app/admin/manage-system/manage-system.component.html index 2bee93f0e..a45e55955 100644 --- a/UI/Web/src/app/admin/manage-system/manage-system.component.html +++ b/UI/Web/src/app/admin/manage-system/manage-system.component.html @@ -33,8 +33,8 @@
Version
{{serverInfo.kavitaVersion}}
-
.NET Version
-
{{serverInfo.dotNetVersion}}
+
Install ID
+
{{serverInfo.installId}}
@@ -43,7 +43,7 @@
Wiki:
@@ -63,7 +63,6 @@
\ No newline at end of file diff --git a/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss b/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss index 943c27c30..54df9f40d 100644 --- a/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss +++ b/UI/Web/src/app/cards/bulk-operations/bulk-operations.component.scss @@ -1,8 +1,8 @@ -@import "../../../theme/colors"; +@use "../../../theme/colors"; .bulk-select { - background-color: $dark-form-background-no-opacity; - border-bottom: 2px solid $primary-color; + background-color: colors.$dark-form-background-no-opacity; + border-bottom: 2px solid colors.$primary-color; color: white; } @@ -11,5 +11,5 @@ } .highlight { - color: $primary-color !important; + color: colors.$primary-color !important; } \ No newline at end of file diff --git a/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss b/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss index 9056ec3e8..5932325a4 100644 --- a/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss +++ b/UI/Web/src/app/cards/cover-image-chooser/cover-image-chooser.component.scss @@ -1,4 +1,4 @@ -@import '../../../theme/colors'; +@use '../../../theme/colors'; $image-height: 230px; $image-width: 160px; @@ -14,7 +14,7 @@ $image-width: 160px; } .selected { - outline: 5px solid $primary-color; + outline: 5px solid colors.$primary-color; outline-width: medium; outline-offset: -1px; } @@ -22,7 +22,7 @@ $image-width: 160px; ngx-file-drop ::ng-deep > div { // styling for the outer drop box width: 100%; - border: 2px solid $primary-color; + border: 2px solid colors.$primary-color; border-radius: 5px; height: 100px; margin: auto; diff --git a/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html b/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html index 6882cb3b3..6bc608c11 100644 --- a/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html +++ b/UI/Web/src/app/manga-reader/infinite-scroller/infinite-scroller.component.html @@ -28,7 +28,7 @@ image -