fix: 修复前端 TypeScript 编译错误

- 导出 apiClient 供 SystemUpdate 组件使用
- 删除 SystemSettings 中未使用的系统更新相关代码
- 系统更新功能已独立到 SystemUpdate 组件
This commit is contained in:
WrBug
2026-01-21 03:53:01 +08:00
parent 56a8928631
commit 0ff6832dc1
2 changed files with 3 additions and 10 deletions
-10
View File
@@ -60,14 +60,6 @@ const SystemSettings: React.FC = () => {
const [proxyCheckResult, setProxyCheckResult] = useState<ProxyCheckResponse | null>(null)
const [currentProxyConfig, setCurrentProxyConfig] = useState<ProxyConfig | null>(null)
// 第五部分:系统更新
const [updateChecking, setUpdateChecking] = useState(false)
const [updateInfo, setUpdateInfo] = useState<any>(null)
const [updateProgress, setUpdateProgress] = useState(0)
const [updateMessage, setUpdateMessage] = useState('')
const [isUpdating, setIsUpdating] = useState(false)
const [currentVersion, setCurrentVersion] = useState('')
useEffect(() => {
// 初始化多语言设置
const savedLanguage = localStorage.getItem('i18n_language') || 'auto'
@@ -78,8 +70,6 @@ const SystemSettings: React.FC = () => {
fetchNotificationConfigs()
fetchSystemConfig()
fetchProxyConfig()
fetchCurrentVersion()
fetchUpdateStatus()
}, [])
// ==================== 第一部分:多语言 ====================
+3
View File
@@ -715,5 +715,8 @@ export const apiService = {
}
}
// 导出 apiClient 供需要直接使用 axios 实例的组件使用
export { apiClient }
export default apiService