feat: analyze all button, support for UTF8 filenames

This commit is contained in:
vas3k
2025-05-22 19:22:30 +02:00
parent feb56fa3ac
commit 347cf2a0e8
7 changed files with 40 additions and 10 deletions

View File

@@ -0,0 +1,19 @@
"use client"
import { Button } from "@/components/ui/button"
import { Swords } from "lucide-react"
export function AnalyzeAllButton() {
const handleAnalyzeAll = () => {
document.querySelectorAll("button[data-analyze-button]").forEach((button) => {
;(button as HTMLButtonElement).click()
})
}
return (
<Button variant="outline" className="flex items-center gap-2" onClick={handleAnalyzeAll}>
<Swords className="h-4 w-4" />
Analyze all
</Button>
)
}

View File

@@ -141,7 +141,7 @@ export default function AnalyzeForm({
return (
<>
<Button className="w-full mb-6 py-6 text-lg" onClick={startAnalyze} disabled={isAnalyzing}>
<Button className="w-full mb-6 py-6 text-lg" onClick={startAnalyze} disabled={isAnalyzing} data-analyze-button>
{isAnalyzing ? (
<>
<Loader2 className="mr-1 h-4 w-4 animate-spin" />