fix: 修复前端 TypeScript 编译错误
- 导出 apiClient 供 SystemUpdate 组件使用 - 删除 SystemSettings 中未使用的系统更新相关代码 - 系统更新功能已独立到 SystemUpdate 组件
This commit is contained in:
@@ -60,14 +60,6 @@ const SystemSettings: React.FC = () => {
|
|||||||
const [proxyCheckResult, setProxyCheckResult] = useState<ProxyCheckResponse | null>(null)
|
const [proxyCheckResult, setProxyCheckResult] = useState<ProxyCheckResponse | null>(null)
|
||||||
const [currentProxyConfig, setCurrentProxyConfig] = useState<ProxyConfig | 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(() => {
|
useEffect(() => {
|
||||||
// 初始化多语言设置
|
// 初始化多语言设置
|
||||||
const savedLanguage = localStorage.getItem('i18n_language') || 'auto'
|
const savedLanguage = localStorage.getItem('i18n_language') || 'auto'
|
||||||
@@ -78,8 +70,6 @@ const SystemSettings: React.FC = () => {
|
|||||||
fetchNotificationConfigs()
|
fetchNotificationConfigs()
|
||||||
fetchSystemConfig()
|
fetchSystemConfig()
|
||||||
fetchProxyConfig()
|
fetchProxyConfig()
|
||||||
fetchCurrentVersion()
|
|
||||||
fetchUpdateStatus()
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
// ==================== 第一部分:多语言 ====================
|
// ==================== 第一部分:多语言 ====================
|
||||||
|
|||||||
@@ -715,5 +715,8 @@ export const apiService = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出 apiClient 供需要直接使用 axios 实例的组件使用
|
||||||
|
export { apiClient }
|
||||||
|
|
||||||
export default apiService
|
export default apiService
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user