Skip to content

Commit

Permalink
Merge pull request #8 from Progyan1997/hacktoberfest/progyan
Browse files Browse the repository at this point in the history
Hacktoberfest: Swipe: A Peer to Peer Chat Application
  • Loading branch information
MadhavBahl committed Oct 3, 2017
2 parents 508c632 + b2588d2 commit fb0a031
Show file tree
Hide file tree
Showing 10 changed files with 534 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 13-swipe-p2p chat app/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015", "stage-0", "react"]
}
21 changes: 21 additions & 0 deletions 13-swipe-p2p chat app/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"rules": {
"quotes": [2, "single"],
"strict": [2, "never"],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2
},
"plugins": [
"react"
]
}
5 changes: 5 additions & 0 deletions 13-swipe-p2p chat app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.sublime-project
dist/
node_modules/
*.log
*.sublime*
6 changes: 6 additions & 0 deletions 13-swipe-p2p chat app/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"node": true,
"browser": true,
"esnext": true,
"newcap": false
}
8 changes: 8 additions & 0 deletions 13-swipe-p2p chat app/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

ISC License (ISC)

Copyright (c) 2016, Progyan Bhattacharya <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13 changes: 13 additions & 0 deletions 13-swipe-p2p chat app/deplist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# ***************************************************************************
#
# Note: This file has been deprecated and exists for backward compatibility.
# Please use package.json to add dependencies to the Node modules
# your application requires.
#
# ***************************************************************************
#

#
# For a list of globally installed modules - see file: npm_global_module_list.
#
114 changes: 114 additions & 0 deletions 13-swipe-p2p chat app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="PEER TO PEER CHAT" />
<meta name="keyword" content="peer, rtc, chat, swipe, progyan, nodejs" />
<meta name="author" content="Progyan Bhattacharya" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>SwiPE</title>
<!-- BOOTSTRAP CORE STYLE CSS
http:https://getbootstrap.com/ -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- EMOTICONS -->
<link href="assets/css/emoticons.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- jQuery SCRIPT V1.12.3 -->
<script src="assets/js/jquery-1.12.3.min.js" type="text/javascript"></script>
<!-- BOOTSTRAP CORE SCRIPT JS
http:https://getbootstrap.com/ -->
<script src="assets/js/bootstrap.js" type="text/javascript"></script>
<!-- CUSTOM SCRIPT -->
<script src="node_modules/aria2/bundle.js"></script>
<script src="assets/js/script.js" type="text/javascript"></script>
</head>

<body>
<div class="container">
<div class="head">
<h2>SwiPE</h2>
<i>Swipe and Share</i>
</div>
<!-- Panel -->
<div class="row">
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">
CONNECT TO PEERS
</div>
<div class="panel-body">
<div class="form-group">
<textarea class="form-control id_con" id="seed" placeholder="Your ID"></textarea>
</div>
<div class="form-group">
<textarea class="form-control id_con" id="peer" placeholder="Peer ID"></textarea>
</div>
<div class="form-group">
<button class="btn btn-info" type="button" id="connect"> CONNECT </button>
<button class="btn btn-info" type="button" id="disconnect"> DISCONNECT </button>
</div>
<div class="panel-footer">
<span class="glyphicon glyphicon-calendar"></span>
<span id="date_time"></span>
<script type="text/javascript">window.onload = real_time('date_time');</script>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="panel panel-info" id="chat_current">
<div class="panel-heading">
<div class="username"> PEER </div>
<label id="lastseen">Offline</label>
</div>
<div class="panel-body" id="chat_box">
<!-- MESSAGES HERE -->
<ul class="media-list" id="messages">
</ul>
</div>
<div class="panel-footer">
<div class="input-group" id="input">
<input type="text" class="form-control" id="message" autocomplete="off" placeholder="Enter Message" />
<span class="input-group-btn">
<button class="btn btn-info" type="button" id="send">
<span class="glyphicon glyphicon-send"></span>
</button>
<button class="btn btn-info" type="button" id="attach">
<span class="glyphicon glyphicon-paperclip"></span>
<input type="file" multiple id="file"/>
</button>
</span>
</div>
<div id="ftp">
<div id="status"></div>
<div class="progress" id="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0px"></div>
</div>
<button class="btn btn-info" type="button" id="close"> Close </button>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<!-- Copyright -->
<div class="copy">
<span class="anchor"> &copy; Progyan Bhattacharya || CS50 Final Project || 2016 </span>
<p class="license">
ISC License (ISC)
Copyright &copy; 2016, Progyan Bhattacharya &lt;[email protected]&gt; <br/>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</p>
</div>
</footer>
<script type="text/javascript" src="bundle.js" charset="utf-8"></script>
</body>
</html>
Loading

0 comments on commit fb0a031

Please sign in to comment.