Update v0.9
This commit is contained in:
parent
047bb9c000
commit
1b9c36a49f
18
app/app.js
18
app/app.js
@ -8,7 +8,7 @@ if (!window.indexedDB) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var contacts = [];
|
var contacts = [];
|
||||||
var receiverID,senderID;
|
var receiverID,senderID,recStat;
|
||||||
var selfwebsocket,receiverWebSocket;
|
var selfwebsocket,receiverWebSocket;
|
||||||
var privKey;
|
var privKey;
|
||||||
|
|
||||||
@ -211,6 +211,14 @@ function convertStringToInt(string){
|
|||||||
|
|
||||||
function userDataStartUp(){
|
function userDataStartUp(){
|
||||||
console.log("StartUp");
|
console.log("StartUp");
|
||||||
|
|
||||||
|
document.getElementById("sendMsgInput").addEventListener("keyup",function(event){
|
||||||
|
if(event.keyCode === 13){
|
||||||
|
event.preventDefault();
|
||||||
|
sendMsg();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
getDatafromAPI().then(function (result) {
|
getDatafromAPI().then(function (result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
getDatafromIDB().then(function(result){
|
getDatafromIDB().then(function(result){
|
||||||
@ -238,6 +246,7 @@ function userDataStartUp(){
|
|||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(error.message);
|
console.log(error.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
function arrayToObject(array){
|
function arrayToObject(array){
|
||||||
obj = {};
|
obj = {};
|
||||||
@ -610,9 +619,10 @@ function changeReceiver(param){
|
|||||||
|
|
||||||
function receiverStatus(status){
|
function receiverStatus(status){
|
||||||
if(status)
|
if(status)
|
||||||
document.getElementById('recipient-floID').style.backgroundColor = "#00b300";
|
document.getElementById('recipient-status').style.color = "#4CC94C";
|
||||||
else
|
else
|
||||||
document.getElementById('recipient-floID').style.backgroundColor = "#ff4d4d";
|
document.getElementById('recipient-status').style.color = "#CD5C5C";
|
||||||
|
recStat = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTime(time){
|
function getTime(time){
|
||||||
@ -633,7 +643,7 @@ function sendMsg(){
|
|||||||
alert("Select a contact and send message");
|
alert("Select a contact and send message");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(receiverWebSocket.readyState !== WebSocket.OPEN){
|
if(!recStat){
|
||||||
alert("Recipient is offline! Try again later")
|
alert("Recipient is offline! Try again later")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,16 +23,20 @@
|
|||||||
<div class="side-one">
|
<div class="side-one">
|
||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<div class="row heading">
|
<div class="row heading">
|
||||||
|
<h5><b>FLO Whatsapp </b></h5><h6><i>created by Ranchimall</i></h6>
|
||||||
|
<!--
|
||||||
<div class="col-sm-1 col-xs-1 heading-dot pull-right">
|
<div class="col-sm-1 col-xs-1 heading-dot pull-right">
|
||||||
<i class="fa fa-ellipsis-v fa-2x pull-right" aria-hidden="true" onclick="min();"></i>
|
<i class="fa fa-ellipsis-v fa-2x pull-right" aria-hidden="true" onclick="min();"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 col-xs-2 heading-compose pull-right">
|
<div class="col-sm-2 col-xs-2 heading-compose pull-right">
|
||||||
<i class="fa fa-comments fa-2x pull-right" aria-hidden="true"></i>
|
<i class="fa fa-comments fa-2x pull-right" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
<!-- Heading End -->
|
<!-- Heading End -->
|
||||||
|
|
||||||
<!-- SearchBox -->
|
<!-- SearchBox -->
|
||||||
|
<!--
|
||||||
<div class="row searchBox">
|
<div class="row searchBox">
|
||||||
<div class="col-sm-12 searchBox-inner">
|
<div class="col-sm-12 searchBox-inner">
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
@ -41,6 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Search Box End -->
|
<!-- Search Box End -->
|
||||||
<!-- sideBar -->
|
<!-- sideBar -->
|
||||||
@ -57,12 +62,14 @@
|
|||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<div class="row heading">
|
<div class="row heading">
|
||||||
<div class="col-sm-8 col-xs-8 heading-name">
|
<div class="col-sm-8 col-xs-8 heading-name">
|
||||||
<span class="heading-name-meta" id="recipient-floID">Select Contact
|
<span class="heading-name-meta"><span id="recipient-status">O</span> <span id="recipient-floID">Select Contact</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="col-sm-1 col-xs-1 heading-dot pull-right">
|
<div class="col-sm-1 col-xs-1 heading-dot pull-right">
|
||||||
<i class="fa fa-ellipsis-v fa-2x pull-right" aria-hidden="true"></i>
|
<i class="fa fa-ellipsis-v fa-2x pull-right" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
<!-- Heading End -->
|
<!-- Heading End -->
|
||||||
|
|
||||||
@ -73,15 +80,19 @@
|
|||||||
|
|
||||||
<!-- Reply Box -->
|
<!-- Reply Box -->
|
||||||
<div class="row reply">
|
<div class="row reply">
|
||||||
|
<!--
|
||||||
<div class="col-sm-1 col-xs-1 reply-emojis">
|
<div class="col-sm-1 col-xs-1 reply-emojis">
|
||||||
<i class="fa fa-smile-o fa-2x"></i>
|
<i class="fa fa-smile-o fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="col-sm-9 col-xs-9 reply-main">
|
<div class="col-sm-9 col-xs-9 reply-main">
|
||||||
<input class="form-control" rows="1" id="sendMsgInput" placeholder="Type message" autocomplete="off"></input>
|
<input class="form-control" rows="1" id="sendMsgInput" placeholder="Type message" autocomplete="off" ></input>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="col-sm-1 col-xs-1 reply-recording">
|
<div class="col-sm-1 col-xs-1 reply-recording">
|
||||||
<i class="fa fa-microphone fa-2x" aria-hidden="true"></i>
|
<i class="fa fa-microphone fa-2x" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="col-sm-1 col-xs-1 reply-send" onclick = "sendMsg()">
|
<div class="col-sm-1 col-xs-1 reply-send" onclick = "sendMsg()">
|
||||||
<i class="fa fa-send fa-2x" aria-hidden="true"></i>
|
<i class="fa fa-send fa-2x" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -106,6 +106,14 @@ body {
|
|||||||
color: #000;
|
color: #000;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#recipient-status{
|
||||||
|
border-radius: 50%;
|
||||||
|
background: none;
|
||||||
|
height: 25px;
|
||||||
|
width: 25px;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
.heading-online {
|
.heading-online {
|
||||||
display: none;
|
display: none;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
@ -388,7 +396,6 @@ body {
|
|||||||
border-radius: 10px 10px 10px 0;
|
border-radius: 10px 10px 10px 0;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
|
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: auto;
|
height: auto;
|
||||||
@ -399,11 +406,10 @@ body {
|
|||||||
float: right;
|
float: right;
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
height: auto;
|
height: auto;
|
||||||
background: gray;
|
background: #dcf8c6;
|
||||||
border-radius: 10px 10px 0 10px;
|
border-radius: 10px 10px 0 10px;
|
||||||
padding: 4px 10px 7px !important;
|
padding: 4px 10px 7px !important;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
@ -457,7 +463,7 @@ body {
|
|||||||
padding: 2px 5px !important;
|
padding: 2px 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reply-main textarea {
|
.reply-main input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
resize: none;
|
resize: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -470,7 +476,7 @@ body {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reply-main textarea:focus {
|
.reply-main input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border: none;
|
border: none;
|
||||||
text-indent: 5px;
|
text-indent: 5px;
|
||||||
@ -574,7 +580,7 @@ body {
|
|||||||
.reply-main {
|
.reply-main {
|
||||||
padding: 2px 8px !important;
|
padding: 2px 8px !important;
|
||||||
}
|
}
|
||||||
.reply-main textarea {
|
.reply-main input {
|
||||||
padding: 8px !important;
|
padding: 8px !important;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user