Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
# steem-notifier v 0.3.1
# steem-notifier v 1.0.0

> Steem Notifier is a minimal taskbar application that send notifications about your [Steem account](http://steemit.com) through your native operating systems notification interface.

![Screen](https://i.imgsafe.org/d2/d24295d019.png)
![screen](https://user-images.githubusercontent.com/34964560/35290479-48262cd2-0062-11e8-8dc0-588c67a0f32d.png)

## How To
Steem Motifer is an electron based app an can run cross platform with windows/osx/linux. ```Version 0.3.0``` is only tested with OSX.
Steem Motifer is an electron based app an can run cross platform with windows/osx/linux. ```Version 1.0.0``` is only tested with OSX.

```
git clone git@github.com:code-with-sam/steem-notifier.git
```

setup/install
## Build locally
```
npm install
npm run package-mac
npm run package-win
npm run package-linux
```
find release builds in ```release/```

## setup/install for Development
```
npm install
npm start
```

Steem-notifier will launch automatically to your taskbar. You can click on the taskbar to launch the app. You'll be presented with a input field to enter your username. Select the type of notifications you would like to receive, each time you check/uncheck a selection notifiter updates your prefrences in the background. You will begin receiving native desktop notifications. You can click the notification to be sent to the action in your browser, click close to dismiss it or leave the notification to timeout. to stop receiving notifications exit the app, or click the disable-notifications button.

Check branches & PR's for the latest version

## Why is there a /lib/node-notifer?
The local version of ```node-notifer``` is needed only for the custom notification icon on mac. By default mac uses the icon of the application that is originally sending the notification, in this case it is the module terminal-notifier running through node.js. Creating a clone of ```node-notifier``` which has a clone of ```terminal-notifier.app``` with switched out app icons using this script [https://github.com/code-with-sam/customise-terminal-notifier](https://github.com/code-with-sam/customise-terminal-notifier).


## RoadMap/Ideas
- save default user (so you don’t have to type it in)
- packaged release on app stores
- multiple account support
- multiple account support
- ability to reply and upvote directly to messages in app
- history/feed of recent actions
- replace custom node notifier with other solution
- poll user data for new information
- add estimated earnings
- use username autocomplete API
Expand Down
53 changes: 46 additions & 7 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@ let notifications = {
}



$(document).ready(()=> {
$('.intro-pane__inner').removeClass('animation-start')
$('.intro-pane__username').focus()
let defaultUser = localStorage.getItem('default-username');

console.log('default user: ', defaultUser)

if(defaultUser !== 'false'){
$('.intro-pane').fadeOut(500)
$('.animation-hidden').removeClass('animation-hidden')
$('.intro-pane__username').val(defaultUser)
updateNotifications(notifications)
} else {
$('.intro-pane__inner').removeClass('animation-start')
$('.intro-pane__username').focus()
}
})

$('.check-box').on('click', (e) => {
Expand All @@ -36,13 +48,27 @@ $('.check-box').on('click', (e) => {
updateNotifications(notifications)
})

$('.check-box--intro').on('click', (e) => {
let currentCheckBox = $(e.currentTarget)
let isChecked = currentCheckBox.hasClass('checked--intro');
if( isChecked ) {
currentCheckBox.removeClass('checked--intro')
} else {
currentCheckBox.addClass('checked--intro')
}
})


$('.intro-pane__username').keypress(function(e) {
let val = $('.intro-pane__username').val()
if(e.which == 13 && val != '' ) {
$('.intro-pane').fadeOut(750)
$('.animation-hidden').removeClass('animation-hidden')
updateNotifications(notifications)

if ( $('.check-box--intro').hasClass('checked--intro')){
setDefaultUser(val)
}
}
});

Expand All @@ -56,29 +82,42 @@ setInterval(()=> {
ipcRenderer.on('user-data', (event, data) => {
console.log(data)
$('.notifactions__user-name').text(data.name)
$('.notifactions__user-bio').text(data.bio)
$('.notifactions__user-bio').text(data.bio.substring(0, 35))
$('.notifactions__user-stats').text(`Following: ${data.followingCount} | Followers: ${data.followerCount} | Posts: ${data.numOfPosts}`)
$('.notifactions__user-value').text(`Account Value: $${data.usdValue}`)
$('.notifactions__user-image').attr('src', data.image)
})


ipcRenderer.on('vote-power', (event, data) => {
console.log(data);

if (data){

$('.vote-power').text(data.toFixed(2) + '%')

document.querySelector('.vote-ring').style.strokeDashoffset = 200 - data*2
document.querySelector('.vote-ring').style.opacity = 1
}
})

ipcRenderer.on('show-notification', (event, data) => {
let notification = new Notification(data.title , data)

notification.onclick = () => {
if (data.link){
ipcRenderer.send('open-notification', data)
}
}

})

ipcRenderer.on('clear-default-user', (event, data) => {
localStorage.setItem('default-username', 'false');
location.reload();
})
// FUNCTIIONS

function setDefaultUser(defaultUsername){
localStorage.setItem('default-username', defaultUsername);
}

function updateNotifications(notifications){
let username = $('.intro-pane__username').val();
let data = {
Expand Down
Binary file modified img/comment-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/follow-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/mention-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/reblog-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/reward-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/transfer-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/vote-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 25 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
box-sizing: border-box;
}
body {
padding-top: 20px;
-webkit-app-region: drag;
font-family: Inconsolata, 'Courier New', Courier, monospace;
margin: 0;
background-color: #f9f9f9;
Expand Down Expand Up @@ -124,6 +126,26 @@
line-height: 33px;
margin-top: 5px;
}
.intro-pane__default {
position: relative;
text-align: center;
}
.intro-pane__default .check-box {

}
.check-box--intro {
float: none;
height: 14px;
width: 14px;
border-radius: 2px;
border: solid 0.12rem #bbb;
display: inline-block;
transform: translateY(3px);
cursor: pointer;
}
.check-box--intro.checked--intro {
background-color: #bbb;
}


.notifactions__user {
Expand All @@ -141,12 +163,12 @@

.notifications__select {
width: 95%;
margin: 10px auto;
margin: 8px auto;
box-shadow: 0 0 40px rgba(0,0,0,0.1);
background-color: #fff;
border-radius: 5px;
transition: all 600ms;
transition-delay: 600ms;
transition-delay: 200ms;
transform: translateY(0px);
opacity: 1;
}
Expand Down Expand Up @@ -267,6 +289,7 @@ <h1 class="intro-pane__title">Steem Notifier</h1>
<span class="intro-pane__at">@</span>
<input class="intro-pane__username" type="text" placeholder="username"></input>
</div>
<p class="intro-pane__default"> Save as default user? <span class="check-box--intro checked--intro"></span></p>
</div>
</section>

Expand Down
6 changes: 0 additions & 6 deletions lib/node-notifier/.npmignore

This file was deleted.

Loading