mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Add Tag description filter (#3011)
* init tag description filter issue with rendering UI filter dialog * move description to string block * Add 0.18.0 changelog page
This commit is contained in:
@@ -286,6 +286,9 @@ input TagFilterType {
|
|||||||
"""Filter by tag aliases"""
|
"""Filter by tag aliases"""
|
||||||
aliases: StringCriterionInput
|
aliases: StringCriterionInput
|
||||||
|
|
||||||
|
"""Filter by tag description"""
|
||||||
|
description: StringCriterionInput
|
||||||
|
|
||||||
"""Filter to only include tags missing this property"""
|
"""Filter to only include tags missing this property"""
|
||||||
is_missing: String
|
is_missing: String
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ type TagFilterType struct {
|
|||||||
Name *StringCriterionInput `json:"name"`
|
Name *StringCriterionInput `json:"name"`
|
||||||
// Filter by tag aliases
|
// Filter by tag aliases
|
||||||
Aliases *StringCriterionInput `json:"aliases"`
|
Aliases *StringCriterionInput `json:"aliases"`
|
||||||
|
// Filter by tag description
|
||||||
|
Description *StringCriterionInput `json:"description"`
|
||||||
// Filter to only include tags missing this property
|
// Filter to only include tags missing this property
|
||||||
IsMissing *string `json:"is_missing"`
|
IsMissing *string `json:"is_missing"`
|
||||||
// Filter by number of scenes with this tag
|
// Filter by number of scenes with this tag
|
||||||
|
|||||||
@@ -324,6 +324,8 @@ func (qb *tagQueryBuilder) makeFilter(ctx context.Context, tagFilter *models.Tag
|
|||||||
|
|
||||||
query.handleCriterion(ctx, stringCriterionHandler(tagFilter.Name, tagTable+".name"))
|
query.handleCriterion(ctx, stringCriterionHandler(tagFilter.Name, tagTable+".name"))
|
||||||
query.handleCriterion(ctx, tagAliasCriterionHandler(qb, tagFilter.Aliases))
|
query.handleCriterion(ctx, tagAliasCriterionHandler(qb, tagFilter.Aliases))
|
||||||
|
|
||||||
|
query.handleCriterion(ctx, stringCriterionHandler(tagFilter.Description, tagTable+".description"))
|
||||||
query.handleCriterion(ctx, boolCriterionHandler(tagFilter.IgnoreAutoTag, tagTable+".ignore_auto_tag", nil))
|
query.handleCriterion(ctx, boolCriterionHandler(tagFilter.IgnoreAutoTag, tagTable+".ignore_auto_tag", nil))
|
||||||
|
|
||||||
query.handleCriterion(ctx, tagIsMissingCriterionHandler(qb, tagFilter.IsMissing))
|
query.handleCriterion(ctx, tagIsMissingCriterionHandler(qb, tagFilter.IsMissing))
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import V0150 from "src/docs/en/Changelog/v0150.md";
|
|||||||
import V0160 from "src/docs/en/Changelog/v0160.md";
|
import V0160 from "src/docs/en/Changelog/v0160.md";
|
||||||
import V0161 from "src/docs/en/Changelog/v0161.md";
|
import V0161 from "src/docs/en/Changelog/v0161.md";
|
||||||
import V0170 from "src/docs/en/Changelog/v0170.md";
|
import V0170 from "src/docs/en/Changelog/v0170.md";
|
||||||
|
import V0180 from "src/docs/en/Changelog/v0180.md";
|
||||||
import { MarkdownPage } from "../Shared/MarkdownPage";
|
import { MarkdownPage } from "../Shared/MarkdownPage";
|
||||||
|
|
||||||
// to avoid use of explicit any
|
// to avoid use of explicit any
|
||||||
@@ -60,9 +61,9 @@ const Changelog: React.FC = () => {
|
|||||||
// after new release:
|
// after new release:
|
||||||
// add entry to releases, using the current* fields
|
// add entry to releases, using the current* fields
|
||||||
// then update the current fields.
|
// then update the current fields.
|
||||||
const currentVersion = stashVersion || "v0.17.0";
|
const currentVersion = stashVersion || "v0.18.0";
|
||||||
const currentDate = buildDate;
|
const currentDate = buildDate;
|
||||||
const currentPage = V0170;
|
const currentPage = V0180;
|
||||||
|
|
||||||
const releases: IStashRelease[] = [
|
const releases: IStashRelease[] = [
|
||||||
{
|
{
|
||||||
@@ -71,6 +72,11 @@ const Changelog: React.FC = () => {
|
|||||||
page: currentPage,
|
page: currentPage,
|
||||||
defaultOpen: true,
|
defaultOpen: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
version: "v0.17.2",
|
||||||
|
date: "2022-10-25",
|
||||||
|
page: V0170,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
version: "v0.16.1",
|
version: "v0.16.1",
|
||||||
date: "2022-07-26",
|
date: "2022-07-26",
|
||||||
|
|||||||
2
ui/v2.5/src/docs/en/Changelog/v0180.md
Normal file
2
ui/v2.5/src/docs/en/Changelog/v0180.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### ✨ New Features
|
||||||
|
* Added tag description filter criterion. ([#3011](https://github.com/stashapp/stash/pull/3011))
|
||||||
@@ -161,6 +161,7 @@ export function makeCriteria(type: CriterionType = "none") {
|
|||||||
case "title":
|
case "title":
|
||||||
case "director":
|
case "director":
|
||||||
case "synopsis":
|
case "synopsis":
|
||||||
|
case "description":
|
||||||
return new StringCriterion(new StringCriterionOption(type, type));
|
return new StringCriterion(new StringCriterionOption(type, type));
|
||||||
case "interactive":
|
case "interactive":
|
||||||
return new InteractiveCriterion();
|
return new InteractiveCriterion();
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ const criterionOptions = [
|
|||||||
createMandatoryStringCriterionOption("name"),
|
createMandatoryStringCriterionOption("name"),
|
||||||
TagIsMissingCriterionOption,
|
TagIsMissingCriterionOption,
|
||||||
createStringCriterionOption("aliases"),
|
createStringCriterionOption("aliases"),
|
||||||
|
createStringCriterionOption("description"),
|
||||||
createBooleanCriterionOption("ignore_auto_tag"),
|
createBooleanCriterionOption("ignore_auto_tag"),
|
||||||
createMandatoryNumberCriterionOption("scene_count"),
|
createMandatoryNumberCriterionOption("scene_count"),
|
||||||
createMandatoryNumberCriterionOption("image_count"),
|
createMandatoryNumberCriterionOption("image_count"),
|
||||||
|
|||||||
@@ -124,4 +124,5 @@ export type CriterionType =
|
|||||||
| "performer_age"
|
| "performer_age"
|
||||||
| "duplicated"
|
| "duplicated"
|
||||||
| "ignore_auto_tag"
|
| "ignore_auto_tag"
|
||||||
| "file_count";
|
| "file_count"
|
||||||
|
| "description";
|
||||||
|
|||||||
Reference in New Issue
Block a user