diff --git a/frontend/src/Components/DashBoard/PomodoroTimer.jsx b/frontend/src/Components/DashBoard/PomodoroTimer.jsx index a5961af..9e0461b 100644 --- a/frontend/src/Components/DashBoard/PomodoroTimer.jsx +++ b/frontend/src/Components/DashBoard/PomodoroTimer.jsx @@ -1,7 +1,8 @@ import { useContext } from "react"; -import ThemeContext from "../ui/theme-provider.jsx"; +import ThemeContext from "../ui/theme-provider.jsx"; import { useTimer } from "../../context/TimerContext.jsx"; -import Topbar from './Topbar'; +import Topbar from "./Topbar"; +import Sidebar from "./Sidebar"; // βœ… Added Sidebar // Circular Timer Component function CircularTimer({ value, max, label, size = 140, isDarkMode }) { @@ -16,7 +17,14 @@ function CircularTimer({ value, max, label, size = 140, isDarkMode }) { return (
- + - + {String(value).padStart(2, "0")} - + {label}
@@ -59,7 +84,7 @@ function CircularTimer({ value, max, label, size = 140, isDarkMode }) { const sessionLabels = { work: "Focus Time πŸ’»", shortBreak: "Short Break β˜•", - longBreak: "Long Break πŸšΆβ€β™‚οΈ" + longBreak: "Long Break πŸšΆβ€β™‚οΈ", }; export default function PomodoroTimer() { @@ -69,68 +94,176 @@ export default function PomodoroTimer() { const { timeLeft, isRunning, - sessionType, + sessionType, sessions, - startTimer, - pauseTimer, - resetTimer, + startTimer, + pauseTimer, + resetTimer, workTime, shortBreak, longBreak, updateWorkTime, updateShortBreak, updateLongBreak, - SESSIONS_BEFORE_LONG_BREAK + SESSIONS_BEFORE_LONG_BREAK, } = useTimer(); const minutes = Math.floor(timeLeft / 60); const seconds = timeLeft % 60; return ( -
- -
-

- {sessionLabels[sessionType]} -

+
+ +
+ {/* βœ… Sidebar added (same as Dashboard) */} + -
- - : - -
+ {/* Main Pomodoro Area */} +
+

+ {sessionLabels[sessionType]} +

-
- {[ - { label: "Work", value: Math.floor(workTime / 60), onChange: e => updateWorkTime(Number(e.target.value)) }, - { label: "Short Break", value: Math.floor(shortBreak / 60), onChange: e => updateShortBreak(Number(e.target.value)) }, - { label: "Long Break", value: Math.floor(longBreak / 60), onChange: e => updateLongBreak(Number(e.target.value)) } - ].map(input => ( -
- - -
- ))} -
+ {/* Circular Timer */} +
+ + + : + + +
-
- {!isRunning ? ( - - ) : ( - - )} - -
+ {/* Session Settings */} +
+ {[ + { + label: "Work", + value: Math.floor(workTime / 60), + onChange: (e) => updateWorkTime(Number(e.target.value)), + }, + { + label: "Short Break", + value: Math.floor(shortBreak / 60), + onChange: (e) => updateShortBreak(Number(e.target.value)), + }, + { + label: "Long Break", + value: Math.floor(longBreak / 60), + onChange: (e) => updateLongBreak(Number(e.target.value)), + }, + ].map((input) => ( +
+ + +
+ ))} +
-
- {[...Array(SESSIONS_BEFORE_LONG_BREAK)].map((_, i) => ( -
- ))} + {/* Control Buttons */} +
+ {!isRunning ? ( + + ) : ( + + )} + +
+ + {/* Session Dots */} +
+ {[...Array(SESSIONS_BEFORE_LONG_BREAK)].map((_, i) => ( +
+ ))} +
+ +

+ {sessionType === "work" + ? `Session ${sessions + 1} of ${SESSIONS_BEFORE_LONG_BREAK}` + : "Break Time"} +

-

- {sessionType === 'work' ? `Session ${sessions + 1} of ${SESSIONS_BEFORE_LONG_BREAK}` : "Break Time"} -

); -} \ No newline at end of file +} diff --git a/frontend/src/Components/DashBoard/Todo.jsx b/frontend/src/Components/DashBoard/Todo.jsx index 0ea261c..c8cff2d 100644 --- a/frontend/src/Components/DashBoard/Todo.jsx +++ b/frontend/src/Components/DashBoard/Todo.jsx @@ -2,6 +2,8 @@ import React, { useEffect, useMemo, useState } from "react"; import Topbar from "./Topbar"; import BackButton from "../ui/backbutton"; import { Plus, Pencil, Trash2, CheckCircle2, Circle, Filter } from "lucide-react"; +import Sidebar from "./Sidebar"; // βœ… Add this after Topbar import + // Mock-only UI for GSSOC To-Do page. Uses local state; backend wiring will follow. export default function Todo() { @@ -214,121 +216,199 @@ export default function Todo() { } return ( -
+
+ {" "} -
-
-
- -

To-Do List

-
-
- - +
+ {" "} + {/* sidebar stays left */} +
+
+
+ +

+ To-Do List +

+
+
+ + +
+
-
-
- {/* Add / Edit Modal */} - {showModal && ( -
-
-
-

{editingId ? "Edit Task" : "Add Task"}

- -
-
- setModalData({ ...modalData, title: e.target.value })} placeholder="Title" className="px-3 py-2 rounded-lg bg-[var(--background)] dark:bg-gray-900 text-[var(--card-foreground)] dark:text-gray-100 border border-[var(--input)] dark:border-gray-600" /> -