mirror of
https://github.com/multipleof4/sune.git
synced 2026-09-18 03:25:44 +00:00
Compare commits
2 Commits
a1fd2d5a05
...
25b4b982ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25b4b982ac | ||
| 916f41606c |
@@ -646,6 +646,11 @@ function kbUpdate() {
|
||||
el.chat.style.scrollPaddingBottom = fh + overlap + 16 + "px";
|
||||
}
|
||||
function kbBind() {
|
||||
el.input.addEventListener("keydown", (e) => {
|
||||
if (e.key !== "Enter" || e.shiftKey || e.isComposing || e.keyCode === 229 || e.repeat || !matchMedia("(hover: hover) and (pointer: fine)").matches) return;
|
||||
e.preventDefault();
|
||||
el.composer.requestSubmit();
|
||||
});
|
||||
if (window.visualViewport) ["resize", "scroll"].forEach((ev) => window.visualViewport.addEventListener(ev, () => kbUpdate(), { passive: true }));
|
||||
window.$(window).on("resize orientationchange", () => setTimeout(kbUpdate, 50));
|
||||
window.$(el.input).on("focus click", () => {
|
||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -13,7 +13,7 @@
|
||||
<script defer src="//unpkg.com/alpinejs"></script>
|
||||
|
||||
|
||||
<script type="module" crossorigin src="/assets/index-Bkco5XhY.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CWYcSOgO.js"></script>
|
||||
<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>
|
||||
<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:"192ad28f176e4a0e39e71d8a18d365c0"},{url:"assets/index-DUC1RW1F.css",revision:null},{url:"assets/index-Bkco5XhY.js",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 c=e=>i(e,t),l={module:{uri:t},exports:o,require:c};s[t]=Promise.all(n.map(e=>l[e]||c(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:"f8c767b8fe6e11fa13e704d51b97ffbc"},{url:"assets/index-DUC1RW1F.css",revision:null},{url:"assets/index-CWYcSOgO.js",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});
|
||||
|
||||
@@ -11,6 +11,11 @@ export function kbUpdate() {
|
||||
}
|
||||
|
||||
export function kbBind() {
|
||||
el.input.addEventListener('keydown', e => {
|
||||
if (e.key !== 'Enter' || e.shiftKey || e.isComposing || e.keyCode === 229 || e.repeat || !matchMedia('(hover: hover) and (pointer: fine)').matches) return;
|
||||
e.preventDefault();
|
||||
el.composer.requestSubmit();
|
||||
});
|
||||
if (window.visualViewport) {
|
||||
['resize', 'scroll'].forEach(ev => window.visualViewport.addEventListener(ev, () => kbUpdate(), { passive: true }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user