|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div ref="headerRef" class="header">
|
|
|
- <h3>我的房间({{ roomStore.list.length }})</h3>
|
|
|
+ <h3>我的房间({{ roomStore.list.length }})</h3>
|
|
|
<a-input
|
|
|
v-model:value="keyword"
|
|
|
placeholder="搜索房间"
|
|
@@ -19,7 +19,7 @@
|
|
|
>
|
|
|
<template v-if="!keyword" #undata>
|
|
|
<a-button type="primary" shape="round" size="middle" @click="editRoom()">
|
|
|
- 创建房间
|
|
|
+ 创建房间{{ t('name') }}
|
|
|
</a-button>
|
|
|
</template>
|
|
|
<a-list
|
|
@@ -67,7 +67,7 @@ import { ref, computed, createVNode } from 'vue'
|
|
|
import { message, Modal } from 'ant-design-vue'
|
|
|
import { copyText } from '@/shared'
|
|
|
import { renderModal } from '@/helper'
|
|
|
-import { app } from '@/main'
|
|
|
+import { userApp } from '@/main'
|
|
|
import { useVisible } from '@/hook'
|
|
|
import { contentRef } from '@/App.vue'
|
|
|
import EditRoom from './edit-room'
|
|
@@ -75,6 +75,7 @@ import RoomSign from './sign.vue'
|
|
|
import Share from './modal/share.vue'
|
|
|
import MiniSync from './modal/mini-sync.vue'
|
|
|
import DataList from '@/components/data-list/index.vue'
|
|
|
+import { useI18n } from '@/hook/useI18n'
|
|
|
|
|
|
import type { Room } from '@/store/modules/room'
|
|
|
import { fetchRoomDetail } from '@/api'
|
|
@@ -85,6 +86,8 @@ const addMarked = Symbol('add-room')
|
|
|
const roomStore = useRoomStore()
|
|
|
roomStore.fetchList()
|
|
|
|
|
|
+const { t } = useI18n()
|
|
|
+
|
|
|
const keyword = ref('')
|
|
|
const roomList = computed(() => [addMarked, ...roomStore.filter(keyword.value)])
|
|
|
|
|
@@ -102,6 +105,7 @@ const deleteRoom = (room: Room) => {
|
|
|
const shareRoom = async (room: Room) => {
|
|
|
// await roomStore.setRoomMiniCode(room)
|
|
|
const scenes = await fetchRoomDetail(room.id)
|
|
|
+ const { app } = userApp()
|
|
|
const m = scenes.sceneData[0].num
|
|
|
Modal.confirm({
|
|
|
content: createVNode(Share, { room, num: m }),
|