diff --git a/apps/desktop-ui/src/components/chmod-calculator/chmod-calculator-layout.tsx b/apps/desktop-ui/src/components/chmod-calculator/chmod-calculator-layout.tsx index 4ac72c46..6c8c0c14 100644 --- a/apps/desktop-ui/src/components/chmod-calculator/chmod-calculator-layout.tsx +++ b/apps/desktop-ui/src/components/chmod-calculator/chmod-calculator-layout.tsx @@ -4,15 +4,12 @@ import React, { useCallback, useState } from 'react' import { useTranslations } from 'next-intl' import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' import { Button } from '@/components/ui/button' -import { Card } from '@/components/ui/card' import { Checkbox } from '@/components/ui/checkbox' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Check, Copy, SquareTerminal } from 'lucide-react' import { IconLockAccess } from '@tabler/icons-react' -import { ToolPageHeader } from '@/components/tools/tool-page-header' -import { RevealItem } from '@/components/dashboard/dashboard-reveal' -import { CATEGORY_ACCENT } from '@/components/dashboard/types' +import { ToolShell } from '@/components/tools/tool-shell' import { CHMOD_PRESETS, PERMISSION_CLASSES, @@ -82,22 +79,11 @@ export function ChmodCalculatorLayout() { } return ( -
-
- - - - - +
{/* Checkbox grid */} - +
@@ -174,11 +160,11 @@ export function ChmodCalculatorLayout() { {!symbolicValid &&

{t('symbolic.invalid')}

}
- +
{/* Output */} - +
- +
{/* Presets */} - +
@@ -239,10 +225,10 @@ export function ChmodCalculatorLayout() {
-
+
- + ) } diff --git a/apps/desktop-ui/src/components/csv-excel-json/csv-excel-json-tool.tsx b/apps/desktop-ui/src/components/csv-excel-json/csv-excel-json-tool.tsx index 091ee925..509b4dd7 100644 --- a/apps/desktop-ui/src/components/csv-excel-json/csv-excel-json-tool.tsx +++ b/apps/desktop-ui/src/components/csv-excel-json/csv-excel-json-tool.tsx @@ -13,14 +13,10 @@ import { IconUpload, } from "@tabler/icons-react"; import { toast } from "sonner"; -import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; -import { Textarea } from "@/components/ui/textarea"; -import { Label } from "@/components/ui/label"; import { ToolPinButton } from "@/components/tools/tool-header"; -import { ToolPageHeader } from "@/components/tools/tool-page-header"; -import { RevealItem } from "@/components/dashboard/dashboard-reveal"; -import { CATEGORY_ACCENT } from "@/components/dashboard/types"; +import { ToolShell } from "@/components/tools/tool-shell"; +import { IOPanel, ToolTextArea } from "@/components/tools/io-panel"; import { useToolUsage } from "@/hooks/use-tool-usage"; import { cn } from "@/lib/utils"; import { @@ -152,143 +148,141 @@ export function CsvExcelJsonTool() { }; return ( -
-
- - -
- +
-
- - - -
{ - if (e.key === "Enter" || e.key === " ") { - e.preventDefault(); - fileRef.current?.click(); - } - }} - onDragEnter={(e) => { - e.preventDefault(); - setDragOver(true); - }} - onDragLeave={(e) => { + } + contentClassName="overflow-auto" + > +
+
{ + if (e.key === "Enter" || e.key === " ") { e.preventDefault(); - setDragOver(false); + fileRef.current?.click(); + } + }} + onDragEnter={(e) => { + e.preventDefault(); + setDragOver(true); + }} + onDragLeave={(e) => { + e.preventDefault(); + setDragOver(false); + }} + onDragOver={(e) => e.preventDefault()} + onDrop={onDrop} + className={cn( + "rounded-xl border-2 border-dashed p-8 text-center transition-colors", + dragOver + ? "border-primary bg-primary/5" + : "border-muted-foreground/25 bg-muted/20" + )} + > + +

{t("dropTitle")}

+

{t("dropHint")}

+ { + const f = e.target.files?.[0]; + if (f) void handleFile(f); + e.target.value = ""; }} - onDragOver={(e) => e.preventDefault()} - onDrop={onDrop} - className={cn( - "rounded-xl border-2 border-dashed p-8 text-center transition-colors", - dragOver - ? "border-primary bg-primary/5" - : "border-muted-foreground/25 bg-muted/20" - )} + /> + +
+ + fileRef.current?.click()} + variant="ghost" + size="sm" + className="h-7 text-xs" + onClick={loadSample} > - - {t("chooseFile")} + {t("loadSample")} -
- -
-
- - -
-