@@ -141,9 +141,6 @@
|
||||
<view v-else class="detail-audio-lang">
|
||||
<text class="detail-audio-lang-text">{{ audioLanguageShortText }}</text>
|
||||
</view>
|
||||
<view class="detail-audio-close" @tap="handleDismissDetailAudioDock">
|
||||
<text class="detail-audio-close-text">×</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="isLocationActionVisible" class="action-bar">
|
||||
@@ -222,7 +219,6 @@ const detailEntryRequest = ref<{
|
||||
} | null>(null)
|
||||
const scrollTargetId = ref('')
|
||||
const activeContentLanguage = ref<AudioLanguage>('zh-CN')
|
||||
const detailAudioDockDismissed = ref(false)
|
||||
const detailTextByLanguage = ref<Record<AudioLanguage, string>>({
|
||||
'zh-CN': defaultDetail.body,
|
||||
'en-US': 'English narration text is not available yet.'
|
||||
@@ -303,7 +299,6 @@ const showAudioPlayer = computed(() => (
|
||||
const isDetailAudioDockVisible = computed(() => (
|
||||
exhibit.value.audio.status === 'playable'
|
||||
&& !isCurrentDetailAudio.value
|
||||
&& !detailAudioDockDismissed.value
|
||||
))
|
||||
const audioDockTitle = computed(() => (
|
||||
selectedAudioLanguage.value === 'en-US' ? 'English audio' : '中文讲解音频'
|
||||
@@ -427,7 +422,6 @@ const loadExplainDetail = async (
|
||||
|
||||
exhibit.value = toExplainDetailPageViewModel(exhibitData)
|
||||
selectedAudioLanguage.value = lang
|
||||
detailAudioDockDismissed.value = false
|
||||
|
||||
if (exhibitData.hallId) {
|
||||
resolvedHallId.value = exhibitData.hallId
|
||||
@@ -485,33 +479,13 @@ const detailTextFor = (lang: AudioLanguage) => {
|
||||
return detailTextByLanguage.value[lang] || fallbackTextForLanguage(lang)
|
||||
}
|
||||
|
||||
const handleDismissDetailAudioDock = () => {
|
||||
detailAudioDockDismissed.value = true
|
||||
}
|
||||
|
||||
const handleDetailAudioLanguageChange = (lang: AudioLanguage) => {
|
||||
if (lang === selectedAudioLanguage.value) return
|
||||
if (!supportedDetailAudioLanguages.value.includes(lang)) return
|
||||
|
||||
selectedAudioLanguage.value = lang
|
||||
detailAudioDockDismissed.value = false
|
||||
}
|
||||
|
||||
watch(
|
||||
() => globalAudioPlayer.closeVersion.value,
|
||||
() => {
|
||||
const closedSource = globalAudioPlayer.lastClosedSource.value
|
||||
if (
|
||||
closedSource?.targetType === currentAudioTarget.value.targetType
|
||||
&& closedSource.targetId === currentAudioTarget.value.targetId
|
||||
&& (!closedSource.lang || closedSource.lang === selectedAudioLanguage.value)
|
||||
) {
|
||||
// 关闭全局播放器后,详情页需要恢复本地播放入口,避免用户无法重新播放。
|
||||
detailAudioDockDismissed.value = false
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => globalAudioPlayer.currentSource.value,
|
||||
(source) => {
|
||||
@@ -1442,8 +1416,7 @@ const handleBack = () => {
|
||||
|
||||
.detail-audio-title,
|
||||
.detail-audio-subtitle,
|
||||
.detail-audio-lang-text,
|
||||
.detail-audio-close-text {
|
||||
.detail-audio-lang-text {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -1533,22 +1506,6 @@ const handleBack = () => {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.detail-audio-close {
|
||||
flex-shrink: 0;
|
||||
width: 28px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.detail-audio-close-text {
|
||||
font-size: 28px;
|
||||
line-height: 28px;
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.immersive-hero {
|
||||
padding-left: 20px;
|
||||
|
||||
Reference in New Issue
Block a user