mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-02-22 05:23:31 +01:00
MAESTRO: wire file drop to header input
This commit is contained in:
@@ -39,10 +39,12 @@ Note: `npx vitest run src/__tests__/AnalyseButton.test.tsx` passes; Vitest emits
|
|||||||
|
|
||||||
- [x] All vitest tests pass: `npx vitest run src/__tests__/HeaderInput.test.tsx src/__tests__/FileDropZone.test.tsx src/__tests__/AnalyseButton.test.tsx`
|
- [x] All vitest tests pass: `npx vitest run src/__tests__/HeaderInput.test.tsx src/__tests__/FileDropZone.test.tsx src/__tests__/AnalyseButton.test.tsx`
|
||||||
- [x] User can paste text into the header input area
|
- [x] User can paste text into the header input area
|
||||||
- [ ] User can drop an EML/TXT file and see it auto-populate the input
|
- [x] User can drop an EML/TXT file and see it auto-populate the input
|
||||||
- [ ] Analyse button is disabled when input is empty
|
- [ ] Analyse button is disabled when input is empty
|
||||||
- [ ] Ctrl+Enter keyboard shortcut triggers the analyse action
|
- [ ] Ctrl+Enter keyboard shortcut triggers the analyse action
|
||||||
- [ ] Dark hacker theme is visible with correct colour palette
|
- [ ] Dark hacker theme is visible with correct colour palette
|
||||||
- [ ] Validation shows user-friendly errors for empty and oversized input
|
- [ ] Validation shows user-friendly errors for empty and oversized input
|
||||||
- [ ] `npx eslint src/` and `npx prettier --check src/` pass with zero errors
|
- [ ] `npx eslint src/` and `npx prettier --check src/` pass with zero errors
|
||||||
- [ ] Run `/speckit.analyze` to verify consistency
|
- [ ] Run `/speckit.analyze` to verify consistency
|
||||||
|
|
||||||
|
Note: Wired `FileDropZone` into the main page to populate the header input state on drop.
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
|
import FileDropZone from "../components/FileDropZone";
|
||||||
import HeaderInput from "../components/HeaderInput";
|
import HeaderInput from "../components/HeaderInput";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
@@ -30,17 +31,7 @@ export default function Home() {
|
|||||||
<HeaderInput value={headerInput} onChange={setHeaderInput} />
|
<HeaderInput value={headerInput} onChange={setHeaderInput} />
|
||||||
|
|
||||||
<div className="flex flex-col gap-6">
|
<div className="flex flex-col gap-6">
|
||||||
<div className="rounded-2xl border border-dashed border-info/40 bg-surface/70 p-6 text-center">
|
<FileDropZone onFileContent={setHeaderInput} />
|
||||||
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full border border-info/30 bg-background/40">
|
|
||||||
<span className="font-mono text-xs text-info">.eml</span>
|
|
||||||
</div>
|
|
||||||
<p className="mt-4 text-sm text-text/80">
|
|
||||||
Drop an EML or TXT file to auto-populate the header field.
|
|
||||||
</p>
|
|
||||||
<p className="mt-2 font-mono text-xs text-text/50">
|
|
||||||
Max size 1MB
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="rounded-2xl border border-info/10 bg-surface p-6">
|
<div className="rounded-2xl border border-info/10 bg-surface p-6">
|
||||||
<p className="text-xs uppercase tracking-[0.2em] text-info/80">
|
<p className="text-xs uppercase tracking-[0.2em] text-info/80">
|
||||||
|
|||||||
Reference in New Issue
Block a user