Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions substash/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion substash/src/components/feed/Feed.solid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ function FeedInner(props: Props) {
const spaNavType = sessionStorage.getItem("substash:last-nav-type");
const perfNavType = (
performance.getEntriesByType?.("navigation")[0] as
PerformanceNavigationTiming | undefined
| PerformanceNavigationTiming
| undefined
)?.type;
const isBackNav =
spaNavType === "traverse" || perfNavType === "back_forward";
Expand Down
8 changes: 7 additions & 1 deletion substash/src/components/search/SearchResults.solid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ import { proxyImage } from "@/lib/stash/image";
// ── Types ─────────────────────────────────────────────────────────────────────

type FilterType =
"all" | "scenes" | "images" | "tags" | "performers" | "studios" | "comments";
| "all"
| "scenes"
| "images"
| "tags"
| "performers"
| "studios"
| "comments";

interface EntityResult {
stashId: string;
Expand Down
15 changes: 11 additions & 4 deletions substash/src/lib/search/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { rawDb } from "@/lib/db";
import type { FeedItem } from "@/lib/stash/feed-item";

export type FilterType =
"all" | "scenes" | "images" | "tags" | "performers" | "studios" | "comments";
| "all"
| "scenes"
| "images"
| "tags"
| "performers"
| "studios"
| "comments";

export interface SearchResult {
items: FeedItem[];
Expand Down Expand Up @@ -247,9 +253,10 @@ export function searchComments(q: string, page: number): CommentSearchResult {
.all(pattern, PER_PAGE + 1, offset);

const countRow = rawDb
.prepare<[string], { n: number }>(
`SELECT COUNT(*) as n FROM comments WHERE body LIKE ? ESCAPE '\\'`,
)
.prepare<
[string],
{ n: number }
>(`SELECT COUNT(*) as n FROM comments WHERE body LIKE ? ESCAPE '\\'`)
.get(pattern);

const hasMore = rows.length > PER_PAGE;
Expand Down
3 changes: 2 additions & 1 deletion substash/src/lib/utils/media-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ export function formatOriginDisplay(
}

export type ValidationResult =
{ ok: true; mode: "expression" | "script" } | { ok: false; error: string };
| { ok: true; mode: "expression" | "script" }
| { ok: false; error: string };

/** Syntax-check a script without running it. Reports which mode it will use. */
export function validateTitleExpr(expr: string): ValidationResult {
Expand Down
Loading