Improve beta mobile accessibility

This commit is contained in:
kwaroran
2024-09-11 09:25:49 +09:00
parent 5b6c3e0d04
commit f66ae59d70
18 changed files with 370 additions and 180 deletions

View File

@@ -412,7 +412,9 @@ function formatTavernChat(chat:string, charName:string){
return chat.replace(/<([Uu]ser)>|\{\{([Uu]ser)\}\}/g, getUserName()).replace(/((\{\{)|<)([Cc]har)(=.+)?((\}\})|>)/g, charName)
}
export function characterFormatUpdate(index:number|character){
export function characterFormatUpdate(index:number|character, arg:{
updateInteraction?:boolean,
} = {}){
let db = get(DataBase)
let cha = typeof(index) === 'number' ? db.characters[index] : index
if(cha.chats.length === 0){
@@ -504,6 +506,7 @@ export function characterFormatUpdate(index:number|character){
if(checkNullish(cha.customscript)){
cha.customscript = []
}
cha.lastInteraction = Date.now()
if(typeof(index) === 'number'){
db.characters[index] = cha
setDatabase(db)