()
| 3796 | if (closeButton) { |
| 3797 | closeButton.addEventListener('click', () => { |
| 3798 | dialog.close(); |
| 3799 | }); |
| 3800 | } |
| 3801 | |
| 3802 | } catch (error) { |
| 3803 | console.error('Error loading thumbnails:', error); |
| 3804 | throw error; |
| 3805 | } |
| 3806 | } |
| 3807 | |
| 3808 | // Update the checkTermsOfService function to return a promise |
| 3809 | async function checkTermsOfService() { |
| 3810 | try { |
| 3811 | let tosAccepted = await window.electron.getSetting('tosAcceptedDate'); |
| 3812 | const termsDialog = document.getElementById('terms-of-service-dialog'); |
| 3813 | const acceptButton = document.getElementById('accept-terms'); |
| 3814 | const declineButton = document.getElementById('decline-terms'); |
| 3815 | |
| 3816 | if (!termsDialog || !acceptButton || !declineButton) { |
| 3817 | console.error('Terms of Service dialog elements not found'); |
| 3818 | return false; // Return false if dialog elements are not found |
| 3819 | } |
no outgoing calls
no test coverage detected