'use client'; import { useSync } from '@/lib/hooks/useSync'; import { Icons } from '@/components/ui/Icon'; import { Button } from '@/components/ui/Button'; export function SyncSettings() { const { user, isInitialized, isLoading, error, lastSynced, autoSync, toggleAutoSync, signIn, signOut, syncNow, restoreNow } = useSync(); if (!isInitialized) { return (
正在初始化同步服务...
); } return (

云端同步 (Google Drive)

{user && (
{user.email}
)}
{error && (
{error}
)} {!user ? (

登录 Google 账号以在设备间同步您的设置和历史记录。 数据将存储在您 Google Drive 的专用应用文件夹中。

) : (

自动同步

更改设置或观看视频时自动同步

{lastSynced && (

上次同步: {lastSynced.toLocaleString()}

)}
)}
); }