Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohaodu committed Aug 19, 2024
1 parent 2b09161 commit a04556c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 18 deletions.
4 changes: 4 additions & 0 deletions packages/web-chat-x-vue/src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const ElButton: typeof import('element-plus/es')['ElButton']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const ElNotification: typeof import('element-plus/es')['ElNotification']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
Expand Down
6 changes: 0 additions & 6 deletions packages/web-chat-x-vue/src/classes/Libp2pManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ import ChatChannel from "./ChatChannel";
import { base64ToFile, fileToBase64, getPeerIdFromUserId } from "@/utils";
import { bootstrap } from "@libp2p/bootstrap";
import { Peer } from "@libp2p/interface";
import {
ElButton,
ElMessage,
ElMessageBox,
ElNotification,
} from "element-plus";
const topics = [
`webChatX._peer-discovery._p2p._pubsub`, // It's recommended but not required to extend the global space
];
Expand Down
1 change: 0 additions & 1 deletion packages/web-chat-x-vue/src/classes/PeerManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ElMessage } from "element-plus";
import Peer, { DataConnection, MediaConnection } from "peerjs";
type PeerManagerOption = {
nearPeerId: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,10 @@
</template>

<script setup lang="ts">
import {
ElButton,
ElMessage,
ElMessageBox,
UploadUserFile,
} from "element-plus";
import useDexie from "@/hooks/useDexie";
import { cloneDeep } from "lodash-es";
import useLibp2p from "@/hooks/useLibp2p";
import { UploadUserFile } from "element-plus";
const { libp2pManager } = useLibp2p();
const { databaseManager } = useDexie();
const user = ref(
Expand Down
2 changes: 1 addition & 1 deletion packages/web-chat-x-vue/src/views/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@
<script lang="ts" setup>
import { useRoute } from "vue-router";
import { ElMain, ElMessage } from "element-plus";
import useLibp2p from "@/hooks/useLibp2p";
import EmojiComponent from "@/components/EmojiComponent.vue";
import fileIcon from '@/assets/file.svg'
import { ElMain } from "element-plus";
const {libp2pManager}=useLibp2p()
const refMain=ref() as Ref<InstanceType<typeof ElMain>>;
const route=useRoute()
Expand Down
3 changes: 0 additions & 3 deletions packages/web-chat-x-vue/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ import {
UploadProps,
UploadFile,
UploadFiles,
ElMessageBox,
ElButton,
ElMessage,
} from "element-plus";
import ChatUser from "@/classes/ChatUser";
import useLibp2p from "@/hooks/useLibp2p";
Expand Down
2 changes: 1 addition & 1 deletion packages/web-chat-x-vue/src/views/PrivateChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@
<script lang="ts" setup>
import { useRoute } from "vue-router";
import { ElMain, ElMessage, ElUpload, UploadProps, UploadUserFile } from "element-plus";
import useLibp2p from "@/hooks/useLibp2p";
import EmojiComponent from "@/components/EmojiComponent.vue";
import fileIcon from '@/assets/file.svg'
import usePeer from "@/hooks/usePeer";
import { ElMain, ElUpload, UploadProps, UploadUserFile } from "element-plus";
const {libp2pManager}=useLibp2p()
const refMain=ref() as Ref<InstanceType<typeof ElMain>>;
const route=useRoute()
Expand Down

0 comments on commit a04556c

Please sign in to comment.