From 3411c0bd9f8e6b6c041070defa56452e3f829aeb Mon Sep 17 00:00:00 2001 From: ghaddaditw <40211818-ghaddaditw@users.noreply.replit.com> Date: Sun, 8 Jun 2025 07:37:51 +0000 Subject: [PATCH] Add a dedicated focus mode to help users enhance concentration and productivity Implements FocusPage with Pomodoro timer, ambient sounds, and distraction blocking; adds route in App.tsx and sidebar link. Replit-Commit-Author: Agent Replit-Commit-Session-Id: c5f0c281-8dd8-4846-b452-4a07bcd21062 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/d79f2b79-df7a-44d0-b937-b161f4d6d0d7.jpg --- client/src/App.tsx | 2 ++ client/src/components/layout/Sidebar.tsx | 8 ++++- client/src/i18n/locales/en.json | 43 ++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 4ff92d4..aebbe23 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -21,6 +21,7 @@ import AIPage from "@/pages/AIPage"; import AnalyticsPage from "@/pages/AnalyticsPage"; import SystemMonitoringPage from "@/pages/SystemMonitoringPage"; import SettingsPage from "@/pages/SettingsPage"; +import FocusPage from "@/pages/FocusPage"; import NotFound from "@/pages/not-found"; function Router() { @@ -37,6 +38,7 @@ function Router() { + diff --git a/client/src/components/layout/Sidebar.tsx b/client/src/components/layout/Sidebar.tsx index 29cf674..44efcb9 100644 --- a/client/src/components/layout/Sidebar.tsx +++ b/client/src/components/layout/Sidebar.tsx @@ -18,7 +18,8 @@ import { Shield, Zap, Monitor, - UserCheck + UserCheck, + Focus } from "lucide-react"; interface SidebarProps { @@ -57,6 +58,11 @@ const getNavigation = (t: any) => [ href: "/ai", icon: Brain, }, + { + name: t('navigation.focus'), + href: "/focus", + icon: Focus, + }, ]; const getManagementNavigation = (t: any) => [ diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json index 19b0768..e7ceaad 100644 --- a/client/src/i18n/locales/en.json +++ b/client/src/i18n/locales/en.json @@ -29,6 +29,7 @@ "finances": "Finances", "professionals": "Professional Directory", "ai": "AI Assistant", + "focus": "Focus Mode", "voice": "Voice Commands", "analytics": "Analytics", "monitoring": "System Monitor", @@ -136,6 +137,48 @@ "conversationSaved": "Conversation saved", "noHistory": "No conversation history" }, + "focus": { + "title": "Focus Mode", + "description": "Minimize distractions and maximize your productivity with our advanced focus tools.", + "startSession": "Start Focus Session", + "pauseSession": "Pause Session", + "resumeSession": "Resume Session", + "stopSession": "Stop Session", + "workSession": "Work Session", + "breakSession": "Break Session", + "sessionComplete": "Work session complete!", + "breakComplete": "Break time over!", + "settings": "Focus Settings", + "workDuration": "Work Duration", + "breakDuration": "Break Duration", + "longBreakDuration": "Long Break Duration", + "sessionsBeforeLongBreak": "Sessions Before Long Break", + "enableNotifications": "Enable Notifications", + "blockDistractions": "Block Distractions", + "ambientSounds": "Ambient Sounds", + "volume": "Volume", + "sessionHistory": "Session History", + "totalSessions": "Total Sessions", + "totalTime": "Total Time", + "features": { + "timer": "Pomodoro Timer", + "timerDesc": "Work in focused intervals with built-in breaks", + "ambient": "Ambient Sounds", + "ambientDesc": "Choose from nature sounds to enhance concentration", + "blocking": "Distraction Blocking", + "blockingDesc": "Block notifications and visual distractions", + "tracking": "Session Tracking", + "trackingDesc": "Monitor your focus patterns and productivity" + }, + "sounds": { + "none": "No Sound", + "rain": "Rain", + "ocean": "Ocean Waves", + "forest": "Forest", + "cafe": "Cafe Ambience", + "whitenoise": "White Noise" + } + }, "voice": { "title": "Voice Commands", "listening": "Listening...",