Skip to content

Commit

Permalink
make fmt-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
stg-annon committed Dec 4, 2024
1 parent b71f726 commit fe2a1b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/sqlite/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ func (qb *TagStore) getTagSort(query *queryBuilder, findFilter *models.FindFilte
sortQuery := ""
switch sort {
case "name":
sortQuery += fmt.Sprintf(" ORDER BY COALESCE(tags.sort_name, tags.name, tags.id) COLLATE NATURAL_CI %s", getSortDirection(direction))
sortQuery += fmt.Sprintf(" ORDER BY COALESCE(tags.sort_name, tags.name) COLLATE NATURAL_CI %s", getSortDirection(direction))
case "scenes_count":
sortQuery += getCountSort(tagTable, scenesTagsTable, tagIDColumn, direction)
case "scene_markers_count":
Expand Down
17 changes: 13 additions & 4 deletions ui/v2.5/src/components/Shared/TagLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ type SceneMarkerFragment = Pick<GQL.SceneMarker, "id" | "title" | "seconds"> & {
primary_tag: Pick<GQL.Tag, "id" | "name">;
};

interface ISortNameLinkProps{
link: string
interface ISortNameLinkProps {
link: string;
className?: string;
sortName?: string;
}
Expand All @@ -32,7 +32,12 @@ const SortNameLinkComponent: React.FC<ISortNameLinkProps> = ({
children,
}) => {
return (
<Badge data-name={className} data-sort-name={sortName} className={cx("tag-item", className)} variant="secondary">
<Badge
data-name={className}
data-sort-name={sortName}
className={cx("tag-item", className)}
variant="secondary"
>
<Link to={link}>{children}</Link>
</Badge>
);
Expand Down Expand Up @@ -282,7 +287,11 @@ export const TagLink: React.FC<ITagLinkProps> = ({
}, [hierarchyTooltipID]);

return (
<SortNameLinkComponent sortName={tag.sort_name || title} link={link} className={className}>
<SortNameLinkComponent
sortName={tag.sort_name || title}
link={link}
className={className}
>
<TagPopover id={tag.id ?? ""} placement={hoverPlacement}>
{title}
{showHierarchyIcon && (
Expand Down

0 comments on commit fe2a1b5

Please sign in to comment.