Update deeplXUrl placeholder and default value
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if $DataBase.translatorType === 'deeplX'}
|
{#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} />
|
<TextInput bind:value={$DataBase.deeplXOptions.url} />
|
||||||
|
|
||||||
<span class="text-textcolor mt-4">{language.deeplXToken}</span>
|
<span class="text-textcolor mt-4">{language.deeplXToken}</span>
|
||||||
|
|||||||
@@ -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('/')){
|
if(url.endsWith('/')){
|
||||||
url = url.slice(0, -1)
|
url = url.slice(0, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user