Fix mismerge

This commit is contained in:
Liam 2024-06-09 16:30:21 -04:00
parent dfbe3dbc84
commit 0b0412786f
3 changed files with 9 additions and 8 deletions

View file

@ -1,18 +1,19 @@
import { assertNotNull } from './utils/assert';
import { delegate, leftClick } from './utils/events'; import { delegate, leftClick } from './utils/events';
import { clearEl, makeEl } from './utils/dom'; import { clearEl, makeEl } from './utils/dom';
function insertCaptcha(_event, target) { function insertCaptcha(_event: Event, target: HTMLInputElement) {
const { parentNode, dataset: { sitekey } } = target; const parentElement = assertNotNull(target.parentElement);
const script = makeEl('script', {src: 'https://hcaptcha.com/1/api.js', async: true, defer: true}); const script = makeEl('script', {src: 'https://hcaptcha.com/1/api.js', async: true, defer: true});
const frame = makeEl('div', {className: 'h-captcha'}); const frame = makeEl('div', {className: 'h-captcha'});
frame.dataset.sitekey = sitekey; frame.dataset.sitekey = target.dataset.sitekey;
clearEl(parentNode); clearEl(parentElement);
parentNode.insertAdjacentElement('beforeend', frame); parentElement.insertAdjacentElement('beforeend', frame);
parentNode.insertAdjacentElement('beforeend', script); parentElement.insertAdjacentElement('beforeend', script);
} }
export function bindCaptchaLinks() { export function bindCaptchaLinks() {

View file

@ -39,7 +39,7 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
cssCodeSplit: true, cssCodeSplit: true,
rollupOptions: { rollupOptions: {
input: { input: {
'js/app': './js/app.js', 'js/app': './js/app.ts',
...Object.fromEntries(themes) ...Object.fromEntries(themes)
}, },
output: { output: {

View file

@ -23,7 +23,7 @@ html lang="en"
= vite_hmr? do = vite_hmr? do
script type="module" src="http://localhost:5173/@vite/client" script type="module" src="http://localhost:5173/@vite/client"
script type="module" src="http://localhost:5173/js/app.js" script type="module" src="http://localhost:5173/js/app.ts"
- else - else
script type="text/javascript" src=~p"/js/app.js" async="async" script type="text/javascript" src=~p"/js/app.js" async="async"
= render PhilomenaWeb.LayoutView, "_opengraph.html", assigns = render PhilomenaWeb.LayoutView, "_opengraph.html", assigns