diff --git a/src/App.vue b/src/App.vue index bf2cdc9..f41da5c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,19 +1,6 @@ @@ -249,4 +147,4 @@ window.$toast = showToast; .toast-move { transition: transform 0.3s ease; } - + \ No newline at end of file diff --git a/src/components/modals/ShareModal.vue b/src/components/modals/ShareModal.vue index 9f623c5..fbcec89 100644 --- a/src/components/modals/ShareModal.vue +++ b/src/components/modals/ShareModal.vue @@ -143,15 +143,18 @@ async function handleCreateShare() { }); // 关闭当前模态框,打开结果模态框 - handleClose(); + handleClose() + + // 前端生成分享 URL + const shareUrl = `${window.location.origin}/chat-ui/share/${result.id}` // 存储分享信息并打开结果模态框 settingsStore.setShareResult({ shareId: result.id, - shareUrl: result.shareUrl, + shareUrl, password: password.value, expiresAt: result.expiresAt, - }); + }) settingsStore.openShareResultModal(); // 清空密码和退出选择模式 diff --git a/src/components/modals/ShareResultModal.vue b/src/components/modals/ShareResultModal.vue index f9d13cf..228c750 100644 --- a/src/components/modals/ShareResultModal.vue +++ b/src/components/modals/ShareResultModal.vue @@ -95,8 +95,6 @@ const shareUrl = computed(() => shareResult.value?.shareUrl || ''); const password = computed(() => shareResult.value?.password || ''); const expiresAt = computed(() => shareResult.value?.expiresAt || 0); -const linkInput = ref(null); -const passwordInput = ref(null); const linkCopied = ref(false); const passwordCopied = ref(false); diff --git a/src/components/modals/ShareViewModal.vue b/src/components/modals/ShareViewModal.vue deleted file mode 100644 index ef06d44..0000000 --- a/src/components/modals/ShareViewModal.vue +++ /dev/null @@ -1,550 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/components/sidebar/ConversationItem.vue b/src/components/sidebar/ConversationItem.vue index 716ea52..f9f2a37 100644 --- a/src/components/sidebar/ConversationItem.vue +++ b/src/components/sidebar/ConversationItem.vue @@ -117,12 +117,6 @@ function handleToggleSelect() { emit("toggleSelect", props.conversation.id); } -function handleSelect() { - if (!isEditing.value) { - emit("select", props.conversation.id); - } -} - function handleTogglePin() { emit("togglePin", props.conversation.id); } diff --git a/src/components/sidebar/ShareButton.vue b/src/components/sidebar/ShareButton.vue index 71f8c3e..0d9ab1d 100644 --- a/src/components/sidebar/ShareButton.vue +++ b/src/components/sidebar/ShareButton.vue @@ -31,7 +31,6 @@ + + \ No newline at end of file diff --git a/src/views/ShareView.vue b/src/views/ShareView.vue new file mode 100644 index 0000000..edf6c87 --- /dev/null +++ b/src/views/ShareView.vue @@ -0,0 +1,571 @@ + + + + + \ No newline at end of file