Skip to content

Commit

Permalink
Made a real queue button. Accidentally removed important files
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarFloss committed Aug 9, 2017
1 parent 8706286 commit 1822444
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 111 deletions.
4 changes: 1 addition & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ app.on('ready',function() {
var win = new BrowserWindow({
width: 600,
height: 450,
frame: false,
radii: [5,5,5,5],
transparent: true
frame: true
});

win.loadURL('file://' + __dirname + '/src/index.html');
Expand Down
16 changes: 6 additions & 10 deletions node_modules/angularjs-slider/dist/rzslider.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion saved-podcasts.txt

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,32 @@
</div>
<div id="podcast-episodes">
<input id="episode-filter" ng-model="entryFilter" type="text" placeholder="Filter"></input>
<div class="options-menu" ng-show="optionsOpen">
<div class="option-holder">
<img class="option-icon" src="./res/icons/queue-option-icon.png" ng-click="queueClicked()"></img>
</div>
<div class="option-holder">
<img class="option-icon" src="./res/icons/download-option-icon.png"></img>
</div>
<div class="option-holder">
<img class="option-icon" src="./res/icons/info-option-icon.png"></img>
</div>
</div>
<div right-click class="entry-data" ng-repeat="entry in entries | filter: entryFilter">

<img class="play-button" ng-click="episodeClicked(entry)" src="./res/list-play-button.png">
</img>
<div class="entry-name" onclick="start(this)">
<div class="marquee">{{entry.title}}</div>
</div>
<img class="entry-option" src="./res/options-button.png"
onmouseover="this.src='./res/options-button-mouseover.png'"
onmouseout="this.src='./res/options-button.png'"></img>
<img class="entry-option" src="./res/options-button.png" ng-click="optionClicked(entry)"></img>
<div convert class="entry-duration"></div>
</div>
</div>
</div>
<div class="side-scroll" id="recents-row" ng-controller="recents-controller">
<div id="floating">
<div id="title">Reach</div>
<button id="search" class="top-button" ng-click=""><img class="button-icon" src="./res/search-icon.png"></img></button>
<input id="filter" ng-model="query" ng-keydown="filterKeyDown($event)" ng-keyup="filterKeyUp($event)" type="text" placeholder="Filter">
<button id="add" class="top-button" ng-click="addButtonClicked()"><img class="button-icon" src="./res/plus-icon.png"></img></button>
<div id="new-podcast">
Expand Down
Binary file added src/res/icons/download-option-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 added src/res/icons/info-option-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 added src/res/icons/queue-option-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 src/res/list-play-button-mouseover.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 src/res/list-play-button.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 src/res/options-button-mouseover.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 src/res/options-button.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 added src/res/search-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 24 additions & 62 deletions src/scripts/controllers/podcast-view-controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
angular.module('main').controller('podcast-view',function($scope,$rootScope,$window){
//$scope.open = true;
$scope.optionsOpen = false;
$scope.$on('podcast-clicked',function(event, arg){
$scope.optionsOpen = false;
$scope.author = arg.author;
$scope.title = arg.title;
$scope.imageUrl = arg.imageUrl;
Expand All @@ -9,45 +11,7 @@ angular.module('main').controller('podcast-view',function($scope,$rootScope,$win
$scope.entries = arg.entries;
});

/*
$scope.test = function(index){
if(!$scope.entries[index].itunes.duration.includes(":")){
var value = $scope.entries[index].itunes.duration;
var d = Number(value);
var hour = Math.floor(d/3600);
var minute = Math.floor(d % 3600 / 60);
var second = Math.floor(d % 3600 % 60);
var minuteDisplay = minute;
var secondDisplay = second;
var hourDisplay = hour;
if(minute < 10)
minuteDisplay = "0" + minute;
else
minuteDisplay = minute;
if(second < 10)
secondDisplay = "0" + second;
else
secondDisplay = second;
if(hour < 10)
hourDisplay = "0" + hour;
else
hourDisplay = hour;
if(hour == 0)
console.log(minuteDisplay + ":" + secondDisplay);
else
console.log(hourDisplay + ":" + minuteDisplay + ":" + secondDisplay);
}else{
console.log($scope.entries[index].itunes);
}

}
*/


//Close window on escape
Expand All @@ -59,14 +23,32 @@ angular.module('main').controller('podcast-view',function($scope,$rootScope,$win
}
});

//Queue Podcasts
$scope.queueClicked = function(){
//Calls function in controls-controller
$rootScope.$broadcast('queue',{
'data': $scope.entry,
'imageURL': $scope.imageUrl,
'author': $scope.author,
'podcastName': $scope.title
});
}


$scope.removeClicked = function(name){
$scope.open = false;
$rootScope.$broadcast('remove-item',name);
}


$scope.episodeClicked = function(data){
//Called when a user clicks the options button
$scope.optionClicked = function(data){
$scope.entry = data;
$scope.optionsOpen = true;
}


$scope.episodeClicked = function(data){
$rootScope.$broadcast('episode-clicked',{
'data': data,
'imageURL': $scope.imageUrl,
Expand Down Expand Up @@ -112,10 +94,12 @@ angular.module('main').controller('podcast-view',function($scope,$rootScope,$win


if(hour == 0)
element[0].textContent = minuteDisplay + ":" + secondDisplay;
element[0].textContent = "00:" + minuteDisplay + ":" + secondDisplay;
else
element[0].textContent = hourDisplay + ":" + minuteDisplay + ":" + secondDisplay;
}else{
if($scope.entries[index].itunes.duration.length <= 5)
$scope.entries[index].itunes.duration = "00:" + $scope.entries[index].itunes.duration;

element[0].textContent = $scope.entries[index].itunes.duration;

Expand All @@ -126,25 +110,3 @@ angular.module('main').controller('podcast-view',function($scope,$rootScope,$win

}
})


.directive('rightClick',function($rootScope){
return{
link: function($scope,element,attr){

angular.element(element).bind('mousedown',function(e){
if(e.button == 2){

$rootScope.$broadcast('queue',{
'data': $scope.entry,
'imageURL': $scope.imageUrl,
'author': $scope.author,
'podcastName': $scope.title
});

}
});

}
}
});
43 changes: 20 additions & 23 deletions src/styles/main-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ div{
-webkit-user-select: none;
}

#search{
float: left;
}



Expand All @@ -29,38 +32,36 @@ html{
height: 100%;
}

#title{
color: white;
padding-top: 2px;
line-height: 15px;
margin-left: 5px;
font-weight: bold;
float: left;
width: 33%;
font-family: quicksand;
-webkit-user-select: none;
}

#add{
float: right;
width: 30px;
}

#search{
margin-top: 3px;
}

#filter{
float: left;
width: 33%;
width: 30%;
-webkit-app-region: no-drag;
text-align: left;
padding-left: 10px;
margin-left: 3px;
}


#floating{
/*-webkit-app-region: drag;*/
z-index: 2;
top: 0px;
padding-top: 5px;
width: 100%;
height: 26px;
position: fixed;
left: 0;
background: rgba(0,83,126,.4);
background: rgba(0,83,126,1);
opacity: 1;
}

Expand All @@ -83,7 +84,7 @@ input[type="text"]{
border: none;
background: rgba(0, 0, 0, 0);
height: 20px;
border-radius: 5px;
/*border-radius: 5px;*/
text-align: center;
font-family: quicksand;
color: white;
Expand Down Expand Up @@ -123,6 +124,11 @@ td{
.top-button{
width: 25px;
height: auto;
transition: all linear 0.1s;
}

.top-button:hover{
-webkit-filter: brightness(70%);
}

tr{
Expand All @@ -139,15 +145,6 @@ body{
height: 100%;
}

#pause-button{
transition: all linear 0.1s;
}


.control-button:hover{
transform: scale(1.05,1.05);
}


.row-item-animate{
transition: .3s ease all;
Expand Down
6 changes: 3 additions & 3 deletions src/styles/new-podcast-style.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#new-podcast{
width: 150px;
width: 30%;
height: 100%;
float: right;
margin-top: -0px;
overflow-x: hidden;
-webkit-app-region: no-drag;
}

#url-input{

width: 100%;
margin-top: 1px;
border-radius: 0px;
margin-left: 10px;
Expand Down
10 changes: 8 additions & 2 deletions src/styles/now-playing-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@
margin-top: 20px;
}

#play-button{
margin-left: 3px;
#pause-button{
transition: all linear 0.1s;
margin-left: 2px;
}


.control-button:hover{
transform: scale(1.05,1.05);
-webkit-filter: brightness(25%);
}


#info{
padding: 15px;
Expand Down
Loading

0 comments on commit 1822444

Please sign in to comment.