Skip to content
Open
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
5 changes: 3 additions & 2 deletions backend/src/dal/new-quotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@ export async function approve(
);
}
const language = targetQuote.language;
const approvedText = editQuote ?? targetQuote.text;
const quote: ApproveQuote = {
text: editQuote ?? targetQuote.text,
text: approvedText,
source: editSource ?? targetQuote.source,
length: targetQuote.text.length,
length: approvedText.length,
approvedBy: name,
Comment thread
HmonWutt marked this conversation as resolved.
id: -1,
};
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/ts/components/modals/QuoteSearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ function exactSearch(quotes: Quote[], captured: RegExp[]): [Quote[], string[]] {
}

function getLengthDesc(quote: Quote): string {
if (quote.length < 101) return "short";
if (quote.length < 301) return "medium";
if (quote.length < 601) return "long";
if (quote.group === 0) return "short";
if (quote.group === 1) return "medium";
if (quote.group === 2) return "long";
if (quote.group === 3) return "thicc";
return "thicc";
}

Expand Down
Loading