[feat] added bot setting at start config

This commit is contained in:
kwaroran
2023-07-27 06:10:27 +09:00
parent 257093d253
commit e280d4c53f
4 changed files with 14 additions and 4 deletions

View File

@@ -358,4 +358,5 @@ export const languageEnglish = {
renameFolder: "Rename Folder",
changeFolderColor: "Change Folder Color",
fullWordMatching: "Full Word Matching",
botSettingAtStart: "Bot Menu when Launch",
}

View File

@@ -26,6 +26,10 @@
<Check bind:check={$DataBase.clickToEdit} name={language.clickToEdit}/>
</div>
<div class="flex items-center mt-2">
<Check bind:check={$DataBase.botSettingAtStart} name={language.botSettingAtStart}/>
</div>
<div class="flex items-center mt-2">
<Check bind:check={$DataBase.toggleConfirmRecommendedPreset} name={language.toggleConfirmRecommendedPreset}/>
</div>

View File

@@ -581,6 +581,7 @@ export interface Database{
}[]
assetWidth:number
animationSpeed:number
botSettingAtStart:false
}
interface hordeConfig{

View File

@@ -8,7 +8,7 @@ import {open} from '@tauri-apps/api/shell'
import { DataBase, loadedStore, setDatabase, type Database, updateTextTheme, defaultSdDataFunc } from "./database";
import { appWindow } from "@tauri-apps/api/window";
import { checkOldDomain, checkUpdate } from "../update";
import { selectedCharID } from "../stores";
import { botMakerMode, selectedCharID } from "../stores";
import { Body, ResponseType, fetch as TauriFetch } from "@tauri-apps/api/http";
import { loadPlugins } from "../plugins/plugins";
import { alertConfirm, alertError } from "../alert";
@@ -418,14 +418,18 @@ export async function loadData() {
try {
await loadPlugins()
} catch (error) {}
await checkNewFormat()
updateTextTheme()
updateAnimationSpeed()
if(get(DataBase).account){
try {
await loadRisuAccountData()
} catch (error) {}
}
await checkNewFormat()
const db = get(DataBase);
updateTextTheme()
updateAnimationSpeed()
if(db.botSettingAtStart){
botMakerMode.set(true)
}
loadedStore.set(true)
selectedCharID.set(-1)
saveDb()