-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.html
201 lines (148 loc) · 7.24 KB
/
auth.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
<!DOCTYPE html>
<html>
<head>
<title>Auth | Home</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="plugins/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="plugins/fa/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
<script type="text/javascript" src="plugins/jquery.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.8.2/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.8.1/firebase-firestore.js"></script>
</head>
<body>
<div class="container">
<!--Sign up or login Start-->
<div class="user-auth">
<div class="user-auth-wrap">
<div class="col-sm-12 col-md-6 col-lg-4 user-form user-signup">
<div class="jfw-head row">
<div class="col-6 jfw-logo-sec">
<img src="assets/logo.svg">
</div>
</div>
<div class="user-form-head"> Create your Free Account </div>
<form method="POST" id="su_form" class="auth-form auth-signup">
<div class="col-12 su-error"> </div>
<input type="text" name="su-fname" placeholder="Full Name" class="type-inp">
<input type="Email" name="su-email" placeholder="Email Address" class="type-inp">
<input type="Password" name="su-pass" placeholder="Password" class="type-inp">
<input type="submit" name="su-submit" value="Sign Up" class="cus-btn cus-btn-blue su-submit">
</form>
<div class="account-ask">
Already have an account ? <a href="#" class="show-login">Login</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 user-form user-login">
<div class="jfw-head row">
<div class="col-6 jfw-logo-sec">
<img src="assets/logo.svg">
</div>
</div>
<div class="user-form-head"> Login to your account !</div>
<form method="POST" id="lg_form" class="auth-form auth-login">
<div class="col-12 lg-error"> </div>
<input type="Email" name="lg-email" placeholder="Email Address" class="type-inp">
<input type="Password" name="lg-pass" placeholder="Password" class="type-inp">
<input type="submit" name="lg-submit" value="Login" class="cus-btn cus-btn-blue lg-submit">
</form>
<div class="account-ask">
Don`t have an account ? <a href="#" class="show-signup">Sign Up</a>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 su-welcome">
<div class="suw-head">
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52"><circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/></svg>
<h3>Welcome Buddy !</h3>
</div>
<div class="suw-desc">
You are successfully In !
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 lg-welcome">
<div class="suw-head">
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52"><circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/></svg>
<h3>Welcome Back!</h3>
</div>
<div class="suw-desc">
You are successfully In !
</div>
</div>
</div>
</div>
<!--Sign up or login End-->
</div>
</body>
<script type="text/javascript" src="plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="chat-scripts.js"></script>
<!--
function khan(pu){
_firebaseChatRef.child(_CU).on("child_added",function(res){
_firebaseAuthRef.child(res.key).on("value",function(r){
_chattedWith.push({name:r.val().n,id:r.key});
})
})
if(typeof pu == "function") {
setTimeout(function(){pu(_chattedWith);},2000)
}
}
function populateUsers(chattedWith){
let len = chattedWith.length,
_el = document.getElementsByClassName("chat-ind-body-wrap")[0];
while (_el.firstChild) {
_el.removeChild(_el.firstChild);
}
for(var i= 0;i<len;i++){
_el.insertAdjacentHTML('afterbegin','<li class="chat-ind-user active-user" data-id="'+chattedWith[i].key+'">'
+'<div class="chat-ind-user-img">'
+'<img src="assets/1.jpg">'
+'</div>'
+'<div class="chat-ind-user-data">'
+'<div class="ciu-name"> '+chattedWith[i].name+' </div>'
+'<div class="ciu-text"> Hi, I am the text here ! </div>'
+'<span class="ciu-time"> 2h ago </span>'
+'</div>'
+'<span class="user-availble">'
+'<i class="fa fa-circle"></i>'
+'</span>'
+'</li>');
}
}
khan(populateUsers);
function getData(){
return new Promise(function(resolve,reject){
_firebaseChatRef.child(_CU).on("child_added",function(res){
_firebaseAuthRef.child(res.key).on("value",function(r){
_chattedWith.push({name:r.val().n,id:r.key});
})
})
resolve(_chattedWith) ;
})
}
getData().then(function(res){
setTimeout(function(){ populateUsers(res)},1000);
})
function populateUsers(chattedWith){
let len = chattedWith.length,
_el = document.getElementsByClassName("chat-ind-body-wrap")[0];
for(var i= 0;i<len;i++){
_el.insertAdjacentHTML('afterbegin','<li class="chat-ind-user active-user" data-id="'+chattedWith[i].key+'">'
+'<div class="chat-ind-user-img">'
+'<img src="assets/1.jpg">'
+'</div>'
+'<div class="chat-ind-user-data">'
+'<div class="ciu-name"> '+chattedWith[i].name+' </div>'
+'<div class="ciu-text"> Hi, I am the text here ! </div>'
+'<span class="ciu-time"> 2h ago </span>'
+'</div>'
+'<span class="user-availble">'
+'<i class="fa fa-circle"></i>'
+'</span>'
+'</li>');
}
}
-->
</html>