diff --git a/frontend/app/admin/products/CanonicalNameForm.tsx b/frontend/app/admin/products/CanonicalNameForm.tsx index 0e11cf09..989593ea 100644 --- a/frontend/app/admin/products/CanonicalNameForm.tsx +++ b/frontend/app/admin/products/CanonicalNameForm.tsx @@ -34,15 +34,43 @@ export default function CanonicalNameForm({ }} style={{ display: 'flex', gap: '0.5rem', alignItems: 'center', flexWrap: 'wrap' }} > - + - + {isPending ? 'Sparar...' : 'Spara'} {error ? {error} : null} diff --git a/frontend/app/admin/products/MergePreviewForm.tsx b/frontend/app/admin/products/MergePreviewForm.tsx index 4a4cf478..02cfb658 100644 --- a/frontend/app/admin/products/MergePreviewForm.tsx +++ b/frontend/app/admin/products/MergePreviewForm.tsx @@ -99,14 +99,21 @@ export default function MergePreviewForm({ products }: Props) { > Förhandsgranska merge - - - Source product (ska bort) - + + + Source product (ska bort) setSourceProductId(e.target.value)} - style={{ width: '100%', padding: '0.5rem' }} + style={{ + width: '100%', + padding: '0.75rem', + border: '1px solid #ddd', + borderRadius: '4px', + fontSize: '1rem', + boxSizing: 'border-box', + minHeight: '44px', + }} > Välj source {products.map((product) => ( @@ -117,13 +124,20 @@ export default function MergePreviewForm({ products }: Props) { - - Target product (ska behållas) - + + Target product (ska behållas) setTargetProductId(e.target.value)} - style={{ width: '100%', padding: '0.5rem' }} + style={{ + width: '100%', + padding: '0.75rem', + border: '1px solid #ddd', + borderRadius: '4px', + fontSize: '1rem', + boxSizing: 'border-box', + minHeight: '44px', + }} > Välj target {products.map((product) => ( @@ -140,7 +154,17 @@ export default function MergePreviewForm({ products }: Props) { type="button" onClick={fetchPreview} disabled={isPending} - style={{ padding: '0.6rem 1rem' }} + style={{ + padding: '0.75rem 1.5rem', + background: '#0070f3', + color: 'white', + border: 'none', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '1rem', + minHeight: '44px', + fontWeight: 600, + }} > {isPending ? 'Hämtar preview...' : 'Förhandsgranska merge'} @@ -150,7 +174,17 @@ export default function MergePreviewForm({ products }: Props) { type="button" onClick={() => setIsConfirming((prev) => !prev)} disabled={isPending} - style={{ padding: '0.6rem 1rem' }} + style={{ + padding: '0.75rem 1.5rem', + background: '#f0f0f0', + color: '#333', + border: '1px solid #ccc', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '1rem', + minHeight: '44px', + fontWeight: 600, + }} > {isConfirming ? 'Avbryt bekräftelse' : 'Gå vidare till bekräftelse'} @@ -239,7 +273,17 @@ export default function MergePreviewForm({ products }: Props) { type="button" onClick={confirmMerge} disabled={isPending} - style={{ padding: '0.75rem 1rem' }} + style={{ + padding: '0.75rem 1.5rem', + background: '#c0392b', + color: 'white', + border: 'none', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '1rem', + minHeight: '44px', + fontWeight: 600, + }} > {isPending ? 'Slår ihop...' : 'Bekräfta merge'} @@ -248,7 +292,17 @@ export default function MergePreviewForm({ products }: Props) { type="button" onClick={() => setIsConfirming(false)} disabled={isPending} - style={{ padding: '0.75rem 1rem' }} + style={{ + padding: '0.75rem 1.5rem', + background: '#f0f0f0', + color: '#333', + border: '1px solid #ccc', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '1rem', + minHeight: '44px', + fontWeight: 600, + }} > Avbryt diff --git a/frontend/app/inventory/InventoryConsumeForm.tsx b/frontend/app/inventory/InventoryConsumeForm.tsx index e2eaeb08..201caaab 100644 --- a/frontend/app/inventory/InventoryConsumeForm.tsx +++ b/frontend/app/inventory/InventoryConsumeForm.tsx @@ -64,25 +64,39 @@ export default function InventoryConsumeForm({ id, unit }: Props) { > - - Hur mycket använde du? ({unit}) - + + Hur mycket använde du? ({unit}) - - Kommentar - + + Kommentar @@ -90,7 +104,17 @@ export default function InventoryConsumeForm({ id, unit }: Props) { {isPending ? 'Sparar...' : 'Spara användning'} @@ -99,7 +123,17 @@ export default function InventoryConsumeForm({ id, unit }: Props) { type="button" onClick={() => setIsOpen(false)} disabled={isPending} - style={{ padding: '0.6rem 0.9rem' }} + style={{ + padding: '0.75rem 1.5rem', + background: '#f0f0f0', + color: '#333', + border: '1px solid #ccc', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '1rem', + minHeight: '44px', + fontWeight: 600, + }} > Avbryt diff --git a/frontend/app/inventory/InventoryEditForm.tsx b/frontend/app/inventory/InventoryEditForm.tsx index eb7c076d..ad6ac650 100644 --- a/frontend/app/inventory/InventoryEditForm.tsx +++ b/frontend/app/inventory/InventoryEditForm.tsx @@ -120,25 +120,39 @@ export default function InventoryEditForm({ item }: Props) { gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))', }} > - - Mängd - + + Mängd - - Enhet - + + Enhet {UNIT_OPTIONS.map((opt) => ( @@ -148,13 +162,20 @@ export default function InventoryEditForm({ item }: Props) { - - Plats - + + Plats {LOCATION_OPTIONS.map((opt) => ( @@ -164,48 +185,76 @@ export default function InventoryEditForm({ item }: Props) { - - Varumärke - + + Varumärke - - Bäst före - + + Bäst före - - Passar till - + + Passar till - - Kommentar - + + Kommentar @@ -222,7 +271,17 @@ export default function InventoryEditForm({ item }: Props) { {isPending ? 'Sparar...' : 'Spara ändringar'} @@ -231,7 +290,17 @@ export default function InventoryEditForm({ item }: Props) { type="button" onClick={() => setIsEditing(false)} disabled={isPending} - style={{ padding: '0.6rem 0.9rem' }} + style={{ + padding: '0.75rem 1.5rem', + background: '#f0f0f0', + color: '#333', + border: '1px solid #ccc', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '1rem', + minHeight: '44px', + fontWeight: 600, + }} > Avbryt diff --git a/frontend/app/inventory/ProductForm.tsx b/frontend/app/inventory/ProductForm.tsx index 61cde7f7..5c87035e 100644 --- a/frontend/app/inventory/ProductForm.tsx +++ b/frontend/app/inventory/ProductForm.tsx @@ -36,19 +36,40 @@ export default function ProductForm() { > Skapa produkt - + Produktnamn - - + - + {isPending ? 'Sparar...' : 'Skapa produkt'} diff --git a/frontend/app/recipes/[id]/edit/page.tsx b/frontend/app/recipes/[id]/edit/page.tsx index 6f44d615..0f0fafcb 100644 --- a/frontend/app/recipes/[id]/edit/page.tsx +++ b/frontend/app/recipes/[id]/edit/page.tsx @@ -57,6 +57,7 @@ export default function EditRecipePage() { const [isDeleting, setIsDeleting] = useState(false); const [error, setError] = useState(null); const [showPreview, setShowPreview] = useState(false); + const [showMarkdownHelp, setShowMarkdownHelp] = useState(false); useEffect(() => { const loadData = async () => { @@ -205,6 +206,7 @@ export default function EditRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', }} /> @@ -225,6 +227,7 @@ export default function EditRecipePage() { fontSize: '1rem', minHeight: '100px', fontFamily: 'inherit', + boxSizing: 'border-box', }} /> @@ -233,10 +236,32 @@ export default function EditRecipePage() { Instruktioner - - Markdown-stöd: - {MARKDOWN_HELP} - + setShowMarkdownHelp(!showMarkdownHelp)} + style={{ + marginBottom: '0.5rem', + padding: '0.4rem 0.75rem', + background: '#f9f9f9', + border: '1px solid #ddd', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '0.85rem', + color: '#666', + fontWeight: 500, + display: 'flex', + alignItems: 'center', + gap: '0.25rem', + }} + > + {showMarkdownHelp ? '▼' : '▶'} + Markdown-stöd + + {showMarkdownHelp && ( + + {MARKDOWN_HELP} + + )} @@ -313,6 +339,8 @@ export default function EditRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} > Välj produkt @@ -335,6 +363,8 @@ export default function EditRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} /> @@ -348,6 +378,8 @@ export default function EditRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} > {UNIT_OPTIONS.map((opt) => ( @@ -368,6 +400,8 @@ export default function EditRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} /> diff --git a/frontend/app/recipes/create/CreateRecipePage.tsx b/frontend/app/recipes/create/CreateRecipePage.tsx index 2a202df8..4ee81e35 100644 --- a/frontend/app/recipes/create/CreateRecipePage.tsx +++ b/frontend/app/recipes/create/CreateRecipePage.tsx @@ -51,6 +51,7 @@ export default function CreateRecipePage() { const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null); const [showPreview, setShowPreview] = useState(false); + const [showMarkdownHelp, setShowMarkdownHelp] = useState(false); useEffect(() => { fetchJson('/api/products') @@ -160,6 +161,7 @@ export default function CreateRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', }} /> @@ -180,6 +182,7 @@ export default function CreateRecipePage() { fontSize: '1rem', minHeight: '100px', fontFamily: 'inherit', + boxSizing: 'border-box', }} /> @@ -188,10 +191,32 @@ export default function CreateRecipePage() { Instruktioner - - Markdown-stöd: - {MARKDOWN_HELP} - + setShowMarkdownHelp(!showMarkdownHelp)} + style={{ + marginBottom: '0.5rem', + padding: '0.4rem 0.75rem', + background: '#f9f9f9', + border: '1px solid #ddd', + borderRadius: '4px', + cursor: 'pointer', + fontSize: '0.85rem', + color: '#666', + fontWeight: 500, + display: 'flex', + alignItems: 'center', + gap: '0.25rem', + }} + > + {showMarkdownHelp ? '▼' : '▶'} + Markdown-stöd + + {showMarkdownHelp && ( + + {MARKDOWN_HELP} + + )} @@ -268,6 +294,8 @@ export default function CreateRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} > Välj produkt @@ -290,6 +318,8 @@ export default function CreateRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} /> @@ -303,6 +333,8 @@ export default function CreateRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} > {UNIT_OPTIONS.map((opt) => ( @@ -323,6 +355,8 @@ export default function CreateRecipePage() { borderRadius: '4px', fontSize: '1rem', minHeight: '44px', + boxSizing: 'border-box', + width: '100%', }} />