+
+
import { computed } from 'vue'
+import { Settings } from '@lucide/vue'
import { taskCenterList, taskCenterItem } from '@constant/taskCenterList'
import { channels } from '@constant/channel'
import emitter from '@utils/emitter'
@@ -40,11 +45,14 @@ const taskList = computed(() => taskCenterList)
const handleTaskItem = (item: taskCenterItem) => {
// 一键打开各渠道
if (item.type === 'channel') {
- window.api.openChannel(channels)
+ window.api.openChannel(channels.value)
return
}
// 操作房型
emitter.emit('OPERATION_CHANNEL', item)
}
+
+// 渠道设置
+const handleChannelSetting = () => emitter.emit('ADD_CHANNEL')
diff --git a/src/pages/home/components/AddChannelDialog.vue b/src/pages/home/components/AddChannelDialog.vue
new file mode 100644
index 0000000..24efaa1
--- /dev/null
+++ b/src/pages/home/components/AddChannelDialog.vue
@@ -0,0 +1,185 @@
+
+
+
+ 添加渠道
+
+
+
+
+ 渠道名称
+
+
+
+
+
+ 渠道链接
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue
index ccd4391..03c0e6c 100644
--- a/src/pages/home/index.vue
+++ b/src/pages/home/index.vue
@@ -10,6 +10,8 @@
+
+
@@ -17,6 +19,7 @@
import { ref, onMounted, onBeforeUnmount } from 'vue'
import TaskList from '../../components/TaskList/index.vue'
import TaskOperationDialog from './components/TaskOperationDialog.vue'
+import AddChannelDialog from './components/AddChannelDialog.vue'
import ChatHistory from './ChatHistory.vue'
import ChatBox from './ChatBox.vue'
import TaskCenter from './TaskCenter.vue'
@@ -27,6 +30,7 @@ import emitter from '@src/utils/emitter'
const chatStore = useChatStore()
const providerStore = useProviderStore()
const taskOperationDialog = ref()
+const addChannelDialog = ref()
onMounted(async () => {
await providerStore.init()
@@ -49,4 +53,8 @@ const handleSelectChat = (conversationId: string) => {
emitter.on('OPERATION_CHANNEL', (item: any) => {
taskOperationDialog.value?.open(item)
})
+
+emitter.on('ADD_CHANNEL', () => {
+ addChannelDialog.value?.open()
+})