[feat] drag and drop order and folders

This commit is contained in:
kwaroran
2023-05-23 04:51:47 +09:00
parent d174aa0796
commit c42a8710e1
12 changed files with 895 additions and 340 deletions

View File

@@ -188,6 +188,29 @@ export function findCharacterbyId(id:string) {
return unknown
}
export function findCharacterIndexbyId(id:string) {
const db = get(DataBase)
let i=0;
for(const char of db.characters){
if(char.chaId === id){
return i
}
i += 1
}
return -1
}
export function getCharacterIndexObject() {
const db = get(DataBase)
let i=0;
let result:{[key:string]:number} = {}
for(const char of db.characters){
result[char.chaId] = i
i += 1
}
return result
}
export function defaultEmotion(em:[string,string][]){
if(!em){
return ''