Skip to content

Commit

Permalink
More Polish (#2686)
Browse files Browse the repository at this point in the history
  • Loading branch information
majora2007 authored Feb 3, 2024
1 parent 2ef266c commit 0b0e858
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 8 deletions.
3 changes: 1 addition & 2 deletions API/API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
<PackageReference Include="Hangfire" Version="1.8.9" />
<PackageReference Include="Hangfire.InMemory" Version="0.7.0" />
<PackageReference Include="Hangfire.MaximumConcurrentExecutions" Version="1.1.0" />
<PackageReference Include="Hangfire.MemoryStorage.Core" Version="1.4.0" />
<PackageReference Include="Hangfire.Storage.SQLite" Version="0.4.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.57" />
<PackageReference Include="MarkdownDeep.NET.Core" Version="1.5.0.4" />
Expand Down Expand Up @@ -102,7 +101,7 @@
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
<PackageReference Include="System.IO.Abstractions" Version="20.0.15" />
<PackageReference Include="System.Drawing.Common" Version="8.0.1" />
<PackageReference Include="VersOne.Epub" Version="3.3.1" />
Expand Down
2 changes: 1 addition & 1 deletion API/Controllers/ScrobblingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ScrobblingController(IUnitOfWork unitOfWork, IScrobblingService scrobblin
/// </summary>
/// <returns></returns>
[HttpGet("anilist-token")]
public async Task<ActionResult> GetAniListToken()
public async Task<ActionResult<string>> GetAniListToken()
{
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername());
if (user == null) return Unauthorized();
Expand Down
2 changes: 2 additions & 0 deletions API/Services/Plus/LicenseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ public async Task<bool> HasActiveLicense(bool forceCheck = false)
catch (Exception ex)
{
logger.LogError(ex, "There was an issue connecting to Kavita+");
await provider.FlushAsync();
await provider.SetAsync(CacheKey, false, _licenseCacheTimeout);
}

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
<ng-container title>
<h2 class="title text-break">
<app-card-actionables (actionHandler)="performAction($event)" [actions]="seriesActions" [labelBy]="series.name" iconClass="fa-ellipsis-v"></app-card-actionables>
<span>{{series.name}}</span>
<span>{{series.name}}
@if(isLoadingExtra || isLoading) {
<div class="spinner-border spinner-border-sm text-primary" role="status">
<span class="visually-hidden">loading...</span>
</div>
}
</span>
</h2>
</ng-container>
<ng-container subtitle *ngIf="series.localizedName !== series.name">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
isAdmin = false;
hasDownloadingRole = false;
isLoading = true;
isLoadingExtra = false;
showBook = true;

currentlyReadingChapter: Chapter | undefined = undefined;
Expand Down Expand Up @@ -708,7 +709,11 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {


loadPlusMetadata(seriesId: number, libraryType: LibraryType) {
this.isLoadingExtra = true;
this.cdRef.markForCheck();
this.metadataService.getSeriesMetadataFromPlus(seriesId, libraryType).subscribe(data => {
this.isLoadingExtra = false;
this.cdRef.markForCheck();
if (data === null) return;

// Reviews
Expand Down
2 changes: 0 additions & 2 deletions UI/Web/src/app/shared/loading/loading.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ export class LoadingComponent {
* Uses absolute positioning to ensure it loads over content
*/
@Input() absolute: boolean = false;

constructor() { }
}
21 changes: 19 additions & 2 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "GPL-3.0",
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
},
"version": "0.7.13.17"
"version": "0.7.13.18"
},
"servers": [
{
Expand Down Expand Up @@ -7238,7 +7238,24 @@
"summary": "Get the current user's AniList token",
"responses": {
"200": {
"description": "Success"
"description": "Success",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
},
"application/json": {
"schema": {
"type": "string"
}
},
"text/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
Expand Down

0 comments on commit 0b0e858

Please sign in to comment.