feat: add option to show translation loading

This commit is contained in:
Bo26fhmC5M
2025-02-16 08:53:41 +09:00
parent 82527f2f7d
commit 1562f0549f
5 changed files with 12 additions and 1 deletions

View File

@@ -1044,4 +1044,5 @@ export const languageEnglish = {
emptySelectedFirstMessageLabel: "WARN: Selected first message is empty",
},
bulkEnabling: "Lorebook Bulk Enabling",
showTranslationLoading: "Show Translation Loading",
}

View File

@@ -966,4 +966,5 @@ export const languageKorean = {
"emptySelectedFirstMessageLabel": "경고: 선택된 첫 메시지가 비어있습니다"
},
"bulkEnabling": "한번에 로어북 활성화 버튼",
"showTranslationLoading": "번역 로딩 보이기",
}

View File

@@ -162,6 +162,10 @@
}
}
if(translateText){
if (!retranslate && DBState.db.showTranslationLoading) {
lastParsed = `<div class="flex justify-center items-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-textcolor"></div></div>`
}
let doRetranslate = retranslate
retranslate = false
if(DBState.db.translatorType === 'llm' && DBState.db.translateBeforeHTMLFormatting){

View File

@@ -58,4 +58,8 @@
<div class="flex items-center mt-2">
<Check bind:check={DBState.db.bulkEnabling} name={language.bulkEnabling}/>
</div>
</div>
<div class="flex items-center mt-2">
<Check bind:check={DBState.db.showTranslationLoading} name={language.showTranslationLoading}/>
</div>

View File

@@ -901,6 +901,7 @@ export interface Database{
inlayErrorResponse:boolean
reasoningEffort:number
bulkEnabling:boolean
showTranslationLoading: boolean
}
interface SeparateParameters{