|
@@ -11,7 +11,7 @@ import { useChat } from './hooks/useChat'
|
|
|
import { useCopyCode } from './hooks/useCopyCode'
|
|
import { useCopyCode } from './hooks/useCopyCode'
|
|
|
import { useUsingContext } from './hooks/useUsingContext'
|
|
import { useUsingContext } from './hooks/useUsingContext'
|
|
|
import HeaderComponent from './components/Header/index.vue'
|
|
import HeaderComponent from './components/Header/index.vue'
|
|
|
-import { HoverButton, SvgIcon, MinePannel, VipPannel, MaskPannel } from '@/components/common'
|
|
|
|
|
|
|
+import { HoverButton, SvgIcon, MinePannel, VipPannel, MaskPannel, Share } from '@/components/common'
|
|
|
import { useBasicLayout } from '@/hooks/useBasicLayout'
|
|
import { useBasicLayout } from '@/hooks/useBasicLayout'
|
|
|
import { useChatStore, useAppStore, usePromptStore, useAuthStore, useUserMemberStore } from '@/store'
|
|
import { useChatStore, useAppStore, usePromptStore, useAuthStore, useUserMemberStore } from '@/store'
|
|
|
import { fetchChatAPIProcess } from '@/api'
|
|
import { fetchChatAPIProcess } from '@/api'
|
|
@@ -20,6 +20,7 @@ import { useTheme } from '@/hooks/useTheme'
|
|
|
import { emitter } from '@/plugins'
|
|
import { emitter } from '@/plugins'
|
|
|
import maskIcon from '@/assets/png-mianju.png'
|
|
import maskIcon from '@/assets/png-mianju.png'
|
|
|
import maskDarkIcon from '@/assets/png-mianju-dark.png'
|
|
import maskDarkIcon from '@/assets/png-mianju-dark.png'
|
|
|
|
|
+import { fetchGetMask } from '@/api'
|
|
|
|
|
|
|
|
let controller = new AbortController()
|
|
let controller = new AbortController()
|
|
|
|
|
|
|
@@ -61,6 +62,17 @@ dataSources.value.forEach((item, index) => {
|
|
|
if (item.loading) updateChatSome(+uuid, index, { loading: false })
|
|
if (item.loading) updateChatSome(+uuid, index, { loading: false })
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+const iconId = ref(0)
|
|
|
|
|
+const histroyData = computed(() => chatStore.getHistoryByUuid(+uuid))
|
|
|
|
|
+const maskId = computed(() => {
|
|
|
|
|
+ return histroyData.value?.maskId
|
|
|
|
|
+})
|
|
|
|
|
+if (histroyData.value?.maskId) {
|
|
|
|
|
+ fetchGetMask(histroyData.value?.maskId).then((res: any) => {
|
|
|
|
|
+ iconId.value = res.iconId
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const userMemberStore = useUserMemberStore()
|
|
const userMemberStore = useUserMemberStore()
|
|
|
function handleSubmit() {
|
|
function handleSubmit() {
|
|
|
if (!userMemberStore.isVip()) {
|
|
if (!userMemberStore.isVip()) {
|
|
@@ -472,6 +484,9 @@ onMounted(() => {
|
|
|
showMask.value = true
|
|
showMask.value = true
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ emitter.on('changeShare', res => {
|
|
|
|
|
+ showShareModal.value = true
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
const showMask = ref(false)
|
|
const showMask = ref(false)
|
|
|
|
|
|
|
@@ -488,6 +503,8 @@ function handleAdd() {
|
|
|
showMask.value = true
|
|
showMask.value = true
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const showShareModal = ref(false)
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -522,6 +539,8 @@ function handleAdd() {
|
|
|
:inversion="item.inversion"
|
|
:inversion="item.inversion"
|
|
|
:error="item.error"
|
|
:error="item.error"
|
|
|
:loading="item.loading"
|
|
:loading="item.loading"
|
|
|
|
|
+ :iconId="iconId"
|
|
|
|
|
+ :maskId="maskId"
|
|
|
@regenerate="onRegenerate(index)"
|
|
@regenerate="onRegenerate(index)"
|
|
|
@delete="handleDelete(index)"
|
|
@delete="handleDelete(index)"
|
|
|
/>
|
|
/>
|
|
@@ -632,6 +651,8 @@ function handleAdd() {
|
|
|
<img src="@/assets/png-tanchuang-huiyuan.png" @click="goVip" class="w-[80%] max-w-sm" alt="" />
|
|
<img src="@/assets/png-tanchuang-huiyuan.png" @click="goVip" class="w-[80%] max-w-sm" alt="" />
|
|
|
</n-modal>
|
|
</n-modal>
|
|
|
</NConfigProvider>
|
|
</NConfigProvider>
|
|
|
|
|
+
|
|
|
|
|
+ <share v-model:show="showShareModal" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|