Update deeplXUrl placeholder and default value

This commit is contained in:
kwaroran
2024-03-25 21:24:03 +09:00
parent 52c176234f
commit ddf36064bb
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@
{/if}
{#if $DataBase.translatorType === 'deeplX'}
<span class="text-textcolor mt-4">{language.deeplXUrl}</span>
<span class="text-textcolor mt-4" placeholder="http://localhost:1188">{language.deeplXUrl}</span>
<TextInput bind:value={$DataBase.deeplXOptions.url} />
<span class="text-textcolor mt-4">{language.deeplXToken}</span>

View File

@@ -137,7 +137,7 @@ async function translateMain(text:string, arg:{from:string, to:string, host:stri
}
}
let url = db.deeplXOptions.url;
let url = db.deeplXOptions.url ?? 'http://localhost:1188'
if(url.endsWith('/')){
url = url.slice(0, -1)