Compare commits
No commits in common. "11c714124b781a06839e0ce2c4972dee314ded86" and "39b7fb59aabff11635a8eac9072c58b80fd5f12b" have entirely different histories.
11c714124b
...
39b7fb59aa
@ -32,16 +32,20 @@
|
||||
<!-- Status Panel -->
|
||||
<div class="status-panel">
|
||||
<div class="status-item">
|
||||
<span class="status-label">Status</span>
|
||||
<span class="status-label">Sync Status:</span>
|
||||
<span id="syncStatus" class="status-value">Initializing...</span>
|
||||
</div>
|
||||
<div class="status-item">
|
||||
<span class="status-label">Files</span>
|
||||
<span class="status-label">Last Sync:</span>
|
||||
<span id="lastSync" class="status-value">Never</span>
|
||||
</div>
|
||||
<div class="status-item">
|
||||
<span class="status-label">Local Files:</span>
|
||||
<span id="filesSynced" class="status-value">0</span>
|
||||
</div>
|
||||
<div class="status-item">
|
||||
<span class="status-label">Mode</span>
|
||||
<span id="syncMode" class="status-value">Auto</span>
|
||||
<span class="status-label">Sync Mode:</span>
|
||||
<span id="syncMode" class="status-value">Auto-sync</span>
|
||||
</div>
|
||||
<div id="syncDetails" class="sync-details"></div>
|
||||
</div>
|
||||
|
||||
@ -16,6 +16,7 @@ class RekordboxSyncRenderer {
|
||||
// Status elements
|
||||
this.syncStatusElement = document.getElementById('syncStatus');
|
||||
this.filesSyncedElement = document.getElementById('filesSynced');
|
||||
this.lastSyncElement = document.getElementById('lastSync');
|
||||
this.syncDetailsElement = document.getElementById('syncDetails');
|
||||
this.syncModeElement = document.getElementById('syncMode');
|
||||
|
||||
@ -213,34 +214,43 @@ class RekordboxSyncRenderer {
|
||||
updateSyncStatus(status) {
|
||||
if (!status) return;
|
||||
|
||||
// Update main status with concise information
|
||||
// Update main status with more detailed information
|
||||
if (this.syncStatusElement) {
|
||||
if (status.isRunning) {
|
||||
let statusText = 'Running';
|
||||
|
||||
// Add current phase information (shortened)
|
||||
// Add current phase information
|
||||
if (status.currentPhase) {
|
||||
const phase = status.currentPhase === 'watching' ? 'Watching' :
|
||||
status.currentPhase === 'downloading' ? 'Downloading' :
|
||||
status.currentPhase === 'uploading' ? 'Uploading' :
|
||||
status.currentPhase === 'completed' ? 'Complete' :
|
||||
status.currentPhase;
|
||||
statusText = phase;
|
||||
statusText += ` - ${status.currentPhase}`;
|
||||
}
|
||||
|
||||
// Add file counts (cleaner display)
|
||||
if (status.stats && status.stats.totalFilesSynced > 0) {
|
||||
statusText += ` - ${status.stats.totalFilesSynced} local files`;
|
||||
}
|
||||
|
||||
this.syncStatusElement.textContent = statusText;
|
||||
this.syncStatusElement.className = 'status-value running';
|
||||
} else {
|
||||
this.syncStatusElement.textContent = 'Stopped';
|
||||
this.syncStatusElement.className = 'status-value stopped';
|
||||
if (status.completedCount > 0 && status.pendingCount === 0 && status.inProgressCount === 0) {
|
||||
this.syncStatusElement.textContent = 'Completed';
|
||||
this.syncStatusElement.className = 'status-value completed';
|
||||
} else {
|
||||
this.syncStatusElement.textContent = 'Stopped';
|
||||
this.syncStatusElement.className = 'status-value stopped';
|
||||
|
||||
|
||||
}
|
||||
if (this.startBtn) this.startBtn.disabled = false;
|
||||
if (this.stopBtn) this.stopBtn.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Also update the force sync button state
|
||||
const forceSyncBtn = document.getElementById('forceSyncBtn');
|
||||
if (forceSyncBtn) {
|
||||
forceSyncBtn.disabled = status.isRunning;
|
||||
}
|
||||
}
|
||||
|
||||
// Update files synced count with more detail
|
||||
if (this.filesSyncedElement) {
|
||||
@ -266,7 +276,15 @@ class RekordboxSyncRenderer {
|
||||
console.warn('⚠️ filesSyncedElement not found!');
|
||||
}
|
||||
|
||||
|
||||
// Update last sync time
|
||||
if (this.lastSyncElement) {
|
||||
if (status.lastSync) {
|
||||
const date = new Date(status.lastSync);
|
||||
this.lastSyncElement.textContent = date.toLocaleString();
|
||||
} else {
|
||||
this.lastSyncElement.textContent = 'Never';
|
||||
}
|
||||
}
|
||||
|
||||
// Update detailed status
|
||||
this.updateDetailedStatus(status);
|
||||
@ -484,34 +502,6 @@ class RekordboxSyncRenderer {
|
||||
showNotification(type, title, message) {
|
||||
// You could implement desktop notifications here
|
||||
}
|
||||
|
||||
/**
|
||||
* Open settings modal
|
||||
*/
|
||||
openSettings() {
|
||||
const modal = document.getElementById('settingsModal');
|
||||
if (modal) {
|
||||
modal.classList.add('show');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimize window
|
||||
*/
|
||||
minimizeWindow() {
|
||||
if (window.electronAPI && window.electronAPI.invoke) {
|
||||
window.electronAPI.invoke('window:minimize');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close window
|
||||
*/
|
||||
closeWindow() {
|
||||
if (window.electronAPI && window.electronAPI.invoke) {
|
||||
window.electronAPI.invoke('window:close');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the renderer when DOM is loaded
|
||||
|
||||
@ -272,19 +272,6 @@ class RekordboxSyncApp {
|
||||
}
|
||||
});
|
||||
|
||||
// Window controls
|
||||
ipcMain.handle('window:minimize', () => {
|
||||
if (this.mainWindow) {
|
||||
this.mainWindow.minimize();
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.handle('window:close', () => {
|
||||
if (this.mainWindow) {
|
||||
this.mainWindow.close();
|
||||
}
|
||||
});
|
||||
|
||||
// File operations
|
||||
ipcMain.handle('dialog:select-folder', async () => {
|
||||
// This would need to be implemented with electron dialog
|
||||
@ -404,7 +391,6 @@ class RekordboxSyncApp {
|
||||
lastUpdate: new Date().toISOString()
|
||||
};
|
||||
|
||||
console.log('📤 Sending to renderer:', uiState);
|
||||
safeSend('sync-status-changed', uiState);
|
||||
this.updateTrayTooltip(uiState);
|
||||
});
|
||||
|
||||
@ -11,8 +11,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
'sync:force-full',
|
||||
'sync:trigger-immediate',
|
||||
'sync:get-status',
|
||||
'window:minimize',
|
||||
'window:close',
|
||||
|
||||
'config:get',
|
||||
'config:update-s3',
|
||||
'config:update-sync',
|
||||
|
||||
@ -694,7 +694,6 @@ export class AwsS3Service extends EventEmitter {
|
||||
*/
|
||||
private emitStatusUpdate(): void {
|
||||
const status = this.getStatus();
|
||||
console.log('🔍 AWS S3 Service emitting status:', status);
|
||||
this.emit('statusChanged', status);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user