Forráskód Böngészése

zbytest003-2025-02-18 09:56:43

genlitex 2 hónapja
szülő
commit
fcf87bca7b

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
dist/assets/index-Btspm7_H.css


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 4
dist/assets/index-malWbV8K.js


+ 0 - 13
dist/index.html

@@ -1,13 +0,0 @@
-<!doctype html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Prototype Design</title>
-    <script type="module" crossorigin src="/prototype/3000/assets/index-malWbV8K.js"></script>
-    <link rel="stylesheet" crossorigin href="/prototype/3000/assets/index-Btspm7_H.css">
-  </head>
-  <body>
-    <div id="app"></div>
-  </body>
-</html>

+ 79 - 0
src/assets/new-chat-style.css

@@ -0,0 +1,79 @@
+/* Chat container styles */
+.chat-container {
+  display: flex;
+  height: 100vh;
+}
+
+/* Sidebar styles */
+.sidebar {
+  width: 250px;
+  background-color: #08002E;
+  color: white;
+}
+
+/* Message area styles */
+.message-area {
+  flex-grow: 1;
+  background-color: white;
+}
+
+/* Card area styles */
+.card-area {
+  width: 300px;
+  background-color: gray;
+}
+
+.card {
+  border-radius: 10px;
+  background-color: #FBEFFF;
+  padding: 10px;
+  margin-bottom: 10px;
+}
+
+/* Message bubble styles */
+.message-bubble {
+  border-radius: 10px;
+  padding: 10px;
+  margin: 5px;
+}
+
+.sent {
+  background-color: purple;
+  color: white;
+}
+
+.received {
+  background-color: lightgray;
+}
+
+/* Footer styles */
+footer form {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10px;
+}
+
+footer form input[type="text"] {
+  flex-grow: 1;
+  border-radius: 5px;
+  padding: 10px;
+  margin-right: 10px;
+}
+
+footer form button {
+  background-color: purple;
+  color: white;
+  font-weight: bold;
+  border: none;
+  border-radius: 5px;
+  padding: 10px;
+}
+
+footer form input[type="file"] {
+  background-color: purple;
+  color: white;
+  border: none;
+  border-radius: 50%;
+  padding: 10px;
+}

+ 6 - 0
src/router/index.js

@@ -1,11 +1,17 @@
 import { createRouter, createWebHashHistory } from 'vue-router'
 import HomeView from '../views/HomeView.vue'
+import NewChatView from '../views/NewChatView.vue'
 
 const routes = [
   {
     path: '/',
     name: 'home',
     component: HomeView
+  },
+  {
+    path: '/chat',
+    name: 'chat',
+    component: NewChatView
   }
 ]
 

+ 147 - 0
src/views/NewChatView.vue

@@ -0,0 +1,147 @@
+<template>
+  <div class="chat-container">
+    <aside class="sidebar">
+      <header>
+        <h1>Contact List</h1>
+      </header>
+      <ul>
+        <li v-for="contact in contacts" :key="contact.id" @click="selectContact(contact)">
+          {{ contact.name }}
+        </li>
+      </ul>
+    </aside>
+    <section class="message-area">
+      <div v-for="message in messages" :key="message.id" :class="{'message-bubble': true, 'sent': message.sentByMe, 'received': !message.sentByMe}">
+        <p>{{ message.text }}</p>
+      </div>
+    </section>
+    <section class="card-area">
+      <div class="card" v-for="card in cards" :key="card.id">
+        {{ card.content }}
+      </div>
+    </section>
+    <footer>
+      <form @submit.prevent="sendMessage">
+        <input type="text" v-model="messageText" placeholder="Type a message...">
+        <button type="submit">Send</button>
+        <input type="file" @change="handleFileUpload">
+      </form>
+    </footer>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      contacts: [
+        { id: 1, name: 'Contact 1' },
+        { id: 2, name: 'Contact 2' }
+      ],
+      selectedContact: null,
+      messages: [],
+      messageText: '',
+      cards: [
+        { id: 1, content: 'Card 1 Content' },
+        { id: 2, content: 'Card 2 Content' }
+      ]
+    };
+  },
+  methods: {
+    selectContact(contact) {
+      this.selectedContact = contact;
+      // Fetch messages for the selected contact
+    },
+    sendMessage() {
+      if (this.messageText.trim()) {
+        this.messages.push({ id: Date.now(), text: this.messageText, sentByMe: true });
+        this.messageText = '';
+      }
+    },
+    handleFileUpload(event) {
+      const file = event.target.files[0];
+      if (file) {
+        // Handle file upload logic
+      }
+    }
+  }
+};
+</script>
+
+<style scoped>
+@import url('./assets/new-chat-style.css');
+
+.chat-container {
+  display: flex;
+  height: 100vh;
+}
+
+.sidebar {
+  width: 250px;
+  background-color: #08002E;
+  color: white;
+}
+
+.message-area {
+  flex-grow: 1;
+  background-color: white;
+}
+
+.card-area {
+  width: 300px;
+  background-color: gray;
+}
+
+.card {
+  border-radius: 10px;
+  background-color: #FBEFFF;
+  padding: 10px;
+  margin-bottom: 10px;
+}
+
+.message-bubble {
+  border-radius: 10px;
+  padding: 10px;
+  margin: 5px;
+}
+
+.sent {
+  background-color: purple;
+  color: white;
+}
+
+.received {
+  background-color: lightgray;
+}
+
+footer form {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10px;
+}
+
+footer form input[type="text"] {
+  flex-grow: 1;
+  border-radius: 5px;
+  padding: 10px;
+  margin-right: 10px;
+}
+
+footer form button {
+  background-color: purple;
+  color: white;
+  font-weight: bold;
+  border: none;
+  border-radius: 5px;
+  padding: 10px;
+}
+
+footer form input[type="file"] {
+  background-color: purple;
+  color: white;
+  border: none;
+  border-radius: 50%;
+  padding: 10px;
+}
+</style>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott