[feat] added bot setting at start config
This commit is contained in:
@@ -358,4 +358,5 @@ export const languageEnglish = {
|
|||||||
renameFolder: "Rename Folder",
|
renameFolder: "Rename Folder",
|
||||||
changeFolderColor: "Change Folder Color",
|
changeFolderColor: "Change Folder Color",
|
||||||
fullWordMatching: "Full Word Matching",
|
fullWordMatching: "Full Word Matching",
|
||||||
|
botSettingAtStart: "Bot Menu when Launch",
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,10 @@
|
|||||||
<Check bind:check={$DataBase.clickToEdit} name={language.clickToEdit}/>
|
<Check bind:check={$DataBase.clickToEdit} name={language.clickToEdit}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center mt-2">
|
||||||
|
<Check bind:check={$DataBase.botSettingAtStart} name={language.botSettingAtStart}/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center mt-2">
|
<div class="flex items-center mt-2">
|
||||||
<Check bind:check={$DataBase.toggleConfirmRecommendedPreset} name={language.toggleConfirmRecommendedPreset}/>
|
<Check bind:check={$DataBase.toggleConfirmRecommendedPreset} name={language.toggleConfirmRecommendedPreset}/>
|
||||||
</div>
|
</div>
|
||||||
@@ -581,6 +581,7 @@ export interface Database{
|
|||||||
}[]
|
}[]
|
||||||
assetWidth:number
|
assetWidth:number
|
||||||
animationSpeed:number
|
animationSpeed:number
|
||||||
|
botSettingAtStart:false
|
||||||
}
|
}
|
||||||
|
|
||||||
interface hordeConfig{
|
interface hordeConfig{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {open} from '@tauri-apps/api/shell'
|
|||||||
import { DataBase, loadedStore, setDatabase, type Database, updateTextTheme, defaultSdDataFunc } from "./database";
|
import { DataBase, loadedStore, setDatabase, type Database, updateTextTheme, defaultSdDataFunc } from "./database";
|
||||||
import { appWindow } from "@tauri-apps/api/window";
|
import { appWindow } from "@tauri-apps/api/window";
|
||||||
import { checkOldDomain, checkUpdate } from "../update";
|
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 { Body, ResponseType, fetch as TauriFetch } from "@tauri-apps/api/http";
|
||||||
import { loadPlugins } from "../plugins/plugins";
|
import { loadPlugins } from "../plugins/plugins";
|
||||||
import { alertConfirm, alertError } from "../alert";
|
import { alertConfirm, alertError } from "../alert";
|
||||||
@@ -418,14 +418,18 @@ export async function loadData() {
|
|||||||
try {
|
try {
|
||||||
await loadPlugins()
|
await loadPlugins()
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
await checkNewFormat()
|
|
||||||
updateTextTheme()
|
|
||||||
updateAnimationSpeed()
|
|
||||||
if(get(DataBase).account){
|
if(get(DataBase).account){
|
||||||
try {
|
try {
|
||||||
await loadRisuAccountData()
|
await loadRisuAccountData()
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
|
await checkNewFormat()
|
||||||
|
const db = get(DataBase);
|
||||||
|
updateTextTheme()
|
||||||
|
updateAnimationSpeed()
|
||||||
|
if(db.botSettingAtStart){
|
||||||
|
botMakerMode.set(true)
|
||||||
|
}
|
||||||
loadedStore.set(true)
|
loadedStore.set(true)
|
||||||
selectedCharID.set(-1)
|
selectedCharID.set(-1)
|
||||||
saveDb()
|
saveDb()
|
||||||
|
|||||||
Reference in New Issue
Block a user