This build was committed by a bot.

This commit is contained in:
github-actions[bot]
2026-10-12 16:16:03 +00:00
parent 906333eae9
commit 6975877b20
4 changed files with 51 additions and 21 deletions
@@ -284,6 +284,7 @@ var el = window.el = Object.fromEntries([
"footer",
"attachBtn",
"attachBadge",
"attachPopover",
"fileInput",
"htmlEditor",
"extensionHtmlEditor",
@@ -1740,34 +1741,59 @@ function updateAttachBadge() {
el.attachBadge.textContent = String(n);
el.attachBadge.classList.toggle("hidden", n === 0);
}
$(el.attachBtn).on("click", () => {
if (state.attachments.length) {
state.attachments = [];
updateAttachBadge();
el.fileInput.value = "";
}
el.fileInput.click();
});
$(el.fileInput).on("change", async () => {
const files = [...el.fileInput.files || []];
if (!files.length) return;
var addAttachments = async (files) => {
for (const f of files) {
const at = await toAttach(f).catch(() => null);
if (at) state.attachments.push(at);
}
updateAttachBadge();
};
var hideAttachPopover = () => el.attachPopover.classList.add("hidden");
function showAttachPopover() {
if (!state.attachments.length || !el.attachPopover.classList.contains("hidden")) return;
haptic();
el.attachPopover.classList.remove("hidden");
positionPopover(el.attachBtn, el.attachPopover);
icons();
}
var attachHold = null, attachHeld = false;
var holdAttach = () => {
attachHeld = true;
showAttachPopover();
};
$(el.attachBtn).on("pointerdown", (e) => {
attachHeld = false;
if (e.pointerType !== "mouse") attachHold = setTimeout(holdAttach, 500);
}).on("pointerup pointercancel pointerleave", () => clearTimeout(attachHold)).on("contextmenu", (e) => {
e.preventDefault();
holdAttach();
}).on("click", () => {
if (attachHeld) return attachHeld = false;
hideAttachPopover();
el.fileInput.click();
});
$(el.attachPopover).on("click", (e) => {
if (!e.target.closest("[data-action=\"clear\"]")) return;
state.attachments = [];
updateAttachBadge();
hideAttachPopover();
});
$(document).on("click", (e) => {
if (!el.attachPopover.contains(e.target) && !el.attachBtn.contains(e.target)) hideAttachPopover();
});
$(window).on("resize", () => {
if (!el.attachPopover.classList.contains("hidden")) positionPopover(el.attachBtn, el.attachPopover);
});
$(el.fileInput).on("change", async () => {
const files = [...el.fileInput.files || []];
el.fileInput.value = "";
await addAttachments(files);
});
$(el.composer).on("paste", async (e) => {
const files = [...(e.clipboardData || e.originalEvent?.clipboardData)?.files || []];
if (!files.length) return;
e.preventDefault();
state.attachments = [];
el.fileInput.value = "";
for (const f of files) {
const at = await toAttach(f).catch(() => null);
if (at) state.attachments.push(at);
}
updateAttachBadge();
await addAttachments(files);
});
$(el.composer).on("submit", async (e) => {
e.preventDefault();
@@ -7,6 +7,7 @@ html,body{overscroll-behavior-y:contain;font-family:'Assistant',sans-serif}
.msg-avatar{font-size:16px}
.menu-card{position:fixed;z-index:60;min-width:12rem;border-radius:0.75rem;border:1px solid #e5e7eb;background:#fff;box-shadow:0 10px 20px rgba(0,0,0,.08)}
.menu-item{width:100%;text-align:left;padding:.5rem .75rem;font-size:0.875rem;display:flex;align-items:center;gap:.5rem}
#attachBtn{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
#htmlEditor,#extensionHtmlEditor,#jsonSchemaEditor{outline:none;white-space:pre!important;font-size:11px;line-height:1.5;}
:not(pre)>code{font-size:85%;padding:.2em .4em;margin:0;border-radius:6px;background-color:rgba(175,184,193,0.2)}
#threadRepoInput::placeholder{font-family:sans-serif;font-weight:500;color:#9ca3af}
+5 -2
View File
@@ -13,8 +13,8 @@
<script defer src="//unpkg.com/alpinejs"></script>
<script type="module" crossorigin src="/assets/index-C4jYdBxX.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DUC1RW1F.css">
<script type="module" crossorigin src="/assets/index-DCxWcq5K.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DDqI2rlK.css">
<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')">
<div class="flex flex-col h-dvh max-h-dvh overflow-hidden">
@@ -98,6 +98,9 @@
<button id="sunesSyncUploadBtn" class="menu-item"><i data-lucide="upload-cloud" class="h-4 w-4"></i><span>Upload to GitHub</span></button>
<button id="sunesSyncDownloadBtn" class="menu-item"><i data-lucide="download-cloud" class="h-4 w-4"></i><span>Download from GitHub</span></button>
</div>
<div id="attachPopover" class="menu-card hidden">
<button data-action="clear" class="menu-item text-red-600"><i data-lucide="x" class="h-4 w-4"></i><span>Clear all attachments</span></button>
</div>
<div id="suneModal" class="hidden fixed inset-0 z-50">
<div class="absolute inset-0 bg-black/30"></div>
<div class="absolute inset-x-0 top-12 mx-auto w-full max-w-md px-4">
Vendored
+1 -1
View File
@@ -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 d={};const o=e=>i(e,t),c={module:{uri:t},exports:d,require:o};s[t]=Promise.all(n.map(e=>c[e]||o(e))).then(e=>(r(...e),d))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"9c9e0b7dd947ef0c88f648f8885fcfbb"},{url:"assets/index-DUC1RW1F.css",revision:null},{url:"assets/index-C4jYdBxX.js",revision:null},{url:"appstore_content/✺.png",revision:"06dd8ca13016278fc47e9a226acdb7f9"},{url:"manifest.webmanifest",revision:"70d853d7dcb45ddd8488db46950b4b33"}],{}),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 d=e=>i(e,t),c={module:{uri:t},exports:o,require:d};s[t]=Promise.all(n.map(e=>c[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:"c3f11cd6433cb8fbfa5ba522a8abdaca"},{url:"assets/index-DDqI2rlK.css",revision:null},{url:"assets/index-DCxWcq5K.js",revision:null},{url:"appstore_content/✺.png",revision:"06dd8ca13016278fc47e9a226acdb7f9"},{url:"manifest.webmanifest",revision:"70d853d7dcb45ddd8488db46950b4b33"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});