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

Commit

Permalink
New packaging system
Browse files Browse the repository at this point in the history
  • Loading branch information
wvffle committed Feb 12, 2017
1 parent aa6a98f commit 7034030
Show file tree
Hide file tree
Showing 14 changed files with 377 additions and 328 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,26 @@ Download .zip package from [Releases](https://github.com/artur9010/Phoenix/relea
#### OS X/macOS
Download .zip package from [Releases](https://github.com/artur9010/Phoenix/releases/latest), extract it and run application (you can move it to Applications).

##
## Building
### For testing
```
npm run -s build
```
### For production
```
npm run -s prod
```
### For specific platform
```
npm run -s build PLATFORM ARCH
```
Here is the list of available platforms:
- `mac` | `m` | `darwin`
- `linux` | `l`
- `windows` | `w` | `win32`
- `all` | `a`
And there is the list of architectures:
- `x64`
- `ia32`
- `armv7l`
- `all` | `a`
92 changes: 46 additions & 46 deletions gui/index.pug
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
doctype html
html
head
title Phoenix: Messenger Color Changer
// Stylesheets
link(rel='stylesheet', href='css/colorchanger.styl')
link(rel='stylesheet', href='../bower_components/photon/dist/css/photon.min.css')
link(rel='stylesheet', href='../node_modules/simple-color-picker/src/simple-color-picker.css')
script(src='../bower_components/angular/angular.min.js')
script(src='js/phoenix.coffee')
body(ng-app='phoenix')
// Login screen
.window.login-screen(ng-if='!api')
img.logo(src='img/facebook-messenger.svg', width='150px', height='150px')
h1 Phoenix
.info {{ login_info }}
br
form.login-form
.form-group
label(for='username') Facebook login or phone number
input#username.username.form-control(type='text')
.form-group
label(for='password') Facebook password
input#password.password.form-control(type='password')
input.login-button.btn.btn-large.btn-warning(type='submit', value='Continue', ng-disabled='submitted')
p.grey-text Use at your own risk, we are not responsible for the account lockout.
p.grey-text We do not send your data to the NSA ;) (facebook does)
// Color changer
.window.colorchanger(ng-if='!!api')
.window-content
.pane-group
.pane.pane-sm.sidebar
ul.list-group.conversations
li.list-group-item.conversation(ng-repeat='thread in contacts', id='{{ thread.id }}', ng-class='{active: active.id == thread.id}')
img.img-circle.media-object.pull-left(ng-src='{{thread.image}}', alt='')
.color(ng-style='{ background: thread.color }')
.media-body
strong {{ thread.name }}
.pane.colorpicker-holder
.kot(ng-style='{ background: (thread(active.id)||{}).newColor || (thread(active.id)||{}).color }')
.colorpicker(ng-if='!!active')
.predefined-colors
.color-block(ng-repeat="color in predefinedColors" ng-style='{backgroundColor: color}')
.buttons
button.btn.btn-large.btn-warning.change-button Change color

doctype html
html
head
title Phoenix: Messenger Color Changer
// Stylesheets
link(rel='stylesheet', href='css/colorchanger.styl')
link(rel='stylesheet', href='../bower_components/photon/dist/css/photon.min.css')
link(rel='stylesheet', href='../node_modules/simple-color-picker/src/simple-color-picker.css')
script(src='../bower_components/angular/angular.min.js')
script(src='js/phoenix.coffee')
body(ng-app='phoenix')
// Login screen
.window.login-screen(ng-if='!api')
img.logo(src='img/facebook-messenger.svg', width='150px', height='150px')
h1 Phoenix
.info {{ login_info }}
br
form.login-form
.form-group
label(for='username') Facebook login or phone number
input#username.username.form-control(type='text')
.form-group
label(for='password') Facebook password
input#password.password.form-control(type='password')
input.login-button.btn.btn-large.btn-warning(type='submit', value='Continue', ng-disabled='submitted')
p.grey-text Use at your own risk, we are not responsible for the account lockout.
p.grey-text We do not send your data to the NSA ;) (facebook does)
// Color changer
.window.colorchanger(ng-if='!!api')
.window-content
.pane-group
.pane.pane-sm.sidebar
ul.list-group.conversations
li.list-group-item.conversation(ng-repeat='thread in contacts', id='{{ thread.id }}', ng-class='{active: active.id == thread.id}')
img.img-circle.media-object.pull-left(ng-src='{{thread.image}}', alt='')
.color(ng-style='{ background: thread.color }')
.media-body
strong {{ thread.name }}
.pane.colorpicker-holder
.kot(ng-style='{ background: (thread(active.id)||{}).newColor || (thread(active.id)||{}).color }')
.colorpicker(ng-if='!!active')
.predefined-colors
.color-block(ng-repeat="color in predefinedColors" ng-style='{backgroundColor: color}')
.buttons
button.btn.btn-large.btn-warning.change-button Change color

40 changes: 20 additions & 20 deletions gui/js/directives/changeButton.coffee
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Phoenix.directive 'changeButton', [
'$rootScope'
'notify'
($root, $notify) ->
restrict: 'C'
link: ($scope, $el,) ->
change = $el[0]
change.on 'click', () ->
id = $scope.active.id

$root.api.changeThreadColor $root.picker.getHexString(), id, (err) ->
if err?
$notify 'Error changing color...'
return console.error err
debug && console.log id
debug && console.log $root.thread id
$root.thread(id).color = $root.picker.getHexString()
$root.apply()
$notify 'Color changed successfully :D'
]
Phoenix.directive 'changeButton', [
'$rootScope'
'notify'
($root, $notify) ->
restrict: 'C'
link: ($scope, $el) ->
change = $el[0]
change.on 'click', () ->
id = $scope.active.id

$root.api.changeThreadColor $root.picker.getHexString(), id, (err) ->
if err?
$notify 'Error changing color...'
return console.error err
debug && console.log id
debug && console.log $root.thread id
$root.thread(id).color = $root.picker.getHexString()
$root.apply()
$notify 'Color changed successfully :D'
]
24 changes: 12 additions & 12 deletions gui/js/directives/colorBlock.coffee
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Phoenix.directive 'colorBlock', [
'$rootScope'
($root) ->
restrict: 'C'
link: ($scope, $el) ->
color = $el[0]
color.on 'click', () ->
if $root.active
$root.thread($root.active.id).newColor = @css('background')
$root.picker.setColor @css('background')
$root.apply()
]
Phoenix.directive 'colorBlock', [
'$rootScope'
($root) ->
restrict: 'C'
link: ($scope, $el) ->
color = $el[0]
color.on 'click', () ->
if $root.active
$root.thread($root.active.id).newColor = @css('background')
$root.picker.setColor @css('background')
$root.apply()
]
38 changes: 19 additions & 19 deletions gui/js/directives/colorpicker.coffee
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
ColorPicker = require 'simple-color-picker'
Phoenix.directive 'colorpicker', [
'$rootScope'
($root) ->
restrict: 'C'
link: ($scope, $el) ->
picker = $el[0]
$root.picker = window.picker = new ColorPicker
color: $root.predefinedColors[0]
el: picker
height: 150
width: 150 + 25
background: '#ffffff'

$root.picker.onChange ->
if $root.active
$root.thread($root.active.id).newColor = $root.picker.getHexString()
$root.apply()
]
ColorPicker = require 'simple-color-picker'
Phoenix.directive 'colorpicker', [
'$rootScope'
($root) ->
restrict: 'C'
link: ($scope, $el) ->
picker = $el[0]
$root.picker = window.picker = new ColorPicker
color: $root.predefinedColors[0]
el: picker
height: 150
width: 150 + 25
background: '#ffffff'

$root.picker.onChange ->
if $root.active
$root.thread($root.active.id).newColor = $root.picker.getHexString()
$root.apply()
]
28 changes: 14 additions & 14 deletions gui/js/directives/conversation.coffee
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Phoenix.directive 'conversation', [
'$rootScope'
($root) ->
restrict: 'C'
link: ($scope, $el) ->
conversation = $el[0]
conversation.on 'click', () ->
$root.thread($root.active.id).newColor = null if $root.active
$root.active = @
$root.apply()
process.nextTick ->
$root.picker.setColor conversation.q('.color').css 'background'
$root.apply()
]
Phoenix.directive 'conversation', [
'$rootScope'
($root) ->
restrict: 'C'
link: ($scope, $el) ->
conversation = $el[0]
conversation.on 'click', () ->
$root.thread($root.active.id).newColor = null if $root.active
$root.active = @
$root.apply()
process.nextTick ->
$root.picker.setColor conversation.q('.color').css 'background'
$root.apply()
]
22 changes: 11 additions & 11 deletions gui/js/directives/form.coffee
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Phoenix.directive 'form', [
'$rootScope'
'login'
($root, login) ->
restrict: 'E'
link: ($scope, $el) ->
form = $el[0]
form.on 'submit', (e) ->
e.preventDefault()
login() if $root.submitted == false
]
Phoenix.directive 'form', [
'$rootScope'
'login'
($root, login) ->
restrict: 'E'
link: ($scope, $el) ->
form = $el[0]
form.on 'submit', (e) ->
e.preventDefault()
login() if $root.submitted == false
]
Loading

0 comments on commit 7034030

Please sign in to comment.