右侧加上文件预览窗口

This commit is contained in:
2026-10-18 19:35:47 +08:00
parent 3df7505fb1
commit 4cde1ea91e
7 changed files with 456 additions and 80 deletions
+2 -2
View File
@@ -50,8 +50,8 @@ self.addEventListener('fetch', (event) => {
// 只处理同源
if (url.origin !== self.location.origin) return;
// 跳过 API/SSE,避免缓存动态数据
if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/sse')) return;
// 跳过 API/SSE/预览/交付取件,避免缓存动态数据(预览页需实时;/f/ 同链内容会随重新 save 变化)
if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/sse') || url.pathname.startsWith('/preview') || url.pathname.startsWith('/f/')) return;
// HTML/登录页:网络优先
if (request.mode === 'navigate' || request.destination === 'document') {