[feat] added bot setting at start config
This commit is contained in:
@@ -358,4 +358,5 @@ export const languageEnglish = {
|
||||
renameFolder: "Rename Folder",
|
||||
changeFolderColor: "Change Folder Color",
|
||||
fullWordMatching: "Full Word Matching",
|
||||
botSettingAtStart: "Bot Menu when Launch",
|
||||
}
|
||||
@@ -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>
|
||||
@@ -581,6 +581,7 @@ export interface Database{
|
||||
}[]
|
||||
assetWidth:number
|
||||
animationSpeed:number
|
||||
botSettingAtStart:false
|
||||
}
|
||||
|
||||
interface hordeConfig{
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user