Skip to content
This repository has been archived by the owner on Aug 11, 2018. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
artur9010 committed Jul 23, 2016
1 parent e098086 commit dfae97e
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 53 deletions.
10 changes: 10 additions & 0 deletions gui/css/colorchanger.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
padding-top: 5px;
}

.list-group-item.active, .list-group-item.selected{
background-color: rgb(255, 127, 0);
}

.color-block{
width: 40px;
height: 40px;
Expand All @@ -15,6 +19,12 @@
margin-right: 1px;
}

.buttons{
display: flex;
justify-content: center;
padding-top: 25px;
}

.color-1{
background-color: #0084FF;
}
Expand Down
4 changes: 4 additions & 0 deletions gui/css/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
height: 100vh;
}

h1{
color: rgb(255, 127, 0);
}

.grey-text{
color: lightgrey;
}
File renamed without changes
1 change: 1 addition & 0 deletions gui/img/facebook-messenger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions gui/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Messenger Color Changer</title>
<title>Phoenix: Messenger Color Changer</title>

<!-- Stylesheets -->
<link rel="stylesheet" href="css/photon.min.css">
Expand All @@ -19,6 +19,7 @@

<div class="pane">
<div id="colorpicker"></div>
<!-- todo: hidden, currently not working
<div class="predefined-colors">
<div class="color-block color-1"></div>
<div class="color-block color-2"></div>
Expand All @@ -39,9 +40,10 @@
<div class="color-block color-13"></div>
<div class="color-block color-14"></div>
<div class="color-block color-15"></div>
</div>-->
<div class="buttons">
<button class="btn btn-large btn-warning" id="change-button">Change color</button>
</div>

<button class="btn btn-large btn-primary" id="change-button">Change color</button>
</div>
</div>
</div>
Expand Down
25 changes: 1 addition & 24 deletions gui/js/colorchanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var colorpicker = new ColorPicker({
el: document.getElementById("colorpicker"),
height: 250,
width: 249,
background: '#F5F5F4'
background: '#FFFFFF'
});

waff.qq(".color-block").forEach(function (el) {
Expand Down Expand Up @@ -41,42 +41,20 @@ function login_to_messenger() {
return console.error(err);
}

/*api.getUserInfo([100012621480066], function(err, ret) {
if(err) return console.error(err);
for(var prop in ret) {
if(ret.hasOwnProperty(prop)) {
console.log(ret[prop])
}
}
});*/

api.getThreadList(0, 50, function (err, arr) {
/*
conversations:
- image: imageSrc
- name: name
users:
- image: thumbSrc
- name: name
*/
if(err){
return console.error(err);
}
for(prot in arr){
(function(){
//console.log(arr[prot]);
var conversationName;
var conversationImage;
var conversatonID;
if(arr[prot]["isCanonicalUser"]){ //is user
//console.log([arr[prot]["participantIDs"][0]].toString());
api.getUserInfo([arr[prot]["participantIDs"][0]], function(err, res){
if(err) return console.error(err);
for(var prop in res) {
conversationName = res[prop].name;
console.log(conversationName);
conversationImage = res[prop].thumbSrc;
conversatonID = prop;
addConversation(conversatonID, conversationName, conversationImage);
Expand Down Expand Up @@ -121,7 +99,6 @@ function login_to_messenger() {

function changeColor(){
var id = waff.q(".conversation.active").id;
//colorpicker.getColor()
api.changeThreadColor(colorpicker.getHexString().toString(), id.toString(), function callback(err){
if(err) return console.error(err);
});
Expand Down
20 changes: 0 additions & 20 deletions gui/js/colorpicker.js

This file was deleted.

11 changes: 6 additions & 5 deletions gui/login.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<html>
<head>
<title>Log-in to Facebook Messenger</title>
<title>Phoenix: Log-in to Facebook Messenger</title>
<link rel="stylesheet" href="css/photon.min.css">
<link rel="stylesheet" href="css/login.css">
</head>
<body>
<div class="login-screen">
<h1>electron-colorchanger</h1>
<img src="img/facebook-messenger.svg" width="150px" height="150px">
<h1>Phoenix</h1>
<div id="error"></div><br/>
<form id="login-form">
<div class="form-group">
<label>Facebook login</label>
<input type="text" id="username" class="form-control" placeholder="Facebook login">
<input type="text" id="username" class="form-control">
</div>
<div class="form-group">
<label>Facebook password</label>
<input type="password" id="password" class="form-control" placeholder="Facebook password">
<input type="password" id="password" class="form-control">
</div>
<input type="submit" id="login-button" class="btn btn-large btn-primary" value="Continue">
<input type="submit" id="login-button" class="btn btn-large btn-warning" value="Continue">
<p class="grey-text">Use at your own risk, we are not responsible for the account lockout.</p>
<p class="grey-text">We do not send your data to the NSA ;) (facebook does)</p>
</form>
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let mainWindow

function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({width: 470, height: 700})
mainWindow = new BrowserWindow({width: 470, height: 600})

// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/gui/login.html`)
Expand Down

0 comments on commit dfae97e

Please sign in to comment.