From a4a2c2c0d2bce062f7359b895bdb4e3e0d88ecea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Aug 2026 18:19:46 +0000 Subject: [PATCH] This build was committed by a bot. --- .../{index-DgFnfrFO.js => index-CAlY_Fnl.js} | 14 ++++++++++++-- dist/index.html | 2 +- dist/sw.js | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) rename dist/assets/{index-DgFnfrFO.js => index-CAlY_Fnl.js} (99%) diff --git a/dist/assets/index-DgFnfrFO.js b/dist/assets/index-CAlY_Fnl.js similarity index 99% rename from dist/assets/index-DgFnfrFO.js rename to dist/assets/index-CAlY_Fnl.js index a0b113a..0774f08 100644 --- a/dist/assets/index-DgFnfrFO.js +++ b/dist/assets/index-CAlY_Fnl.js @@ -2102,7 +2102,17 @@ $(el.threadSyncBtn).on("click", async () => { } if (t.type !== "thread") continue; if (t.status === "modified" || t.status === "new") { - const newName = serializeThreadName(t), msgs = await localforage.getItem("rem_t_" + t.id); + const newName = serializeThreadName(t); + let msgs = await localforage.getItem("rem_t_" + t.id); + if ((!msgs || !Array.isArray(msgs)) && remoteMap[t.id]) { + const text = await ghGetFileContent(info, remoteMap[t.id].name); + if (text) try { + msgs = JSON.parse(text); + await localforage.setItem("rem_t_" + t.id, msgs); + } catch (e) { + console.error(e); + } + } if (remoteMap[t.id] && remoteMap[t.id].name !== newName) await ghApi(`${info.apiPath}/${remoteMap[t.id].name}`, "DELETE", { message: `Rename thread ${t.id}`, sha: remoteMap[t.id].sha, @@ -2111,7 +2121,7 @@ $(el.threadSyncBtn).on("click", async () => { const x = await ghApi(`${info.apiPath}/${newName}?ref=${info.branch}`); await ghApi(`${info.apiPath}/${newName}`, "PUT", { message: `Sync thread ${t.id}`, - content: utob(JSON.stringify(msgs, null, 2)), + content: utob(JSON.stringify(msgs || [], null, 2)), branch: info.branch, sha: x?.sha }); diff --git a/dist/index.html b/dist/index.html index cf1a394..febd144 100644 --- a/dist/index.html +++ b/dist/index.html @@ -13,7 +13,7 @@ - + diff --git a/dist/sw.js b/dist/sw.js index 29f6f76..8a3728b 100644 --- a/dist/sw.js +++ b/dist/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const d=e=>i(e,t),l={module:{uri:t},exports:o,require:d};s[t]=Promise.all(n.map(e=>l[e]||d(e))).then(e=>(r(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"0b0cd45d08b40d617d4906d0b3b35466"},{url:"assets/index-DgFnfrFO.js",revision:null},{url:"assets/index-DUC1RW1F.css",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const l=e=>i(e,t),d={module:{uri:t},exports:o,require:l};s[t]=Promise.all(n.map(e=>d[e]||l(e))).then(e=>(r(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"a803b47dd5e78160a07e19aeed859e51"},{url:"assets/index-DUC1RW1F.css",revision:null},{url:"assets/index-CAlY_Fnl.js",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});