feat: 优化顺运宝同步反馈与记录刷新 (#61)

This commit is contained in:
chengma
2026-08-09 20:41:24 +08:00
parent 59d70b2d64
commit 3fd863da64
7 changed files with 99 additions and 20 deletions
+7 -3
View File
@@ -2,7 +2,7 @@
{{template "header" .}}
<div class="toolbar">
<form class="inline sync-range-form" method="post" action="/syb/sync">
<form class="inline sync-range-form" method="post" action="/syb/sync" data-syb-sync-form>
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<input type="hidden" name="order_no" value="{{.Keyword}}">
<label for="sync-date-from">开始日期</label>
@@ -11,7 +11,10 @@
<label for="sync-date-to">结束日期</label>
<input id="sync-date-to" type="date" name="date_to"
value="{{.SyncDateTo}}" max="{{.Today}}" required>
<button type="submit" class="primary">同步</button>
<button type="submit" class="primary" data-syb-sync-submit
{{if .SyncRunning}}disabled aria-busy="true" title="同步正在进行,请耐心等待"{{end}}>
{{if .SyncRunning}}同步中…{{else}}同步{{end}}
</button>
</form>
<button type="button" data-modal-open="sync-history-modal">同步记录</button>
@@ -79,8 +82,9 @@
</div>
</div>
<div class="modal-foot sync-history-foot">
<span>第 {{.SyncHistory.Page}} / {{.SyncHistory.TotalPages}} 页</span>
<span class="grow"></span>
<button type="button" data-history-refresh-url="{{.HistoryRefreshURL}}">刷新记录</button>
<span class="sync-history-page">第 {{.SyncHistory.Page}} / {{.SyncHistory.TotalPages}} 页</span>
{{if .HistoryPagination.HasPrev}}
<a class="button-link" href="{{.HistoryPagination.FirstURL}}">首页</a>
<a class="button-link" href="{{.HistoryPagination.PrevURL}}">上一页</a>