code cleanup

This commit is contained in:
2025-07-30 15:35:19 +02:00
parent 631a527a5d
commit fccec9865a
27 changed files with 442 additions and 428 deletions

View File

@@ -1,18 +1,19 @@
<script>
import { onMount } from 'svelte';
import {t} from '../../translations.svelte.js';
let key = "";
import { t } from '../../translations.svelte.js';
let fulltext = false;
let html = "";
let html = "";
let key = "";
async function doSearch(ev){
if (ev) ev.preventDefault();
const url = `${location.protocol}//${location.host.replace('5173','8080')}/legacy/search`;
const url = `${location.protocol}//${location.host.replace('5173','8080')}/legacy/search`;
const resp = await fetch(url,{
credentials:'include',
method : 'POST',
body: JSON.stringify({key:key,fulltext:fulltext?'on':'off'})
credentials : 'include',
method : 'POST',
body : JSON.stringify({key:key,fulltext:fulltext?'on':'off'})
});
if (resp.ok){
html = await resp.text();
@@ -22,7 +23,7 @@
onMount(() => {
let params = new URLSearchParams(location.search);
key = params.get('key');
key = params.get('key');
if (key) doSearch();
});