diff --git a/src/components/translationDialog.vue b/src/components/translationDialog.vue
index 7793cdd..3cd3607 100644
--- a/src/components/translationDialog.vue
+++ b/src/components/translationDialog.vue
@@ -372,6 +372,7 @@ async function onTranslate() {
try {
const arr = await translate(sentences.slice(), lang)
translations[lang] = ensureLength(arr, sentences.length)
+
} finally {
loadingLangs[lang] = false // ✅ 不管成功/失败都清理 loading
}
@@ -466,7 +467,7 @@ function onConfirm() {
const out = JSON.parse(JSON.stringify(translations))
// 追加 yolo 为原始内容(源句子数组)
out.yolo = sentences.slice()
- emit('confirm', { type: props.type, strings: out, auto: auto.value })
+ emit('confirm', { type: props.type, strings: out, autoBlo: auto.value })
}
function onClose() {
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index 9e72f94..d0b41ef 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -79,7 +79,7 @@ import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/stores/
import { ElLoading, ElMessage } from 'element-plus';
import { passToken } from '@/api/ios';
-let version = ref('2.5.0');
+let version = ref('2.7.0');
onMounted(() => {
diff --git a/src/views/VideoStream.vue b/src/views/VideoStream.vue
index 01dda5d..d0ab3aa 100644
--- a/src/views/VideoStream.vue
+++ b/src/views/VideoStream.vue
@@ -62,11 +62,11 @@
+ :index="selectedDevice" @confirm="onDialogConfirm" @cancel="stopAll(100)" />
+ storage-key-prefix="demo-translation" @confirm="onConfirm" @cancel="stopAll(100)" />
{
hostList = []
@@ -1232,7 +1236,7 @@ function runTask(key, deviceId, type) {
anchorList: [],
prologueList: getContentpriList(),
comment: comonList,
- needReply: false
+ needReply: auto.value
}
).then((res) => {
hostList = []
@@ -1250,7 +1254,7 @@ function runTask(key, deviceId, type) {
} else if (key === 'like') {
if (!deviceId) {
- await stopAll()
+ await stopAll(100)
} else {
growAccount({ udid: deviceId })
return
@@ -1264,7 +1268,7 @@ function runTask(key, deviceId, type) {
} else if (key === 'brushLive') {
if (!deviceId) {
- await stopAll()
+ await stopAll(100)
} else {
watchLiveForGrowth({ udid: deviceId })
return
@@ -1278,7 +1282,7 @@ function runTask(key, deviceId, type) {
runType.value = 'brushLive'
} else if (key === 'listen') {
if (!deviceId) {
- await stopAll()
+ await stopAll(100)
} else {
monitorMessages({ udid: deviceId })
return
@@ -1297,7 +1301,7 @@ function runTask(key, deviceId, type) {
async function stopCurrentMode() {
// 如果你希望“只停当前片段的设备”,也可以用 stopScript 针对设备循环
- await stopAll()
+ await stopAll(100)
}
/** 恢复:回到 scheduleState.index 对应片段,并让 startTime 回到“暂停前进度” */
@@ -1382,12 +1386,12 @@ function startScheduleLoop() {
const now = Date.now()
if (!lastInterruptTs) lastInterruptTs = now // 首次初始化
- const due = now - lastInterruptTs >= interruptEveryMin.value * 60_000 * 60_000
+ const due = now - lastInterruptTs >= interruptEveryMin.value * 60_000 * 60
console.log(
'due=', due,
'elapsed=', now - lastInterruptTs,
- 'threshold=', interruptEveryMin.value * 60_000 * 60_000
+ 'threshold=', interruptEveryMin.value * 60_000 * 60
)
if (due) {
interrupting = true
@@ -1398,7 +1402,7 @@ function startScheduleLoop() {
pauseSnapshot = { index: scheduleState.index, elapsedBeforePause }
// 停掉当前片段
- await stopAll()
+ await stopAll(100)
// 执行中断任务(带重试)
@@ -1621,8 +1625,9 @@ async function doTranslate(sentences, targetLang) {
}
// 接收“确定”事件返回结果
-function onConfirm({ type, strings, auto }) {
- console.log('✅ 确认返回:', type, strings, auto)
+function onConfirm({ type, strings, autoBlo }) {
+ console.log('✅ 确认返回:', type, strings, autoBlo)
+ auto.value = autoBlo
showtransDlg.value = false
runType.value = 'follow'
setContentpriList(strings)
@@ -1638,7 +1643,7 @@ function onConfirm({ type, strings, auto }) {
state: stateByInvType(item.invitationType),
})),
prologueList: strings,
- needReply: data.auto,
+ needReply: autoBlo,
// needTranslate: data.needTranslate,
}
).then((res) => {
@@ -1658,7 +1663,7 @@ function onConfirm({ type, strings, auto }) {
})),
prologueList: strings, //私信对象
comment: comonList, //评论列表
- needReply: auto, //自动回复
+ needReply: autoBlo, //自动回复
// needTranslate: data.needTranslate,
isComment: common.value //是否评论
}