-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchat.html
205 lines (193 loc) · 10.4 KB
/
chat.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chat - Office Kothon</title>
<link rel="icon" href="https://img.icons8.com/cotton/2x/communication--v1.png" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://unpkg.com/microtip/microtip.css" />
<link rel="stylesheet" href="./toaster/toastr.min.css" />
<link rel="stylesheet" href="./clndr/mini-event-calendar.css">
<link rel="stylesheet" href="./css/dashboard.css" />
<link rel="stylesheet" href="./css/chat.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="./js/theme.js"></script>
</head>
<body>
<div class="loader" style="
position: fixed;
z-index: 99;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
background: #101011;
justify-content: center;
align-items: center;
">
<img src="https://i.giphy.com/media/fYqaFLAWq7v2oRy4vh/giphy.webp" alt="loader" width="180px" height="180px" />
</div>
<div class="dashboard-main row m-0 p-0" style="height: -webkit-fill-available">
<div class="dashboard-container row col-md-9 mr-2" style="height: inherit;">
<!-- leftbar container -->
<div class="leftbar py-5">
<a href="./index.html" class="text-center"><img src="https://img.icons8.com/cotton/2x/communication--v1.png"
alt="" height="51px"></a>
<div class="leftbar-icons">
<a href="./dashboard.html" aria-label="Home" data-microtip-position="right" role="tooltip"><i
class="fa fa-home m-0"></i></a>
<a href="#0" aria-label="Chat" data-microtip-position="right" role="tooltip"><i class="fa fa-comment"></i></a>
<!-- <a href="#0" aria-label="Group chat" data-microtip-position="right" role="tooltip"><i
class="fa fa-group"></i></a> -->
<a href="./addTask.html" aria-label="Task" data-microtip-position="right" role="tooltip"><i
class="fa fa-edit"></i></a>
<a href="./settings.html" aria-label="Settings" data-microtip-position="right" role="tooltip"><i
class="fa fa-cog"></i></a>
</div>
<a href="#0" id="signout" aria-label="Sign out" data-microtip-position="top-right" role="tooltip"><i
class="fa fa-sign-out text-secondary"></i></a>
</div>
<div class="content col-md-10 my-4" id="frame">
<div class="contact-profile bg-info text-light shadow-lg">
<img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="">
<p>loading..</p>
<div class="social-media">
<i class="fa fa-trash mt-1 pt-3 pr-3" aria-hidden="true"></i>
</div>
</div>
<div class="messages bg-dark shadow">
<ul>
</ul>
</div>
<div class="message-input">
<div class="wrap">
<input type="text" id="sendInput" class="text-light " placeholder="Write your message..." />
<div style="position: absolute;right: 2vw;top: 0.1351vh;">
<input type="file" id="iconUpload" aria-hidden="true" hidden multiple />
<i class="fa fa-paperclip p-0 attachment text-light"></i>
<i class="fa fa-smile-o text-light attachment p-0 mr-4" id="emoji-trigger" aria-hidden="true"></i>
<button class="submit bg-info" id="submitMessageBtn" style="border-radius: 90em;"><i
class="fa fa-paper-plane" aria-hidden="true"></i></button>
</div>
</div>
</div>
</div>
<div class="welcome-message col-md-10 py-5 mt-4 mb-2 m-auto" id="welcome">
<div class="svg-div row">
<div class="col-md-6 m-auto">
<div class="col-md-8 m-auto">
<img id="userImage" class="col-md-12" alt=""
src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png"
style="border-radius: 50em;">
<h4 class="text-center mt-3 text-light userName mb-0 mx-auto">Loading...</h4>
<small class="d-block m-auto text-info text-center click ">Click anyone to message</small>
</div>
</div>
<svg class="chat-icon" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 612 612" xml:space="preserve">
<g class="chat">
<path class="chat-bg" fill-rule="evenodd" clip-rule="evenodd" fill="darkslategrey" d="M133.295,67.352h345.409c36.27,0,65.942,29.674,65.942,65.939
v345.415c0,36.268-29.673,65.941-65.942,65.941H133.295c-36.269,0-65.942-29.674-65.942-65.941V133.292
C67.353,97.026,97.026,67.352,133.295,67.352z"></path>
<g class="computer">
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#4E4E4E" points="193.796,459.066 263.994,459.066 296.898,518.674
160.893,518.674 "></polygon>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#47749C" d="M63.48,226.429h330.829c9.312,0,16.927,7.617,16.927,16.926
v213.897c0,9.309-7.615,16.926-16.927,16.926H63.48c-9.307,0-16.924-7.617-16.924-16.926V243.355
C46.556,234.045,54.171,226.429,63.48,226.429z"></path>
<g>
<circle fill-rule="evenodd" clip-rule="evenodd" fill="#F5F6F6" cx="390.683" cy="459.219" r="2.196">
</circle>
<circle fill-rule="evenodd" clip-rule="evenodd" fill="#F5F6F6" cx="382.1" cy="459.219" r="2.196">
</circle>
<circle fill-rule="evenodd" clip-rule="evenodd" fill="#F5F6F6" cx="373.518" cy="459.219" r="2.196">
</circle>
</g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#47749C"
d="M27.003,500.658h403.782c4.954,0,9.008,4.054,9.008,9.006l0,0
c0,4.954-4.054,9.007-9.008,9.007H27.003c-4.953,0-9.007-4.053-9.007-9.007l0,0C17.996,504.712,22.05,500.658,27.003,500.658z"></path>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#4E4E4E" d="M439.793,509.666c0,4.954-4.054,9.008-9.008,9.008H27.003
c-4.955,0-9.007-4.054-9.007-9.008H439.793z"></path>
</g>
<rect x="57.79" y="236.303" fill-rule="evenodd" clip-rule="evenodd" fill="#1E2025" width="342.211"
height="207.65"></rect>
</g>
<g class="baloon">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF"
d="M259.333,183.868H463.53c21.441,0,38.983,11.768,38.983,26.147
v136.968c0,14.382-17.542,26.148-38.983,26.148H259.333c-21.441,0-38.983-11.767-38.983-26.148V210.016
C220.35,195.636,237.892,183.868,259.333,183.868z M415.667,417.6l48.25-44.468h-33.75L415.667,417.6z"></path>
<circle fill-rule="evenodd" clip-rule="evenodd" fill="#ED9C5C" cx="293.5" cy="278.5" r="18.5"></circle>
<circle fill-rule="evenodd" clip-rule="evenodd" fill="#ED9C5C" cx="359.311" cy="278.5" r="18.5">
</circle>
<circle fill-rule="evenodd" clip-rule="evenodd" fill="#ED9C5C" cx="427.5" cy="278.5" r="18.5"></circle>
</g>
</g>
</svg>
</div>
</div>
</div>
<div class="rightbar-div col-md-3">
<h2 class="text-light member text-center pt-5 pb-2 mr-2"> Members</h2>
<div class="input-group mb-2">
<input type="text" id="myInput" class="form-control bg-transparent border-dark" placeholder="find somebody..."
style="border-radius: 20px;">
</div>
<div class="dfeed-bar bg-transparent border-none scrollbar" id="force-overflow" style="min-height: 73.6vh;">
</div>
</div>
</div>
</div>
</body>
<script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-analytics.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.1.1/firebase-storage.js"></script>
<script>
var firebaseConfig = {
apiKey: "AIzaSyAcNk4KaBv11KxfLtYofUq2zBRDsszM2VE",
authDomain: "office-kothon.firebaseapp.com",
databaseURL: "https://office-kothon.firebaseio.com",
projectId: "office-kothon",
storageBucket: "office-kothon.appspot.com",
messagingSenderId: "605346039997",
appId: "1:605346039997:web:350fd046addb6f51860fd4",
measurementId: "G-W822J60VT1"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
const storage = firebase.storage();
//make firebase consts
const auth = firebase.auth();
firebase.auth().onAuthStateChanged(function (user) {
if (!user) {
window.location.replace('./index.html');
}
else {
if (user.displayName.indexOf('isNewUser') !== -1) {
auth.currentUser.updateProfile({
displayName: user.displayName.split("isNewUser")[0],
photoURL: "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png"
})
}
if (user.displayName == 'admin') {
window.location.replace('./admin.html');
}
}
});
const db = firebase.firestore();
//update firebase settings
db.settings({ timestampsInSnapshots: true });
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/emoji-button@latest/dist/index.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script src="./toaster/toastr.min.js"></script>
<script src="./js/chat.js"></script>