mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
feat: analyze all button, support for UTF8 filenames
This commit is contained in:
19
components/unsorted/analyze-all-button.tsx
Normal file
19
components/unsorted/analyze-all-button.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user