mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
fix feed bio display wrong after translation toggle (#1558)
This commit is contained in:
@@ -231,7 +231,7 @@
|
|||||||
max-height: 210px;
|
max-height: 210px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
"
|
"
|
||||||
>{{ userDialog.ref.bio || '-' }}</pre
|
>{{ bioCache.value.translated || userDialog.ref.bio || '-' }}</pre
|
||||||
>
|
>
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -1556,9 +1556,7 @@
|
|||||||
|
|
||||||
const bioCache = ref({
|
const bioCache = ref({
|
||||||
userId: null,
|
userId: null,
|
||||||
original: null,
|
translated: null
|
||||||
translated: null,
|
|
||||||
showingTranslated: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const isEditNoteAndMemoDialogVisible = ref(false);
|
const isEditNoteAndMemoDialogVisible = ref(false);
|
||||||
@@ -2421,24 +2419,11 @@
|
|||||||
|
|
||||||
if (bioCache.value.userId !== userDialog.value.id) {
|
if (bioCache.value.userId !== userDialog.value.id) {
|
||||||
bioCache.value.userId = userDialog.value.id;
|
bioCache.value.userId = userDialog.value.id;
|
||||||
bioCache.value.original = null;
|
|
||||||
bioCache.value.translated = null;
|
bioCache.value.translated = null;
|
||||||
bioCache.value.showingTranslated = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!bioCache.value.original) {
|
|
||||||
bioCache.value.original = bio;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bioCache.value.showingTranslated) {
|
|
||||||
userDialog.value.ref.bio = bioCache.value.original;
|
|
||||||
bioCache.value.showingTranslated = false;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bioCache.value.translated) {
|
if (bioCache.value.translated) {
|
||||||
userDialog.value.ref.bio = bioCache.value.translated;
|
bioCache.value.translated = null;
|
||||||
bioCache.value.showingTranslated = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2451,8 +2436,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
bioCache.value.translated = translated;
|
bioCache.value.translated = translated;
|
||||||
bioCache.value.showingTranslated = true;
|
|
||||||
userDialog.value.ref.bio = translated;
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Translation failed:', err);
|
console.error('Translation failed:', err);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user