feat:新增同步按钮
This commit is contained in:
20
app/page.jsx
20
app/page.jsx
@@ -3716,6 +3716,26 @@ export default function HomePage() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="user-menu-divider" />
|
||||
<button
|
||||
className="user-menu-item"
|
||||
disabled={isSyncing}
|
||||
onClick={async () => {
|
||||
setUserMenuOpen(false);
|
||||
if (user?.id) await syncUserConfig(user.id);
|
||||
}}
|
||||
title="手动同步配置到云端"
|
||||
>
|
||||
{isSyncing ? (
|
||||
<span className="loading-spinner" style={{ width: 16, height: 16, border: '2px solid var(--muted)', borderTopColor: 'var(--primary)', borderRadius: '50%', animation: 'spin 1s linear infinite', flexShrink: 0 }} />
|
||||
) : (
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{ flexShrink: 0 }}>
|
||||
<path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" stroke="var(--primary)" />
|
||||
<path d="M12 12v9" stroke="var(--accent)" />
|
||||
<path d="m16 16-4-4-4 4" stroke="var(--accent)" />
|
||||
</svg>
|
||||
)}
|
||||
<span>{isSyncing ? '同步中...' : '同步'}</span>
|
||||
</button>
|
||||
<button
|
||||
className="user-menu-item"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user