From 99a67c06c002cc461f60c2c660fd698e0b4f5685 Mon Sep 17 00:00:00 2001 From: anuphilipp3 Date: Mon, 24 Aug 2026 21:55:10 +0530 Subject: [PATCH] Phase 6-Security --- .../bcrypt-generator-layout.tsx | 28 +- .../email-validator/email-validator.tsx | 87 ++- .../encryption-playground-layout.tsx | 520 +++++++++--------- .../jwt-decoder/jwt-decoder-layout.tsx | 83 ++- .../pem-cert-decoder-layout.tsx | 61 +- 5 files changed, 368 insertions(+), 411 deletions(-) diff --git a/apps/desktop-ui/src/components/bcrypt-generator/bcrypt-generator-layout.tsx b/apps/desktop-ui/src/components/bcrypt-generator/bcrypt-generator-layout.tsx index 819bdfe6..7a9bb2cb 100644 --- a/apps/desktop-ui/src/components/bcrypt-generator/bcrypt-generator-layout.tsx +++ b/apps/desktop-ui/src/components/bcrypt-generator/bcrypt-generator-layout.tsx @@ -4,7 +4,6 @@ import React, { useCallback, useEffect, useRef, 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 { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Badge } from '@/components/ui/badge' @@ -23,9 +22,7 @@ import { TriangleAlert, } from 'lucide-react' import { IconShieldLock } 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 { hashPassword, parseBcryptHash, @@ -323,20 +320,13 @@ export function BcryptGeneratorLayout() { const t = useTranslations('BcryptGenerator') return ( -
-
- - - - - +
- +
@@ -355,8 +345,8 @@ export function BcryptGeneratorLayout() { - +
-
+ ) } diff --git a/apps/desktop-ui/src/components/email-validator/email-validator.tsx b/apps/desktop-ui/src/components/email-validator/email-validator.tsx index d2b5d7be..8a32960f 100644 --- a/apps/desktop-ui/src/components/email-validator/email-validator.tsx +++ b/apps/desktop-ui/src/components/email-validator/email-validator.tsx @@ -1,13 +1,10 @@ "use client"; import { useState, useRef, useMemo } from "react"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; -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 { IconCheck, IconX, @@ -409,17 +406,13 @@ export function EmailValidator() { }; return ( -
- - - - +
@@ -505,11 +498,11 @@ export function EmailValidator() { )}
- - - {t("score.reliabilityTitle")} - - +
+
+

{t("score.reliabilityTitle")}

+
+
{/* Simple SVG Circular Progress */} @@ -550,14 +543,14 @@ export function EmailValidator() {
- - - - - - {t("details.sectionTitle")} - - +
+
+ +
+
+

{t("details.sectionTitle")}

+
+
- - +
+
)} @@ -603,8 +596,8 @@ export function EmailValidator() { {!bulkLoading && bulkResults.length === 0 && ( - - +
fileInputRef.current?.click()} onDragOver={onDragOver} onDrop={onDrop} @@ -634,12 +627,12 @@ export function EmailValidator() { {t("bulk.downloadTemplate")}
-
-
+
+
)} {bulkLoading && ( - +
@@ -651,31 +644,31 @@ export function EmailValidator() {
- +
)} {bulkResults.length > 0 && !bulkLoading && (
- +
{t("stats.totalProcessed")} {bulkStats.total} - - +
+
{t("stats.valid")} {bulkStats.valid} - - +
+
{t("stats.risky")} {bulkStats.risky} - - +
+
{t("stats.invalid")} {bulkStats.invalid} - +
- +

{t("results.detailedTitle")}

@@ -796,11 +789,11 @@ export function EmailValidator() {
- +
)} -
+ ); } diff --git a/apps/desktop-ui/src/components/encryption-playground/encryption-playground-layout.tsx b/apps/desktop-ui/src/components/encryption-playground/encryption-playground-layout.tsx index 4c3c220f..518bdfb1 100644 --- a/apps/desktop-ui/src/components/encryption-playground/encryption-playground-layout.tsx +++ b/apps/desktop-ui/src/components/encryption-playground/encryption-playground-layout.tsx @@ -3,7 +3,6 @@ import { useCallback, useState } from 'react'; import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard'; import { useTranslations } from 'next-intl'; -import { Card } from '@/components/ui/card'; import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; import { Button } from '@/components/ui/button'; @@ -30,9 +29,8 @@ import { import { cn } from '@/lib/utils'; import { mapEncryptError, mapDecryptError } from './error-mapping'; import { IconShieldLock } 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 { ToolPanels, IOPanel, ToolTextArea } from '@/components/tools/io-panel'; const AES_BITS: AesBits[] = [128, 192, 256]; @@ -118,285 +116,275 @@ export function EncryptionPlaygroundLayout() { void copyDecFn(decryptedOut, { silent: true }); }; - return ( -
- - - + const copyEncAction = ( + + ); + + const copyDecAction = ( + + ); - setTab(v as 'encrypt' | 'decrypt')} className="flex min-h-0 flex-1 flex-col gap-4"> - + return ( + + setTab(v as 'encrypt' | 'decrypt')} + className="flex min-h-0 flex-1 flex-col gap-4" + > + {t('tabEncrypt')} {t('tabDecrypt')} -
- - {tab === 'encrypt' ? ( - <> -
- - setMode(v as 'raw' | 'passphrase')} - className="flex flex-wrap gap-4" - > -
- - -
-
- - -
-
-
+ {tab === 'encrypt' ? ( +
+
+
+ + setMode(v as 'raw' | 'passphrase')} + className="flex flex-wrap gap-4" + > +
+ + +
+
+ + +
+
+
- {mode === 'raw' ? ( - <> -
- - -
-
- - -
-
- -