diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index e4fcb2884..e32579891 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -2127,7 +2127,7 @@ "selectedCount": "{{count}} selected", "download": "Download", "delete": "Delete", - "unsupported":"Unsupported" + "unsupported": "Unsupported" }, "storage": { "temporaryNotice": "Files are stored temporarily in your browser and may be cleared automatically", @@ -2299,75 +2299,74 @@ } }, "automate": { - "title": "Automate", - "desc": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks.", - "invalidStep": "Invalid step", - "files": { - "placeholder": "Select files to process with this automation" + "title": "Automate", + "desc": "Build multi-step workflows by chaining together PDF actions. Ideal for recurring tasks.", + "invalidStep": "Invalid step", + "files": { + "placeholder": "Select files to process with this automation" + }, + "selection": { + "title": "Automation Selection", + "saved": { + "title": "Saved" }, - "selection": { - "title": "Automation Selection", - "saved": { - "title": "Saved" - }, - "createNew": { - "title": "Create New Automation" - }, - "suggested": { - "title": "Suggested" - } + "createNew": { + "title": "Create New Automation" }, - "creation": { - "createTitle": "Create Automation", - "editTitle": "Edit Automation", - "description": "Automations run tools sequentially. To get started, add tools in the order you want them to run.", - "name": { - "placeholder": "Automation name" - }, - "tools": { - "selectTool": "Select a tool...", - "selected": "Selected Tools", - "remove": "Remove tool", - "configure": "Configure tool", - "notConfigured": "! Not Configured", - "addTool": "Add Tool", - "add": "Add a tool..." - }, - "save": "Save Automation", - "unsavedChanges": { - "title": "Unsaved Changes", - "message": "You have unsaved changes. Are you sure you want to go back? All changes will be lost.", - "cancel": "Cancel", - "confirm": "Go Back" - } + "suggested": { + "title": "Suggested" + } + }, + "creation": { + "createTitle": "Create Automation", + "editTitle": "Edit Automation", + "description": "Automations run tools sequentially. To get started, add tools in the order you want them to run.", + "name": { + "placeholder": "Automation name" }, - "run": { - "title": "Run Automation" + "tools": { + "selectTool": "Select a tool...", + "selected": "Selected Tools", + "remove": "Remove tool", + "configure": "Configure tool", + "notConfigured": "! Not Configured", + "addTool": "Add Tool", + "add": "Add a tool..." }, - "sequence": { - "unnamed": "Unnamed Automation", - "steps": "{{count}} steps", - "running": "Running Automation...", - "run": "Run Automation", - "finish": "Finish" - }, - "reviewTitle": "Automation Results", - "config": { - "loading": "Loading tool configuration...", - "noSettings": "This tool does not have configurable settings.", - "title": "Configure {{toolName}}", - "description": "Configure the settings for this tool. These settings will be applied when the automation runs.", + "save": "Save Automation", + "unsavedChanges": { + "title": "Unsaved Changes", + "message": "You have unsaved changes. Are you sure you want to go back? All changes will be lost.", "cancel": "Cancel", - "save": "Save Configuration" - }, - "copyToSaved": "Copy to Saved" - } + "confirm": "Go Back" + } + }, + "run": { + "title": "Run Automation" + }, + "sequence": { + "unnamed": "Unnamed Automation", + "steps": "{{count}} steps", + "running": "Running Automation...", + "run": "Run Automation", + "finish": "Finish" + }, + "reviewTitle": "Automation Results", + "config": { + "loading": "Loading tool configuration...", + "noSettings": "This tool does not have configurable settings.", + "title": "Configure {{toolName}}", + "description": "Configure the settings for this tool. These settings will be applied when the automation runs.", + "cancel": "Cancel", + "save": "Save Configuration" + }, + "copyToSaved": "Copy to Saved" }, "automation": { "suggested": { "securePdfIngestion": "Secure PDF Ingestion", "securePdfIngestionDesc": "Comprehensive PDF processing workflow that sanitises documents, applies OCR with cleanup, converts to PDF/A format for long-term archival, and optimises file size.", - "emailPreparation": "Email Preparation", + "emailPreparation": "Email Preparation", "emailPreparationDesc": "Optimises PDFs for email distribution by compressing files, splitting large documents into 20MB chunks for email compatibility, and removing metadata for privacy.", "secureWorkflow": "Security Workflow", "secureWorkflowDesc": "Secures PDF documents by removing potentially malicious content like JavaScript and embedded files, then adds password protection to prevent unauthorised access.", diff --git a/frontend/src/hooks/useRainbowTheme.ts b/frontend/src/hooks/useRainbowTheme.ts index 449b07c61..8b272b883 100644 --- a/frontend/src/hooks/useRainbowTheme.ts +++ b/frontend/src/hooks/useRainbowTheme.ts @@ -11,6 +11,8 @@ interface RainbowThemeHook { deactivateRainbow: () => void; } +const allowRainbowMode = false; // Override to allow/disallow fun + export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): RainbowThemeHook { // Get theme from localStorage or use initial const [themeMode, setThemeMode] = useState(() => { @@ -35,11 +37,11 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb // Save theme to localStorage whenever it changes useEffect(() => { localStorage.setItem('stirling-theme', themeMode); - + // Apply rainbow class to body if in rainbow mode if (themeMode === 'rainbow') { document.body.classList.add('rainbow-mode-active'); - + // Show easter egg notification showRainbowNotification(); } else { @@ -77,7 +79,7 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb pointer-events: none; transition: opacity 0.3s ease; `; - + document.body.appendChild(notification); // Auto-remove notification after 3 seconds @@ -121,7 +123,7 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb pointer-events: none; transition: opacity 0.3s ease; `; - + document.body.appendChild(notification); // Auto-remove notification after 2 seconds @@ -144,7 +146,7 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb } const currentTime = Date.now(); - + // Simple exit from rainbow mode with single click (after cooldown period) if (themeMode === 'rainbow') { setThemeMode('light'); @@ -152,7 +154,7 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb showExitNotification(); return; } - + // Reset counter if too much time has passed (2.5 seconds) if (currentTime - lastToggleTime.current > 2500) { toggleCount.current = 1; @@ -162,18 +164,18 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb lastToggleTime.current = currentTime; // Easter egg: Activate rainbow mode after 10 rapid toggles - if (toggleCount.current >= 10) { + if (allowRainbowMode && toggleCount.current >= 10) { setThemeMode('rainbow'); console.log('🌈 RAINBOW MODE ACTIVATED! 🌈 You found the secret easter egg!'); console.log('🌈 Button will be disabled for 3 seconds, then click once to exit!'); - + // Disable toggle for 3 seconds setIsToggleDisabled(true); setTimeout(() => { setIsToggleDisabled(false); console.log('🌈 Theme toggle re-enabled! Click once to exit rainbow mode.'); }, 3000); - + // Reset counter toggleCount.current = 0; return; @@ -203,4 +205,4 @@ export function useRainbowTheme(initialTheme: 'light' | 'dark' = 'light'): Rainb activateRainbow, deactivateRainbow, }; -} \ No newline at end of file +}