-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New page that allow managing matched metadata for Kavita+ is done for…
… basic filtering. I just need to maybe hook up a filter and allow triggering a job to trigger the automatic job (but need to expose the rate limit left first).
- Loading branch information
1 parent
6f52ad7
commit f0ad031
Showing
14 changed files
with
207 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace API.DTOs.KavitaPlus.Manage; | ||
|
||
/// <summary> | ||
/// Represents an option in the UI layer for Filtering | ||
/// </summary> | ||
public enum MatchStateOption | ||
{ | ||
All = 0, | ||
Matched = 1, | ||
NotMatched = 2, | ||
Error = 3, | ||
DontMatch = 4 | ||
} | ||
|
||
public class ManageMatchFilterDto | ||
{ | ||
public MatchStateOption MatchStateOption { get; set; } = MatchStateOption.All; | ||
public string SearchTerm { get; set; } = string.Empty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {MatchStateOption} from "./match-state-option"; | ||
|
||
export interface ManageMatchFilter { | ||
matchStateOption: MatchStateOption; | ||
searchTerm: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export enum MatchStateOption { | ||
All = 0, | ||
Matched = 1, | ||
NotMatched = 2, | ||
Error = 3, | ||
DontMatch = 4 | ||
} | ||
|
||
export const allMatchStates = [ | ||
MatchStateOption.Matched, MatchStateOption.NotMatched, MatchStateOption.Error, MatchStateOption.DontMatch | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import {MatchStateOption} from "../_models/kavitaplus/match-state-option"; | ||
import {translate} from "@jsverse/transloco"; | ||
|
||
@Pipe({ | ||
name: 'matchStateOption', | ||
standalone: true | ||
}) | ||
export class MatchStateOptionPipe implements PipeTransform { | ||
|
||
transform(value: MatchStateOption): string { | ||
switch (value) { | ||
case MatchStateOption.DontMatch: | ||
return translate('manage-matched-metadata.dont-match-label'); | ||
case MatchStateOption.All: | ||
return translate('manage-matched-metadata.all-status-label'); | ||
case MatchStateOption.Matched: | ||
return translate('manage-matched-metadata.matched-status-label'); | ||
case MatchStateOption.NotMatched: | ||
return translate('manage-matched-metadata.unmatched-status-label'); | ||
case MatchStateOption.Error: | ||
return translate('manage-matched-metadata.blacklist-status-label'); | ||
|
||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.