git-sync-web 自动提交 2026-09-09 15:39:21

This commit is contained in:
tamakyi
2026-09-09 15:39:22 +08:00
parent 4232da5ced
commit 5cdffecb44
5 changed files with 46 additions and 19 deletions
+3
View File
@@ -161,6 +161,7 @@ function card(r) {
${r.cron ? `<span class="badge" title="${esc(r.cron)}">cron</span>` : ''}
${r.conflicts && r.conflicts.length ? `<span class="badge b-conflict">冲突 ${r.conflicts.length}</span>` : ''}
${r.push_conflict ? `<span class="badge b-conflict">推送冲突</span>` : ''}
${r.running && r.auto_sync === false ? `<span class="badge b-paused">手动模式</span>` : ''}
${r.running && r.last_sync && isStale(r.last_sync.time) ? '<span class="badge b-stale">久未同步</span>' : ''}
</div>
<div class="last" title="${r.last_sync ? esc(r.last_sync.time) : ''}">上次同步:${esc(last)}</div>
@@ -1024,6 +1025,7 @@ function fillForm(r) {
$('#f-retry').value = r ? r.retry_count : 3;
$('#f-retry-interval').value = r ? r.retry_interval : 5;
$('#f-autocommit').checked = r ? !!r.auto_commit : false;
$('#f-autosync').checked = r ? (r.auto_sync !== false) : true;
$('#f-cron').value = r ? (r.cron || '') : '';
$('#f-log').value = r ? (r.log_file || '') : '';
previewCron();
@@ -1050,6 +1052,7 @@ function readForm() {
conflict_strategy: $('#f-conflict').value,
push_strategy: $('#f-push').value,
auto_commit: $('#f-autocommit').checked,
auto_sync: $('#f-autosync').checked,
cron: $('#f-cron').value.trim(),
log_file: $('#f-log').value.trim(),
};