|
|
@@ -21,6 +21,32 @@
|
|
|
<q-toggle v-model="form.auto_change_sub_encode.enable" />
|
|
|
</q-item-section>
|
|
|
</q-item>
|
|
|
+
|
|
|
+ <q-separator spaced inset></q-separator>
|
|
|
+
|
|
|
+ <q-item tag="label" :disable="!isChsChtChangerEnable" v-ripple>
|
|
|
+ <q-item-section>
|
|
|
+ <q-item-label>简、繁字幕互转功能</q-item-label>
|
|
|
+ <q-item-label caption
|
|
|
+ >需要开启"自动转换字幕文件编码"功能,并设置为转码"UTF-8",否则无法启用和生效</q-item-label
|
|
|
+ >
|
|
|
+ <q-item v-if="form.chs_cht_changer.enable">
|
|
|
+ <q-item-section avatar top>
|
|
|
+ <q-radio
|
|
|
+ :disable="!isChsChtChangerEnable"
|
|
|
+ v-for="(v, k) in AUTO_CONVERT_LANG_NAME_MAP"
|
|
|
+ :key="k"
|
|
|
+ :label="v"
|
|
|
+ v-model="form.chs_cht_changer.des_chinese_language_type"
|
|
|
+ :val="~~k"
|
|
|
+ />
|
|
|
+ </q-item-section>
|
|
|
+ </q-item>
|
|
|
+ </q-item-section>
|
|
|
+ <q-item-section avatar top>
|
|
|
+ <q-toggle :disable="!isChsChtChangerEnable" v-model="form.chs_cht_changer.enable" />
|
|
|
+ </q-item-section>
|
|
|
+ </q-item>
|
|
|
</q-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -28,7 +54,18 @@
|
|
|
<script setup>
|
|
|
import { formModel } from 'pages/settings/useSettings';
|
|
|
import { toRefs } from '@vueuse/core';
|
|
|
-import { DESC_ENCODE_TYPE_NAME_MAP } from 'src/constants/SettingConstants';
|
|
|
+import {
|
|
|
+ AUTO_CONVERT_LANG_NAME_MAP,
|
|
|
+ DESC_ENCODE_TYPE_NAME_MAP,
|
|
|
+ DESC_ENCODE_TYPE_UTF8,
|
|
|
+} from 'src/constants/SettingConstants';
|
|
|
+import { computed } from 'vue';
|
|
|
|
|
|
const { experimental_function: form } = toRefs(formModel);
|
|
|
+
|
|
|
+const isChsChtChangerEnable = computed(
|
|
|
+ () =>
|
|
|
+ formModel.experimental_function.auto_change_sub_encode?.enable &&
|
|
|
+ formModel.experimental_function.auto_change_sub_encode?.des_encode_type === DESC_ENCODE_TYPE_UTF8
|
|
|
+);
|
|
|
</script>
|