Merge branch 'main' of https://github.com/kwaroran/RisuAI into gpt-sovits-tts

This commit is contained in:
Junha Heo
2024-08-24 19:04:17 +09:00
24 changed files with 251 additions and 137 deletions

View File

@@ -2,7 +2,7 @@ import localforage from "localforage"
import { isNodeServer, replaceDbResources } from "./globalApi"
import { NodeStorage } from "./nodeStorage"
import { OpfsStorage } from "./opfsStorage"
import { alertSelect, alertStore } from "../alert"
import { alertInput, alertSelect, alertStore } from "../alert"
import { get } from "svelte/store"
import { DataBase, type Database } from "./database"
import { AccountStorage } from "./accountStorage"
@@ -67,6 +67,13 @@ export class AutoStorage{
return true
}
}
const confirm = await alertInput(`to overwrite your data, type "RISUAI"`)
if(confirm !== "RISUAI"){
localStorage.setItem('dosync', 'avoid')
return false
}
let replaced:{[key:string]:string} = {}
for(const key of keys){

View File

@@ -428,6 +428,8 @@ export function setDatabase(data:Database){
negInputName: 'text',
timeout: 30
}
data.hideApiKey ??= true
data.unformatQuotes ??= false
changeLanguage(data.language)
DataBase.set(data)
@@ -710,6 +712,8 @@ export interface Database{
comfyUiUrl: string
useLegacyGUI: boolean
claudeCachingExperimental: boolean
hideApiKey: boolean
unformatQuotes: boolean
}
export interface customscript{