Refactor svelte/legacy functions to svelte 5 syntax

This commit is contained in:
kwaroran
2024-10-23 21:03:34 +09:00
parent f078292843
commit 9add01cda2
24 changed files with 201 additions and 216 deletions

View File

@@ -1,5 +1,4 @@
<script lang="ts">
import { run } from 'svelte/legacy';
import Suggestion from './Suggestion.svelte';
import AdvancedChatEditor from './AdvancedChatEditor.svelte';
@@ -27,7 +26,7 @@
import { postChatFile } from 'src/ts/process/files/multisend';
import { getInlayImage } from 'src/ts/process/files/image';
import PlaygroundMenu from '../Playground/PlaygroundMenu.svelte';
import { ConnectionOpenStore } from 'src/ts/sync/multiuser';
import { ConnectionOpenStore } from 'src/ts/sync/multiuser';
let messageInput:string = $state('')
let messageInputTranslate:string = $state('')
@@ -293,9 +292,9 @@
}
}
run(() => {
updateInputSizeAll()
});
$effect.pre(() => {
updateInputSizeAll()
});
async function updateInputTransateMessage(reverse: boolean) {
if(isExpTranslator()){
@@ -396,7 +395,7 @@
}
}
run(() => {
$effect.pre(() => {
currentCharacter = $DataBase.characters[$selectedCharID]
});
</script>