mirror of
https://github.com/sune-org/sune.git
synced 2026-09-18 12:45:45 +00:00
This build was committed by a bot.
This commit is contained in:
@@ -2102,7 +2102,17 @@ $(el.threadSyncBtn).on("click", async () => {
|
|||||||
}
|
}
|
||||||
if (t.type !== "thread") continue;
|
if (t.type !== "thread") continue;
|
||||||
if (t.status === "modified" || t.status === "new") {
|
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", {
|
if (remoteMap[t.id] && remoteMap[t.id].name !== newName) await ghApi(`${info.apiPath}/${remoteMap[t.id].name}`, "DELETE", {
|
||||||
message: `Rename thread ${t.id}`,
|
message: `Rename thread ${t.id}`,
|
||||||
sha: remoteMap[t.id].sha,
|
sha: remoteMap[t.id].sha,
|
||||||
@@ -2111,7 +2121,7 @@ $(el.threadSyncBtn).on("click", async () => {
|
|||||||
const x = await ghApi(`${info.apiPath}/${newName}?ref=${info.branch}`);
|
const x = await ghApi(`${info.apiPath}/${newName}?ref=${info.branch}`);
|
||||||
await ghApi(`${info.apiPath}/${newName}`, "PUT", {
|
await ghApi(`${info.apiPath}/${newName}`, "PUT", {
|
||||||
message: `Sync thread ${t.id}`,
|
message: `Sync thread ${t.id}`,
|
||||||
content: utob(JSON.stringify(msgs, null, 2)),
|
content: utob(JSON.stringify(msgs || [], null, 2)),
|
||||||
branch: info.branch,
|
branch: info.branch,
|
||||||
sha: x?.sha
|
sha: x?.sha
|
||||||
});
|
});
|
||||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -13,7 +13,7 @@
|
|||||||
<script defer src="//unpkg.com/alpinejs"></script>
|
<script defer src="//unpkg.com/alpinejs"></script>
|
||||||
|
|
||||||
|
|
||||||
<script type="module" crossorigin src="/assets/index-DgFnfrFO.js"></script>
|
<script type="module" crossorigin src="/assets/index-CAlY_Fnl.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DUC1RW1F.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DUC1RW1F.css">
|
||||||
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
||||||
<body class="bg-white text-gray-900 selection:bg-black/10" x-data @click.window="if($event.target.closest('button')) haptic(); if(!document.getElementById('threadPopover').contains($event.target)&&!$event.target.closest('[data-thread-menu]')) hideThreadPopover(); if(!document.getElementById('sunePopover').contains($event.target)&&!$event.target.closest('[data-sune-menu]')) hideSunePopover(); if(!document.getElementById('userMenu').contains($event.target)&&!document.getElementById('userMenuBtn').contains($event.target)) document.getElementById('userMenu').classList.add('hidden')">
|
<body class="bg-white text-gray-900 selection:bg-black/10" x-data @click.window="if($event.target.closest('button')) haptic(); if(!document.getElementById('threadPopover').contains($event.target)&&!$event.target.closest('[data-thread-menu]')) hideThreadPopover(); if(!document.getElementById('sunePopover').contains($event.target)&&!$event.target.closest('[data-sune-menu]')) hideSunePopover(); if(!document.getElementById('userMenu').contains($event.target)&&!document.getElementById('userMenuBtn').contains($event.target)) document.getElementById('userMenu').classList.add('hidden')">
|
||||||
|
|||||||
2
dist/sw.js
vendored
2
dist/sw.js
vendored
@@ -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")))});
|
||||||
|
|||||||
Reference in New Issue
Block a user