|
@@ -0,0 +1,110 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="flex h-screen bg-green-100">
|
|
|
|
+ <!-- Sidebar -->
|
|
|
|
+ <aside class="w-64 bg-[#08002E] text-white flex flex-col">
|
|
|
|
+ <!-- Logo -->
|
|
|
|
+ <div class="p-6">
|
|
|
|
+ <div class="flex items-center justify-center">
|
|
|
|
+ <span class="text-18px font-bold">用户故事生成器</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- Navigation -->
|
|
|
|
+ <nav class="flex-1 px-4">
|
|
|
|
+ <div class="space-y-6">
|
|
|
|
+ <div class="text-xs text-gray-400 uppercase">CONTACTS</div>
|
|
|
|
+ <div class="space-y-2">
|
|
|
|
+ <a v-for="(contact, index) in contacts"
|
|
|
|
+ :key="index"
|
|
|
|
+ href="#"
|
|
|
|
+ class="flex items-center gap-3 px-3 py-2 text-gray-300 rounded-lg hover:bg-purple-600/20"
|
|
|
|
+ :class="{'bg-purple-200 text-black': selectedContact === contact}"
|
|
|
|
+ @click="selectContact(contact)">
|
|
|
|
+ {{ contact.name }}
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </nav>
|
|
|
|
+ </aside>
|
|
|
|
+
|
|
|
|
+ <!-- Main Content -->
|
|
|
|
+ <main class="flex-1 overflow-auto">
|
|
|
|
+ <div class="max-w-4xl mx-auto p-8">
|
|
|
|
+ <!-- Chat Area -->
|
|
|
|
+ <div class="space-y-4 mb-8">
|
|
|
|
+ <div v-for="(message, index) in messages"
|
|
|
|
+ :key="index"
|
|
|
|
+ class="flex"
|
|
|
|
+ :class="{'justify-end': message.sender === 'user'}">
|
|
|
|
+ <div class="max-w-sm px-4 py-2 rounded-lg"
|
|
|
|
+ :class="{'bg-purple-200 text-black': message.sender === 'user', 'bg-gray-200': message.sender === 'assistant'}">
|
|
|
|
+ {{ message.text }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- Chat Input -->
|
|
|
|
+ <div class="flex gap-2">
|
|
|
|
+ <input
|
|
|
|
+ type="text"
|
|
|
|
+ v-model="newMessage"
|
|
|
|
+ placeholder="Type a message..."
|
|
|
|
+ class="flex-1 p-3 border rounded-lg"
|
|
|
|
+ />
|
|
|
|
+ <button class="p-3 bg-purple-500 text-white rounded-lg hover:bg-purple-600"
|
|
|
|
+ @click="sendMessage">
|
|
|
|
+ <Send class="w-5 h-5" />
|
|
|
|
+ </button>
|
|
|
|
+ <button class="p-3 bg-purple-500 text-white rounded-full hover:bg-purple-600"
|
|
|
|
+ @click="uploadFile">
|
|
|
|
+ <Upload class="w-5 h-5" />
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </main>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup>
|
|
|
|
+import { ref } from 'vue'
|
|
|
|
+import { Send, Upload } from 'lucide-vue-next'
|
|
|
|
+
|
|
|
|
+const contacts = ref([
|
|
|
|
+ { name: 'Contact 1' },
|
|
|
|
+ { name: 'Contact 2' },
|
|
|
|
+ { name: 'Contact 3' }
|
|
|
|
+])
|
|
|
|
+
|
|
|
|
+const selectedContact = ref(null)
|
|
|
|
+const messages = ref([])
|
|
|
|
+const newMessage = ref('')
|
|
|
|
+
|
|
|
|
+const selectContact = (contact) => {
|
|
|
|
+ selectedContact.value = contact
|
|
|
|
+ // Load messages for the selected contact
|
|
|
|
+ messages.value = [
|
|
|
|
+ { sender: 'assistant', text: 'Hello! How can I assist you today?' },
|
|
|
|
+ { sender: 'user', text: 'I need help with user stories.' }
|
|
|
|
+ ]
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const sendMessage = () => {
|
|
|
|
+ if (newMessage.value.trim()) {
|
|
|
|
+ messages.value.push({ sender: 'user', text: newMessage.value })
|
|
|
|
+ newMessage.value = ''
|
|
|
|
+ // Simulate assistant response
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ messages.value.push({ sender: 'assistant', text: 'Sure, I can help with that.' })
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const uploadFile = () => {
|
|
|
|
+ // Implement file upload logic here
|
|
|
|
+ alert('File upload feature is not implemented yet.')
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+/* Additional styles can be added here if needed */
|
|
|
|
+</style>
|