diff --git a/README.md b/README.md index ee273a3f..ecb6cc4a 100644 --- a/README.md +++ b/README.md @@ -151,3 +151,4 @@ Licensed under the **MIT License** — see the [LICENSE](LICENSE) file for detai 🔝 [Back to Top](#table-of-contents) + diff --git a/assets/01_home.png b/assets/01_home.png index 8b8768e3..2685ec8e 100644 Binary files a/assets/01_home.png and b/assets/01_home.png differ diff --git a/assets/01_home_mobile.png b/assets/01_home_mobile.png index c83354a9..7ea1a952 100644 Binary files a/assets/01_home_mobile.png and b/assets/01_home_mobile.png differ diff --git a/assets/01_landing.png b/assets/01_landing.png index d8debd6a..dca4d99a 100644 Binary files a/assets/01_landing.png and b/assets/01_landing.png differ diff --git a/assets/02_home_mobile.png b/assets/02_home_mobile.png index 4f2b9ee0..4e179736 100644 Binary files a/assets/02_home_mobile.png and b/assets/02_home_mobile.png differ diff --git a/assets/02_landing.png b/assets/02_landing.png index 9c5ec0a9..cf5701dd 100644 Binary files a/assets/02_landing.png and b/assets/02_landing.png differ diff --git a/assets/03_home_mobile.png b/assets/03_home_mobile.png index 669af94b..c76abfed 100644 Binary files a/assets/03_home_mobile.png and b/assets/03_home_mobile.png differ diff --git a/assets/03_landing.png b/assets/03_landing.png index 1e8e9c0b..9a61ddac 100644 Binary files a/assets/03_landing.png and b/assets/03_landing.png differ diff --git a/assets/04_home_mobile.png b/assets/04_home_mobile.png index 7a9b42d5..861af1ff 100644 Binary files a/assets/04_home_mobile.png and b/assets/04_home_mobile.png differ diff --git a/assets/04_landing.png b/assets/04_landing.png index fa3576f3..209cc34c 100644 Binary files a/assets/04_landing.png and b/assets/04_landing.png differ diff --git a/assets/05_landing.png b/assets/05_landing.png index 03332025..2abcd16f 100644 Binary files a/assets/05_landing.png and b/assets/05_landing.png differ diff --git a/backend/utils/tw/edit_task.go b/backend/utils/tw/edit_task.go index c276111b..cf185ff8 100644 --- a/backend/utils/tw/edit_task.go +++ b/backend/utils/tw/edit_task.go @@ -30,7 +30,6 @@ func EditTaskInTaskwarrior(uuid, description, email, encryptionSecret, taskID st // Escape the double quotes in the description and format it if err := utils.ExecCommand("task", taskID, "modify", description); err != nil { - fmt.Println("task " + taskID + " modify " + description) return fmt.Errorf("failed to edit task: %v", err) } diff --git a/backend/utils/tw/modify_task.go b/backend/utils/tw/modify_task.go index fa2c3774..bbeb6786 100644 --- a/backend/utils/tw/modify_task.go +++ b/backend/utils/tw/modify_task.go @@ -9,49 +9,41 @@ import ( func ModifyTaskInTaskwarrior(uuid, description, project, priority, status, due, email, encryptionSecret, taskID string, tags []string, depends []string) error { if err := utils.ExecCommand("rm", "-rf", "/root/.task"); err != nil { - fmt.Println("1") return fmt.Errorf("error deleting Taskwarrior data: %v", err) } tempDir, err := os.MkdirTemp("", "taskwarrior-"+email) if err != nil { - fmt.Println("2") return fmt.Errorf("failed to create temporary directory: %v", err) } defer os.RemoveAll(tempDir) origin := os.Getenv("CONTAINER_ORIGIN") if err := SetTaskwarriorConfig(tempDir, encryptionSecret, origin, uuid); err != nil { - fmt.Println("4") return err } if err := SyncTaskwarrior(tempDir); err != nil { - fmt.Println("5") return err } escapedDescription := fmt.Sprintf(`description:"%s"`, strings.ReplaceAll(description, `"`, `\"`)) if err := utils.ExecCommand("task", taskID, "modify", escapedDescription); err != nil { - fmt.Println("6") return fmt.Errorf("failed to edit task: %v", err) } escapedProject := fmt.Sprintf(`project:%s`, strings.ReplaceAll(project, `"`, `\"`)) if err := utils.ExecCommand("task", taskID, "modify", escapedProject); err != nil { - fmt.Println("7") return fmt.Errorf("failed to edit task project: %v", err) } escapedPriority := fmt.Sprintf(`priority:%s`, strings.ReplaceAll(priority, `"`, `\"`)) if err := utils.ExecCommand("task", taskID, "modify", escapedPriority); err != nil { - fmt.Println("8") return fmt.Errorf("failed to edit task priority: %v", err) } escapedDue := fmt.Sprintf(`due:%s`, strings.ReplaceAll(due, `"`, `\"`)) if err := utils.ExecCommand("task", taskID, "modify", escapedDue); err != nil { - fmt.Println("8") return fmt.Errorf("failed to edit task due: %v", err) } @@ -93,7 +85,6 @@ func ModifyTaskInTaskwarrior(uuid, description, project, priority, status, due, } if err := SyncTaskwarrior(tempDir); err != nil { - fmt.Println("11") return err } diff --git a/frontend/src/components/HomeComponents/Navbar/navbar-utils.ts b/frontend/src/components/HomeComponents/Navbar/navbar-utils.ts index 9a600990..521e573a 100644 --- a/frontend/src/components/HomeComponents/Navbar/navbar-utils.ts +++ b/frontend/src/components/HomeComponents/Navbar/navbar-utils.ts @@ -92,7 +92,15 @@ export const deleteAllTasks = async (props: Props) => { draggable: true, }); - console.log(`Deleted ${taskCount} tasks for email: ${props.email}`); + toast.update(loadingToastId, { + render: `All ${taskCount} tasks for ${props.email} deleted successfully!`, + type: 'success', + autoClose: 3000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + }); } catch (error) { toast.update(loadingToastId, { render: `Error deleting tasks for ${props.email}: ${error}`, diff --git a/frontend/src/components/HomeComponents/Tasks/Tasks.tsx b/frontend/src/components/HomeComponents/Tasks/Tasks.tsx index 834b114c..bad00204 100644 --- a/frontend/src/components/HomeComponents/Tasks/Tasks.tsx +++ b/frontend/src/components/HomeComponents/Tasks/Tasks.tsx @@ -276,7 +276,6 @@ export const Tasks = ( UUID, backendURL: url.backendURL, }); - console.log(taskwarriorTasks); await db.transaction('rw', db.tasks, async () => { await db.tasks.where('email').equals(user_email).delete(); @@ -339,7 +338,6 @@ export const Tasks = ( backendURL: url.backendURL, }); - console.log('Task added successfully!'); setNewTask({ description: '', priority: '', @@ -397,7 +395,6 @@ export const Tasks = ( annotations, }); - console.log('Task edited successfully!'); setIsAddTaskOpen(false); } catch (error) { console.error('Failed to edit task:', error); @@ -820,7 +817,6 @@ export const Tasks = ( const updatedTags = editedTags.filter((tag) => tag.trim() !== ''); const tagsToRemove = removedTags.map((tag) => `${tag}`); const finalTags = [...updatedTags, ...tagsToRemove]; - console.log(finalTags); setUnsyncedTaskUuids((prev) => new Set([...prev, task.uuid])); @@ -884,7 +880,6 @@ export const Tasks = ( backendURL: url.backendURL, }); - console.log('Priority updated successfully!'); toast.success('Priority updated successfully!'); } catch (error) { console.error('Failed to update priority:', error); diff --git a/frontend/src/components/HomeComponents/Tasks/tasks-utils.ts b/frontend/src/components/HomeComponents/Tasks/tasks-utils.ts index e4f11fed..218534a6 100644 --- a/frontend/src/components/HomeComponents/Tasks/tasks-utils.ts +++ b/frontend/src/components/HomeComponents/Tasks/tasks-utils.ts @@ -38,7 +38,7 @@ export const markTaskAsCompleted = async ( }); if (response) { - console.log('Task marked as completed successfully!'); + // Task marked as completed successfully } else { console.error('Failed to mark task as completed'); } @@ -70,7 +70,6 @@ export const bulkMarkTasksAsCompleted = async ( }); if (response.ok) { - console.log('Bulk completion successful!'); toast.success( `${taskUUIDs.length} ${taskUUIDs.length === 1 ? 'task' : 'tasks'} marked as completed.` ); @@ -110,7 +109,6 @@ export const bulkMarkTasksAsDeleted = async ( }); if (response.ok) { - console.log('Bulk deletion successful!'); toast.success( `${taskUUIDs.length} ${taskUUIDs.length === 1 ? 'task' : 'tasks'} deleted.` ); @@ -147,7 +145,7 @@ export const markTaskAsDeleted = async ( }); if (response) { - console.log('Task marked as deleted successfully!'); + // Task marked as deleted successfully } else { console.error('Failed to mark task as deleted'); } diff --git a/frontend/src/components/HomePage.tsx b/frontend/src/components/HomePage.tsx index 68a2f0d7..5c62b5b4 100644 --- a/frontend/src/components/HomePage.tsx +++ b/frontend/src/components/HomePage.tsx @@ -55,9 +55,6 @@ export const HomePage: React.FC = () => { useEffect(() => { if (!userInfo || !userInfo.uuid) { - console.log( - 'User info or UUID is not available yet, skipping WebSocket setup.' - ); return; } @@ -65,16 +62,14 @@ export const HomePage: React.FC = () => { getTasks(userInfo.email, userInfo.encryption_secret, userInfo.uuid); } - console.log('Setting up WebSocket with clientID:', userInfo.uuid); const socketURL = `${url.backendURL.replace(/^http/, 'ws')}ws?clientID=${ userInfo.uuid }`; const socket = new WebSocket(socketURL); - socket.onopen = () => console.log('WebSocket connected!'); + socket.onopen = () => {}; socket.onmessage = (event) => { - // console.log("Message received:", event.data); try { const data = JSON.parse(event.data); if (data.status === 'success') { @@ -84,7 +79,6 @@ export const HomePage: React.FC = () => { } if (data.job === 'Add Task') { - console.log('Task added successfully'); toast.success('Task added successfully!', { position: 'bottom-left', autoClose: 3000, @@ -95,7 +89,6 @@ export const HomePage: React.FC = () => { progress: undefined, }); } else if (data.job === 'Edit Task') { - console.log('Task edited successfully'); toast.success('Task edited successfully!', { position: 'bottom-left', autoClose: 3000, @@ -127,7 +120,6 @@ export const HomePage: React.FC = () => { }); } } else if (data.status == 'failure') { - console.log(`Failed to ${data.job || 'perform action'}`); toast.error(`Failed to ${data.job || 'perform action'}`, { position: 'bottom-left', autoClose: 3000, @@ -143,11 +135,10 @@ export const HomePage: React.FC = () => { } }; - socket.onclose = () => console.log('WebSocket disconnected.'); + socket.onclose = () => {}; socket.onerror = (error) => console.error('WebSocket error:', error); return () => { - console.log('Cleaning up WebSocket...'); socket.close(); }; }, [userInfo]); @@ -366,3 +357,4 @@ export const HomePage: React.FC = () => { ); }; +// cleanup diff --git a/frontend/src/components/utils/TaskAutoSync.tsx b/frontend/src/components/utils/TaskAutoSync.tsx index 49455f19..a4f7524e 100644 --- a/frontend/src/components/utils/TaskAutoSync.tsx +++ b/frontend/src/components/utils/TaskAutoSync.tsx @@ -6,7 +6,6 @@ export const useTaskAutoSync = (props: AutoSyncProps) => { const { isLoading, setIsLoading, isAutoSyncEnabled, syncInterval } = props; const handleSync = useCallback(async () => { if (isLoading) { - console.log('Auto-sync: Sync already in progress, skipping.'); return; } setIsLoading(true); @@ -23,7 +22,6 @@ export const useTaskAutoSync = (props: AutoSyncProps) => { let intervalId: NodeJS.Timeout | undefined = undefined; if (isAutoSyncEnabled) { intervalId = setInterval(() => { - console.log('Auto-sync: Triggering periodic sync...'); handleSync(); }, syncInterval); }