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,6 +1,4 @@
<script lang="ts">
import { run } from 'svelte/legacy';
import { get } from 'svelte/store';
import { FileAudioIcon, PlusIcon } from "lucide-svelte";
import { DataBase, setDatabase, type character, type groupChat } from "src/ts/storage/database";
@@ -15,7 +13,7 @@
let assetFileExtensions:string[] = $state([])
let assetFilePath:string[] = $state([])
run(() => {
$effect.pre(() => {
if(currentCharacter.type ==='character'){
if(currentCharacter.additionalAssets){
for(let i = 0; i < currentCharacter.additionalAssets.length; i++){