Commit Graph

4 Commits

Author SHA1 Message Date
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