Migrate to svelte 5
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
import Button from "../UI/GUI/Button.svelte";
|
||||
import { HypaProcesser } from "src/ts/process/memory/hypamemory";
|
||||
|
||||
let query = "";
|
||||
let model = "MiniLM";
|
||||
let customEmbeddingUrl = "";
|
||||
let data:string[] = [];
|
||||
let dataresult:[string, number][] = [];
|
||||
let running = false;
|
||||
let query = $state("");
|
||||
let model = $state("MiniLM");
|
||||
let customEmbeddingUrl = $state("");
|
||||
let data:string[] = $state([]);
|
||||
let dataresult:[string, number][] = $state([]);
|
||||
let running = $state(false);
|
||||
|
||||
const run = async () => {
|
||||
if(running) return;
|
||||
@@ -42,10 +42,10 @@
|
||||
<TextInput bind:value={query} size="lg" fullwidth />
|
||||
|
||||
<span class="text-textcolor text-lg mt-6">Data</span>
|
||||
{#each data as item}
|
||||
<TextInput bind:value={item} size="lg" fullwidth marginBottom />
|
||||
{#each data as item, i}
|
||||
<TextInput bind:value={data[i]} size="lg" fullwidth marginBottom />
|
||||
{/each}
|
||||
<Button styled="outlined" on:click={() => {
|
||||
<Button styled="outlined" onclick={() => {
|
||||
data.push("");
|
||||
data = data
|
||||
}}>+</Button>
|
||||
@@ -61,11 +61,11 @@
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
<Button className="mt-6 flex justify-center" size="lg" on:click={() => {
|
||||
<Button className="mt-6 flex justify-center" size="lg" onclick={() => {
|
||||
run()
|
||||
}}>
|
||||
{#if running}
|
||||
<div class="loadmove" />
|
||||
<div class="loadmove"></div>
|
||||
{:else}
|
||||
{language.run?.toLocaleUpperCase()}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user