-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
132 lines (119 loc) · 5.92 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- vue cdn -->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/vue@2"></script> -->
<!-- day.js cdn -->
<script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
<!-- google font -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" rel="stylesheet">
<!-- font awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.1/css/all.css" integrity="sha384-vp86vTRFVJgpjF9jiIGPEEqYqlDwgyBgEF109VFjmqGmIY/Y4HV4d3Gp2irVfcrp" crossorigin="anonymous">
<!-- my css -->
<link rel="stylesheet" href="css/style.css">
<title>Boolzap</title>
</head>
<body>
<div id="root">
<!-- LEFT SIDE -->
<div id="l-side">
<!-- nav utente -->
<div class="user-nav">
<div class="l-user-icons">
<img src="img/user-avatar.svg" alt="Avatar Utente">
<span class="user-name">Simone</span>
</div>
<div class="r-user-icons">
<i class="fas fa-circle-notch"></i>
<i class="fas fa-comment-alt"></i>
<i class="fas fa-ellipsis-v"></i>
</div>
</div>
<!-- /nav utente -->
<!-- notifiche -->
<div class="notifications">
<div class="bell-background">
<i class="fas fa-bell-slash"></i>
</div>
<div class="notifications-texts">
<div class="strong">Ricevi notifiche di nuovi messaggi</div>
<a href="#">Attiva le notifiche desktop</a>
</div>
</div>
<!-- /notifiche -->
<!-- ricerca contatti -->
<div class="chat-search">
<div class="search-icon">
<i class="fas fa-search"></i>
</div>
<input type="text" placeholder="Cerca o inizia una nuova chat" v-model="search" @keydown.enter="filteredContacts()">
</div>
<!-- /ricerca contatti -->
<!-- lista contatti -->
<div class="contact-list">
<div v-for="(contact, index) in filteredContacts" class="contact"
:class="(index == currentContact ? 'contact-active' : null)"
@click="setIndexContact(index)">
<div class="l-contact">
<img :src="filteredContacts[index].avatar" alt="Avatar Contatto">
<div class="info">
<div class="contact-name">{{contact.name}}</div>
<div v-if="contact.messages.length > 0" class="last-message">{{contact.messages.slice(-1)[0].text}}</div>
</div>
</div>
<div class="r-contact">
<div v-if="contact.messages.length > 0" class="message-time">{{contact.messages.slice(-1)[0].date}}</div>
</div>
</div>
</div>
<!-- /lista contatti -->
</div>
<!-- /LEFT SIDE -->
<!-- RIGHT SIDE -->
<div id="r-side">
<!-- nav contatto -->
<div class="contact-nav">
<div class="l-contact-icons">
<img :src="filteredContacts[currentContact].avatar" alt="Avatar Utente">
<div class="contact-info">
<div class="contact-name">{{filteredContacts[currentContact].name}}</div>
<div v-if="filteredContacts[currentContact].messages.length > 0" class="last-access">Ultimo accesso oggi alle ore {{filteredContacts[currentContact].messages.slice(-1)[0].date}}</div>
</div>
</div>
<div class="r-contact-icons">
<i class="fas fa-search"></i>
<i class="fas fa-paperclip"></i>
<i class="fas fa-ellipsis-v"></i>
</div>
</div>
<!-- /nav contatto -->
<!-- area messaggi -->
<div class="message-area">
<div v-for="(message, index) in filteredContacts[currentContact].messages" class="message" :class="(filteredContacts[currentContact].messages[index].status == 'sent') ? 'message-sent' : 'message-received'" @mouseover="setIndexMessage(index)" @mouseleave="removeIndexMessage()">
{{filteredContacts[currentContact].messages[index].text}}
<span class="message-date">{{filteredContacts[currentContact].messages[index].date}}</span>
<div class="dropdown" :class="(index == currentMessage ? 'dropdown-active' : null)">
<!-- <span @click="deleteMessage(currentContact, currentMessage)">Delete message</span> -->
<i class="fas fa-trash" @click="deleteMessage(currentContact, currentMessage)"></i>
</div>
</div>
</div>
<!-- /area messaggi -->
<!-- controlli nuovo messaggio -->
<div class="text-controls">
<i class="far fa-smile"></i>
<input type="text" placeholder="Scrivi un messaggio" v-model="messageText" @keydown.enter="newMessage(currentContact)">
<i class="fas fa-microphone"></i>
</div>
<!-- /controlli nuovo messaggio -->
</div>
<!-- /RIGHT SIDE -->
</div>
<!-- my js -->
<script src="js/script.js"></script>
</body>
</html>