Commit Graph

18 Commits

Author SHA1 Message Date
Tiger Ren 80ef6e881c Refactor sync process and enhance video handling for OneDrive integration
- Updated 'start-sync' IPC event to process video files, specifically filtering for .mov and .mp4 formats.
- Improved error handling and logging to provide feedback on video item retrieval and download status.
- Integrated Graph API client for folder content retrieval prior to sync initiation.
- Enhanced user feedback mechanisms for sync completion and error reporting.
- Updated renderer.js to manage UI states during the sync process.
2025-01-17 01:45:51 +08:00
Tiger Ren f09966ecd5 Update dependencies and enhance GraphApiClient for improved OneDrive integration
- Added @azure/msal-node and @microsoft/microsoft-graph-client to package.json and package-lock.json for enhanced authentication and API interactions.
- Refactored GraphApiClient to improve access token retrieval and logging, ensuring better handling of cookies and token formatting.
- Updated the method for listing folder contents to utilize the new authentication flow, enhancing the overall functionality of the OneDrive integration.
2025-01-13 21:07:28 +08:00
Tiger Ren 7c6e46c77f Refactor authentication flow in GraphApiClient to improve token retrieval and logging
- Removed inline comments for clarity and added console logs for better debugging during the OAuth process.
- Updated the handling of the redirect and navigation events to streamline access token extraction from cookies.
- Implemented a new method to manage callback handling, ensuring proper closure of the authentication window and error handling.
- Enhanced logging for navigation and redirect events to provide better visibility into the authentication process.
2025-01-09 01:19:31 +08:00
Tiger Ren 59b8367275 Integrate @electron/remote for enhanced OneDrive API interactions and update dependencies
- Initialized the @electron/remote module in main.js to enable remote functionality for the application.
- Updated package.json and package-lock.json to include @electron/remote version 2.1.2 and uuid version 11.0.4 for improved GUID generation.
- Refactored graphApi.js to utilize the remote module for creating an authentication window and managing OAuth flows with Microsoft Graph API.
- Enhanced listFolderContents method to log detailed information about folder queries and handle access tokens more effectively.
- Updated renderer.js to improve logging during folder content retrieval, providing better visibility into the sync process.
2025-01-09 01:01:31 +08:00
Tiger Ren 27e77d2998 Refactor sync process to handle video items and improve error handling
- Updated 'start-sync' IPC event to process video files from OneDrive, filtering for .mov and .mp4 formats.
- Enhanced logging to provide feedback on the number of video items found and downloaded.
- Integrated Graph API client to retrieve folder contents before initiating sync.
- Improved error handling for sync operations and added user feedback for sync completion and errors.
- Updated renderer.js to manage button states during the sync process.
2025-01-09 00:13:28 +08:00
Tiger Ren dec8e60a2f Enhance sync functionality with OneDrive integration
- Updated 'start-sync' IPC event to include cookie retrieval for authentication.
- Implemented error handling for missing access tokens and Graph API responses.
- Added dynamic import for 'node-fetch' to facilitate HTTP requests.
- Cleaned and encoded OneDrive paths for API queries.
- Logged available cookies and API error details for better debugging.
2025-01-08 01:31:06 +08:00
Tiger Ren f149804dba Update package dependencies: add node-fetch and related modules
- Added "node-fetch" version 3.3.2 to both package.json and package-lock.json for improved HTTP request handling.
- Included additional dependencies such as "data-uri-to-buffer", "fetch-blob", and "formdata-polyfill" in package-lock.json to support new features.
- Updated existing dependencies to ensure compatibility with the latest versions.
2025-01-08 01:14:13 +08:00
Tiger Ren d5a4eac1ae Add sync functionality and remove configuration HTML
- Implemented 'start-sync' IPC event in main.js to initiate synchronization with provided configuration.
- Added a 'Sync Now' button in index.html to trigger the sync process.
- Updated renderer.js to handle sync button click, ensuring both destination folder and OneDrive source path are set before proceeding.
- Removed obsolete config.html file as its functionality is now integrated into the main application flow.
- Enhanced styles for the new sync button in styles.css.
2025-01-08 01:00:49 +08:00
Tiger Ren 1c7fc924f3 Enhance video download functionality by adding cookie handling and improved request headers. Enable remote module in web preferences and log cookies for debugging. Update renderer to include session management for better cookie access. 2025-01-08 00:21:16 +08:00
Tiger Ren 159653d17e Add event listener for close button in config panel 2025-01-07 15:12:47 +08:00
Tiger Ren 28e4e07b83 successfully intercept the mp4 request (but 401 response get, as cookie not sent) 2025-01-07 14:27:40 +08:00
Tiger Ren b9248eecb9 seperate js from html 2025-01-07 13:15:55 +08:00
Tiger Ren 11b95dfde5 handle config save 2025-01-07 12:12:40 +08:00
Tiger Ren 5ae99d4b74 lazy load configuration button 2025-01-07 12:01:48 +08:00
Tiger Ren c78f56e2f5 seperate css file, and better look for config panel 2025-01-07 11:58:30 +08:00
Tiger Ren 8b519a85bc make configuration slideble 2025-01-07 11:46:02 +08:00
Tiger Ren f082223f2a add config.html page 2025-01-07 11:24:51 +08:00
Tiger Ren af7b0d88cf Initial commit 2025-01-07 01:59:14 +08:00