feat: add sortings

This commit is contained in:
kwaroran
2024-06-06 19:29:38 +09:00
parent c5fb83e557
commit 57e50ca9b3
6 changed files with 72 additions and 22 deletions

View File

@@ -4,7 +4,7 @@
import { CurrentChat, CurrentCharacter } from "src/ts/stores";
import Sortable from 'sortablejs/modular/sortable.core.esm.js';
import { onDestroy, onMount } from "svelte";
import { sleep } from "src/ts/util";
import { sleep, sortableOptions } from "src/ts/util";
export let globalMode = false
export let submenu = 0
@@ -44,10 +44,11 @@
sorted += 1
await sleep(1)
createStb()
}
},
...sortableOptions
})
}
// onMount(createStb)
onMount(createStb)
let opened = 0
@@ -59,9 +60,9 @@
}
const onClose = () => {
opened -= 1
// if(opened === 0){
// createStb()
// }
if(opened === 0){
createStb()
}
}
onDestroy(() => {