Thanks to visit codestin.com
Credit goes to github.com

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
6 changes: 3 additions & 3 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ <h2 class="ui_title">Main</h2>
<span class="player_progress_bar" id="player-progress"></span>
</div>
<div class="player_details">
<img id="playerThumb" src="public/img/logo-short.png" alt="" class="player_thumb">
<img id="playerThumb" src="public/img/logo-short.png" alt="" class="player_thumb" ng-click="goToSong($event)">

<h2 id="playerTitle" class="player_title"></h2>
<h4 id="playerUser" class="player_user"></h4>
<h2 id="playerTitle" class="player_title" ng-click="goToSong($event)"></h2>
<h4 id="playerUser" class="player_user" ng-click="goToUser($event)"></h4>

<div class="player_time">
<span class="player_timeCurrent" id="player-timecurrent"></span>
Expand Down
12 changes: 11 additions & 1 deletion app/public/js/player/playerCtrl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

app.controller('PlayerCtrl', function ($scope, $rootScope, playerService, hotkeys, $log, $timeout) {
app.controller('PlayerCtrl', function ($scope, $rootScope, playerService, queueService, hotkeys, $state, $log, $timeout) {
$scope.imgPath = 'public/img/temp-playing.png';

$timeout(function() {
Expand Down Expand Up @@ -99,6 +99,16 @@ app.controller('PlayerCtrl', function ($scope, $rootScope, playerService, hotkey
document.querySelector('.queueList').classList.toggle('active');
};

$scope.goToSong = function ($event) {
var trackObj = queueService.getTrack();
$state.go('track', { id: trackObj.songId });
};

$scope.goToUser = function ($event) {
var trackObj = queueService.getTrack();
$state.go('profile', { id: trackObj.songUserId });
};


/*
* Add native media shortcuts
Expand Down
3 changes: 3 additions & 0 deletions app/public/stylesheets/sass/_components/_player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
width: 50px;
margin: 5px 0;
float: left;
cursor: pointer;
}

.player_title {
Expand All @@ -24,6 +25,7 @@
overflow: hidden;
text-overflow: ellipsis;
padding: 13px 10px 0;
cursor: pointer;
}

.player_details {
Expand All @@ -41,6 +43,7 @@
overflow: hidden;
text-overflow: ellipsis;
font-weight: 300;
cursor: pointer;
}

.player_currentSong {
Expand Down
1 change: 1 addition & 0 deletions app/views/common/tracks.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
data-song-thumbnail="{{ data.artwork_url }}"
data-song-title="{{ data.title }}"
data-song-user="{{ data.user.username }}"
data-song-user-id="{{ data.user.id }}"
data-song-id="{{ data.id }}" >

<i class="fa fa-play"></i>
Expand Down
1 change: 1 addition & 0 deletions app/views/playlists/playlists.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ <h4 class="songList_item_song_user" collapsible>{{ data.title }} playlist - <spa
data-song-thumbnail="{{ tracks.artwork_url }}"
data-song-title="{{ tracks.title }}"
data-song-user="{{ tracks.user.username }}"
data-song-user-id="{{ tracks.user.id }}"
data-song-id="{{ tracks.id }}"
data-play-list="true" >

Expand Down