From 1d56f5a0a115f07cb9320547d32dff352c3fb62e Mon Sep 17 00:00:00 2001 From: Joe Milazzo Date: Sun, 7 Jan 2024 08:15:00 -0600 Subject: [PATCH] Small Tweaks before Release (#2571) Co-authored-by: charles <30816317+charles7668@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/bug_report.md | 42 ------------------- .github/ISSUE_TEMPLATE/bug_report.yml | 12 +++--- API/Controllers/SettingsController.cs | 18 ++++---- API/Data/Repositories/UserRepository.cs | 2 + API/Services/StatisticService.cs | 1 + README.md | 8 ++-- .../app/admin/license/license.component.html | 13 ++++-- .../app/admin/license/license.component.ts | 2 +- .../manage-email-settings.component.ts | 2 +- .../manga-reader/manga-reader.component.ts | 5 ++- UI/Web/src/assets/langs/en.json | 7 ++-- openapi.json | 2 +- 12 files changed, 43 insertions(+), 71 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index bfd2bab0a..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: needs-triage -assignees: '' - ---- - -**If this is a feature request, request [here](https://feats.kavitareader.com/) instead. Feature requests will be deleted from Github.** - -Please put as much information as possible to help me understand your issue. OS, browser, version are very important! - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS, Docker] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] (can be found on Server Settings -> System tab) - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 02cbdf152..726393b90 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -11,7 +11,7 @@ body: - type: markdown attributes: value: | - If you have a feature request, please go to our [Feature Requests](https://feats.kavitareader.com) page. + If you have a feature request, please submit on [Github Discussions](https://github.com/Kareadita/Kavita/discussions/2529). - type: textarea id: what-happened attributes: @@ -34,7 +34,7 @@ body: id: version attributes: label: Version - description: What version of our software are you running? + description: What version are you running? placeholder: Can be found by going to Server Settings > System value: "" validations: @@ -61,7 +61,7 @@ body: - type: dropdown id: desktop-browsers attributes: - label: If issue being seen on Desktop, what browsers are you seeing the problem on? + label: If issue being seen in the UI, what browsers are you seeing the problem on? multiple: true options: - Firefox @@ -79,7 +79,7 @@ body: - type: dropdown id: mobile-browsers attributes: - label: If issue being seen on Mobile, what browsers are you seeing the problem on? + label: If issue being seen on UI, what browsers are you seeing the problem on? multiple: true options: - Firefox @@ -97,7 +97,7 @@ body: attributes: label: Additional Notes description: Any other information about the issue not covered in this form? - placeholder: e.g. Running Kavita on a raspberry pi + placeholder: e.g. Running Kavita on a raspberry pi, updating from X version, using LSIO container, etc value: "" validations: - required: true \ No newline at end of file + required: true diff --git a/API/Controllers/SettingsController.cs b/API/Controllers/SettingsController.cs index 6e930c90a..6277d709b 100644 --- a/API/Controllers/SettingsController.cs +++ b/API/Controllers/SettingsController.cs @@ -354,15 +354,6 @@ public class SettingsController : BaseApiController { setting.Value = updateSettingsDto.EnableFolderWatching + string.Empty; _unitOfWork.SettingsRepository.Update(setting); - - if (updateSettingsDto.EnableFolderWatching) - { - await _libraryWatcher.StartWatching(); - } - else - { - _libraryWatcher.StopWatching(); - } } } @@ -378,6 +369,15 @@ public class SettingsController : BaseApiController _directoryService.CopyDirectoryToDirectory(originalBookmarkDirectory, bookmarkDirectory); _directoryService.ClearAndDeleteDirectory(originalBookmarkDirectory); } + + if (updateSettingsDto.EnableFolderWatching) + { + await _libraryWatcher.StartWatching(); + } + else + { + _libraryWatcher.StopWatching(); + } } catch (Exception ex) { diff --git a/API/Data/Repositories/UserRepository.cs b/API/Data/Repositories/UserRepository.cs index 9f52b9efc..9515a3f11 100644 --- a/API/Data/Repositories/UserRepository.cs +++ b/API/Data/Repositories/UserRepository.cs @@ -385,6 +385,7 @@ public class UserRepository : IUserRepository return await _context.AppUserDashboardStream .Include(d => d.SmartFilter) .Where(d => d.SmartFilter != null && d.SmartFilter.Id == filterId) + .AsSplitQuery() .ToListAsync(); } @@ -408,6 +409,7 @@ public class UserRepository : IUserRepository Order = d.Order, Visible = d.Visible }) + .AsSplitQuery() .ToListAsync(); var libraryIds = sideNavStreams.Where(d => d.StreamType == SideNavStreamType.Library) diff --git a/API/Services/StatisticService.cs b/API/Services/StatisticService.cs index 7c48ac5dd..ffc2196d0 100644 --- a/API/Services/StatisticService.cs +++ b/API/Services/StatisticService.cs @@ -108,6 +108,7 @@ public class StatisticService : IStatisticService .Join(_context.Chapter, p => p.ChapterId, c => c.Id, (p, c) => new { + // TODO: See if this can be done in the DB layer AverageReadingHours = Math.Min((float) p.PagesRead / (float) c.Pages, 1.0) * ((float) c.AvgHoursToRead) }) diff --git a/README.md b/README.md index ed948a773..46f6dfbb0 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ install methods and platforms. [https://wiki.kavitareader.com/en/install](https://wiki.kavitareader.com/en/install) ## Feature Requests -Got a great idea? Throw it up on our [Feature Request site](https://feats.kavitareader.com/), [Feature Discord Channel](https://discord.com/channels/821879810934439936/1164375153493422122) or vote on another idea. Please check the [Project Board](https://github.com/Kareadita/Kavita/projects?type=classic) first for a list of planned features before you submit an idea. +Got a great idea? Throw it up on [Discussions](https://github.com/Kareadita/Kavita/discussions/2529) or vote on another idea. Please check the [Project Board](https://github.com/Kareadita/Kavita/projects?type=classic) first for a list of planned features before you submit an idea. ## Notice Kavita is being actively developed and should be considered beta software until the 1.0 release. @@ -61,7 +61,8 @@ vision. You may lose data and have to restart. The Kavita team strives to avoid ## Donate If you like Kavita, have gotten good use out of it, or feel like you want to say thanks with a few bucks, feel free to donate. Money will go towards -expenses related to Kavita. Back us through [OpenCollective](https://opencollective.com/Kavita#backer). You can also use [Paypal](https://www.paypal.com/paypalme/majora2007?locale.x=en_US), however your name will not show below. +expenses related to Kavita. Back us through [OpenCollective](https://opencollective.com/Kavita#backer). You can also use [Paypal](https://www.paypal.com/paypalme/majora2007?locale.x=en_US), however your name will not show below. Kavita+ is also an +option which provides funding and you get a benefit. ## Kavita+ [Kavita+](https://wiki.kavitareader.com/en/kavita-plus) is a paid subscription that offers premium features that otherwise wouldn't be feasible to include in Kavita. It is ran and operated by majora2007, the creator and developer of Kavita. @@ -109,10 +110,9 @@ Support this project by becoming a sponsor. Your logo will show up here with a l Thank you to [ JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools. * [ Rider](http://www.jetbrains.com/rider/) -* [ dotTrace](http://www.jetbrains.com/dottrace/) ### License * [GNU GPL v3](http://www.gnu.org/licenses/gpl.html) -* Copyright 2020-2023 +* Copyright 2020-2024 diff --git a/UI/Web/src/app/admin/license/license.component.html b/UI/Web/src/app/admin/license/license.component.html index bc268788f..a9093c303 100644 --- a/UI/Web/src/app/admin/license/license.component.html +++ b/UI/Web/src/app/admin/license/license.component.html @@ -70,8 +70,15 @@
- - + + + Help + +
+
+ {{t('discord-validation')}} +
+
@@ -80,7 +87,7 @@ {{t('activate-delete')}} diff --git a/UI/Web/src/app/admin/license/license.component.ts b/UI/Web/src/app/admin/license/license.component.ts index a47240be2..82e05b784 100644 --- a/UI/Web/src/app/admin/license/license.component.ts +++ b/UI/Web/src/app/admin/license/license.component.ts @@ -48,7 +48,7 @@ export class LicenseComponent implements OnInit { ngOnInit(): void { this.formGroup.addControl('licenseKey', new FormControl('', [Validators.required])); this.formGroup.addControl('email', new FormControl('', [Validators.required])); - this.formGroup.addControl('discordId', new FormControl('', [])); + this.formGroup.addControl('discordId', new FormControl('', [Validators.pattern(/\d+/)])); this.accountService.hasAnyLicense().subscribe(res => { this.hasLicense = res; this.cdRef.markForCheck(); diff --git a/UI/Web/src/app/admin/manage-email-settings/manage-email-settings.component.ts b/UI/Web/src/app/admin/manage-email-settings/manage-email-settings.component.ts index 6657cb940..eb17d2744 100644 --- a/UI/Web/src/app/admin/manage-email-settings/manage-email-settings.component.ts +++ b/UI/Web/src/app/admin/manage-email-settings/manage-email-settings.component.ts @@ -94,7 +94,7 @@ export class ManageEmailSettingsComponent implements OnInit { const result = results[0] as EmailTestResult; if (result.successful) { const version = ('. Kavita Email: ' + results[1] ? 'v' + results[1] : ''); - this.toastr.success(translate('toasts.email-service-reachable') + version); + this.toastr.success(translate('toasts.email-service-reachable') + ' - ' + version); } else { this.toastr.error(translate('toasts.email-service-unresponsive') + result.errorMessage.split('(')[0]); } diff --git a/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts b/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts index 596f06291..81c90cf0b 100644 --- a/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts +++ b/UI/Web/src/app/manga-reader/_components/manga-reader/manga-reader.component.ts @@ -1608,7 +1608,8 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { if (this.bookmarkMode) return; const pageNum = this.pageNum; - const isDouble = Math.max(this.canvasRenderer.getBookmarkPageCount(), this.singleRenderer.getBookmarkPageCount(), + // if canvasRenderer and doubleRenderer is undefined, then we are in webtoon mode + const isDouble = this.canvasRenderer !== undefined && this.doubleRenderer !== undefined && Math.max(this.canvasRenderer.getBookmarkPageCount(), this.singleRenderer.getBookmarkPageCount(), this.doubleRenderer.getBookmarkPageCount(), this.doubleReverseRenderer.getBookmarkPageCount(), this.doubleNoCoverRenderer.getBookmarkPageCount()) > 1; if (this.CurrentPageBookmarked) { @@ -1617,6 +1618,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { forkJoin(apis).pipe(take(1)).subscribe(() => { delete this.bookmarks[pageNum]; if (isDouble) delete this.bookmarks[pageNum + 1]; + this.cdRef.detectChanges(); }); } else { let apis = [this.readerService.bookmark(this.seriesId, this.volumeId, this.chapterId, pageNum)]; @@ -1624,6 +1626,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy { forkJoin(apis).pipe(take(1)).subscribe(() => { this.bookmarks[pageNum] = 1; if (isDouble) this.bookmarks[pageNum + 1] = 1; + this.cdRef.detectChanges(); }); } diff --git a/UI/Web/src/assets/langs/en.json b/UI/Web/src/assets/langs/en.json index caff3bfd0..f45e07a51 100644 --- a/UI/Web/src/assets/langs/en.json +++ b/UI/Web/src/assets/langs/en.json @@ -594,11 +594,12 @@ "activate-description": "Enter the License Key and Email used to register with Stripe", "activate-license-label": "License Key", "activate-email-label": "{{common.email}}", - "activate-discordId-label": "Discord UserId", - "activate-discordId-tooltip": "Link your Discord Account with Kavita+. This grants you access to hidden channels to help shape Kavita", + "activate-discordId-label": "Discord User Id", + "activate-discordId-tooltip": "Link your Discord Account with Kavita+. This grants you access to hidden channels to help shape Kavita.", + "discord-validation": "This is not a valid Discord User Id. Your user id is not your discord username.", "activate-delete": "{{common.delete}}", "activate-reset": "{{common.reset}}", - "activate-reset--tooltip": "Untie your license with this server. Requires both License and Email.", + "activate-reset-tooltip": "Untie your license with this server. Requires both License and Email.", "activate-save": "{{common.save}}" }, diff --git a/openapi.json b/openapi.json index ea8382568..db167be20 100644 --- a/openapi.json +++ b/openapi.json @@ -7,7 +7,7 @@ "name": "GPL-3.0", "url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE" }, - "version": "0.7.11.11" + "version": "0.7.11.12" }, "servers": [ {