mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 04:54:32 +00:00
remove use of watch in external-services.vue
This commit is contained in:
parent
f62249635f
commit
e7db6e5569
1 changed files with 7 additions and 7 deletions
|
@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div class="_spacer" style="--MI_SPACER-w: 700px; --MI_SPACER-min: 16px; --MI_SPACER-max: 32px;">
|
<div class="_spacer" style="--MI_SPACER-w: 700px; --MI_SPACER-min: 16px; --MI_SPACER-max: 32px;">
|
||||||
<FormSuspense :p="init">
|
<FormSuspense :p="init">
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<MkInput v-model="translationTimeout" type="number" manualSave>
|
<MkInput v-model="translationTimeout" type="number" manualSave @update:modelValue="saveTranslationTimeout">
|
||||||
<template #label>{{ i18n.ts.translationTimeoutLabel }}</template>
|
<template #label>{{ i18n.ts.translationTimeoutLabel }}</template>
|
||||||
<template #caption>{{ i18n.ts.translationTimeoutCaption }}</template>
|
<template #caption>{{ i18n.ts.translationTimeoutCaption }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
|
@ -62,7 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed, watch } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
|
@ -91,13 +91,13 @@ async function init() {
|
||||||
deeplFreeInstance.value = meta.deeplFreeInstance;
|
deeplFreeInstance.value = meta.deeplFreeInstance;
|
||||||
libreTranslateURL.value = meta.libreTranslateURL;
|
libreTranslateURL.value = meta.libreTranslateURL;
|
||||||
libreTranslateKey.value = meta.libreTranslateKey;
|
libreTranslateKey.value = meta.libreTranslateKey;
|
||||||
|
}
|
||||||
|
|
||||||
watch(translationTimeout, async newValue => {
|
async function saveTranslationTimeout() {
|
||||||
await os.apiWithDialog('admin/update-meta', {
|
await os.apiWithDialog('admin/update-meta', {
|
||||||
translationTimeout: newValue,
|
translationTimeout: translationTimeout.value,
|
||||||
});
|
});
|
||||||
await os.promiseDialog(fetchInstance(true));
|
await os.promiseDialog(fetchInstance(true));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function save_deepl() {
|
function save_deepl() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue