diff --git a/aocsync.py b/aocsync.py index 27b6e83..517feab 100755 --- a/aocsync.py +++ b/aocsync.py @@ -2564,6 +2564,14 @@ class WebServer: thread.start() return jsonify({'status': 'started', 'message': 'Refresh started for all repositories'}) + @self.app.route('/api/sync/normal', methods=['POST']) + def sync_normal(): + """Trigger normal sync loop (without force)""" + thread = threading.Thread(target=self.sync.sync_all, kwargs={'force': False}) + thread.daemon = True + thread.start() + return jsonify({'status': 'started', 'message': 'Normal sync started (will skip unchanged repositories)'}) + @self.app.route('/api/refresh/repo/', methods=['POST']) def refresh_repo(repo_name): """Trigger refresh for a specific repository""" @@ -2731,8 +2739,9 @@ class WebServer:

Refresh Controls

-

Refresh All

- +

Sync All

+ +
@@ -2780,6 +2789,20 @@ class WebServer: }, 5000); } + async function syncNormal() { + const btn = document.getElementById('btn-sync-normal'); + btn.disabled = true; + try { + const response = await fetch('/api/sync/normal', { method: 'POST' }); + const data = await response.json(); + showStatus('status-all', data.message || 'Normal sync started', false); + } catch (error) { + showStatus('status-all', 'Error: ' + error.message, true); + } finally { + btn.disabled = false; + } + } + async function refreshAll() { const btn = document.getElementById('btn-refresh-all'); btn.disabled = true;