|
@@ -0,0 +1,144 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="flex h-screen bg-gray-50">
|
|
|
|
+ <!-- Sidebar -->
|
|
|
|
+ <aside class="w-64 bg-[#08002E] text-white flex flex-col">
|
|
|
|
+ <!-- Logo -->
|
|
|
|
+ <div class="p-6">
|
|
|
|
+ <div class="flex items-center gap-2">
|
|
|
|
+ <div class="w-8 h-8 bg-purple-500 rounded-lg flex items-center justify-center">
|
|
|
|
+ <PlaySquare class="w-5 h-5" />
|
|
|
|
+ </div>
|
|
|
|
+ <span class="text-xl font-semibold">User Stories</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- Navigation -->
|
|
|
|
+ <nav class="flex-1 px-4">
|
|
|
|
+ <div class="mb-8">
|
|
|
|
+ <div class="flex items-center justify-between mb-4">
|
|
|
|
+ <span class="text-sm">Contacts</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="space-y-6">
|
|
|
|
+ <div class="text-xs text-gray-400 uppercase">CHAT 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"
|
|
|
|
+ @click="loadChat(contact)">
|
|
|
|
+ <div class="w-8 h-8 bg-gray-600 rounded-full"></div>
|
|
|
|
+ {{ contact.name }}
|
|
|
|
+ </a>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </nav>
|
|
|
|
+
|
|
|
|
+ <!-- User Profile -->
|
|
|
|
+ <div class="p-4 border-t border-gray-700">
|
|
|
|
+ <div class="flex items-center gap-3">
|
|
|
|
+ <div class="w-10 h-10 bg-gray-600 rounded-full"></div>
|
|
|
|
+ <div>
|
|
|
|
+ <div class="text-sm font-medium">zbytest003</div>
|
|
|
|
+ <div class="text-xs text-gray-400">platform admin</div>
|
|
|
|
+ </div>
|
|
|
|
+ <ChevronRight class="w-4 h-4 ml-auto text-gray-400" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </aside>
|
|
|
|
+
|
|
|
|
+ <!-- Main Content -->
|
|
|
|
+ <main class="flex-1 overflow-auto bg-green-100">
|
|
|
|
+ <div class="max-w-4xl mx-auto p-8">
|
|
|
|
+ <!-- Header -->
|
|
|
|
+ <div class="flex justify-between items-center mb-8">
|
|
|
|
+ <div>
|
|
|
|
+ <h1 class="text-2xl font-semibold mb-2">Chat with User Stories Generator</h1>
|
|
|
|
+ <p class="text-gray-600">Generate user stories through chat.</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- Chat Messages -->
|
|
|
|
+ <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 p-4 rounded-lg"
|
|
|
|
+ :class="[message.sender === 'user' ? 'bg-violet-200' : 'bg-gray-200']">
|
|
|
|
+ <p>{{ message.text }}</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- Chat Input -->
|
|
|
|
+ <div class="flex gap-2">
|
|
|
|
+ <div class="flex-1 relative">
|
|
|
|
+ <input
|
|
|
|
+ type="text"
|
|
|
|
+ v-model="newMessage"
|
|
|
|
+ placeholder="Type a message..."
|
|
|
|
+ class="w-full p-3 pr-12 border rounded-lg"
|
|
|
|
+ @keyup.enter="sendMessage"
|
|
|
|
+ />
|
|
|
|
+ <Upload class="absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 cursor-pointer"
|
|
|
|
+ @click="uploadFile" />
|
|
|
|
+ </div>
|
|
|
|
+ <button class="p-3 bg-purple-500 text-white rounded-lg hover:bg-purple-600"
|
|
|
|
+ @click="sendMessage">
|
|
|
|
+ <Send class="w-5 h-5" />
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </main>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup>
|
|
|
|
+import {
|
|
|
|
+ PlaySquare,
|
|
|
|
+ ChevronRight,
|
|
|
|
+ Upload,
|
|
|
|
+ Send
|
|
|
|
+} from 'lucide-vue-next'
|
|
|
|
+
|
|
|
|
+import { ref } from 'vue'
|
|
|
|
+
|
|
|
|
+const contacts = [
|
|
|
|
+ { name: 'Contact 1' },
|
|
|
|
+ { name: 'Contact 2' },
|
|
|
|
+ { name: 'Contact 3' }
|
|
|
|
+]
|
|
|
|
+
|
|
|
|
+const messages = ref([])
|
|
|
|
+const newMessage = ref('')
|
|
|
|
+const selectedContact = ref(null)
|
|
|
|
+
|
|
|
|
+const loadChat = (contact) => {
|
|
|
|
+ selectedContact.value = contact
|
|
|
|
+ messages.value = [
|
|
|
|
+ { sender: 'user', text: 'Hello!' },
|
|
|
|
+ { sender: 'assistant', text: 'Hi there! How can I assist you today?' }
|
|
|
|
+ ]
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+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: 'Got it! Generating user story...' })
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const uploadFile = () => {
|
|
|
|
+ alert('File upload feature coming soon!')
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+/* Additional styles can be added here if needed */
|
|
|
|
+</style>
|