|
@@ -24,7 +24,8 @@
|
|
|
import { LocaleType } from '/#/config';
|
|
|
import { useI18n } from '/@/hooks/useI18n';
|
|
|
import BaseDialog from '/@/components/chatRoom/dialog/base.vue';
|
|
|
-
|
|
|
+ import PasswordDialog from '/@/components/chatRoom/dialog/password.vue';
|
|
|
+ import { useRoom } from './hooks/useRoom';
|
|
|
const { createTourPlayer } = useTourPlayer();
|
|
|
const showDebug = ref(Number(import.meta.env.VITE_SHOW_DEBUGPANEL) === 1);
|
|
|
const { t } = useI18n();
|
|
@@ -53,6 +54,8 @@
|
|
|
const mode = computed(() => appStore.mode);
|
|
|
// const isJoined = computed(() => rtcStore.isJoined);
|
|
|
const isLoaded = computed(() => appStore.isLoaded);
|
|
|
+ const showPasswordDialog = ref(false);
|
|
|
+
|
|
|
const controls = computed(() => {
|
|
|
return metadata.value.controls;
|
|
|
});
|
|
@@ -274,6 +277,19 @@
|
|
|
// appStore.setMode(name);
|
|
|
}
|
|
|
};
|
|
|
+ const handlePasswordConfirm = async () => {
|
|
|
+ showPasswordDialog.value = false;
|
|
|
+ };
|
|
|
+ watchEffect(() => {
|
|
|
+ if (unref(isTourMode)) {
|
|
|
+ const { room } = useRoom();
|
|
|
+ console.log('room', room);
|
|
|
+ if (unref(room)?.takeLookLock === 1) {
|
|
|
+ showPasswordDialog.value = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -282,7 +298,11 @@
|
|
|
{{ t('base.debuginfo') }}:公告,当前测试最新: {{ test_version }}, 当前满员条件:
|
|
|
{{ maxNumber }}
|
|
|
</span> -->
|
|
|
- <span> {{ t('base.debuginfo') }}:公告,当前测试1.1.0-20230329-05 </span>
|
|
|
+ <span>
|
|
|
+ {{ t('base.debuginfo') }}:公告,测试1.1.0-0330-01,角色:{{ rtcStore.role }} rId:{{
|
|
|
+ rtcStore.roomId || browser.getURLParam('roomId')
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
<span class="close" @click.stop="showDebug = false">X</span>
|
|
|
</div>
|
|
|
<LoadingLogo :thumb="true" />
|
|
@@ -311,6 +331,14 @@
|
|
|
<!-- 多楼层 end -->
|
|
|
<!-- panel start-->
|
|
|
<GuidePanel v-if="isTourMode" />
|
|
|
+
|
|
|
+ <PasswordDialog
|
|
|
+ v-if="isTourMode"
|
|
|
+ :is-single="true"
|
|
|
+ :show="showPasswordDialog"
|
|
|
+ @confirm-dialog="handlePasswordConfirm"
|
|
|
+ @close-dialog="handlePasswordConfirm"
|
|
|
+ />
|
|
|
<!-- panel end -->
|
|
|
</template>
|
|
|
</div>
|