sync: overhaul sync system — device pairing, server_sequence, auto-sync, dashboards

BREAKING: replace legacy API keys with device tokens via pairing flow.
- Server: /api/client/pair, revoke, me endpoints; server_sequence + tombstones + idempotency
- Desktop client: PairDevice, GetMe, RevokeCurrent; auto-sync loop every 60s
- Config: device_token stored in separate file (0600), not config.yml
- Client DB: last_pull_seq migration for incremental pull
- Frontend (Svelte): settings modal with connect/disconnect/interval
- User dashboard (/dashboard): device list with status, revoke with password
- Admin dashboard (/admin/dashboard): devices table from /admin/api/devices
- CLI (cmd/verstak): updated for ServerSequence/GetState changes
- Fix: autoSyncLoop falls back to SQLite sync_state for server URL
- Fix: SyncSetInterval preserves server_url/device_id from SQLite
This commit is contained in:
2026-06-02 02:26:05 +08:00
parent 7fe02fc8df
commit 87c8dfcbea
15 changed files with 1002 additions and 253 deletions
+2 -2
View File
@@ -16,8 +16,8 @@
background: #13131f;
}
</style>
<script type="module" crossorigin src="/assets/main-Dk1pVsWM.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-DVpSwKcZ.css">
<script type="module" crossorigin src="/assets/main-CvznySlT.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-Bkv7FuGB.css">
</head>
<body>
<div id="app"></div>