We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a25572b commit 4c81aa8Copy full SHA for 4c81aa8
src/utils/webdav.ts
@@ -1,4 +1,4 @@
1
-// WebDAV 同步工具
+// WebDAV 同步工具
2
interface WebDAVConfig {
3
url: string
4
username: string
@@ -67,5 +67,10 @@ export async function syncFromWebDAV(): Promise<void> {
67
throw new Error('WebDAV 未配置')
68
69
const result = await webdavRequest(config, 'GET')
70
- localStorage.setItem('chatStorage', result.data || '{}')
71
-}
+ try {
+ localStorage.setItem('chatStorage', result.data || '{}')
72
+ }
73
+ catch {
74
+ throw new Error('浏览器存储限制,请使用Chrome/Edge或手动导入文件')
75
+ }}
76
+
0 commit comments