performance for when not logged in

simple style updates
This commit is contained in:
nelsonlaquet 2013-08-31 21:28:45 -05:00
parent 2d43bf64af
commit 018e880508
6 changed files with 11 additions and 6 deletions

View file

@ -39,7 +39,7 @@
$page = Input::get('page'); $page = Input::get('page');
$query = Playlist::summary() $query = Playlist::summary()
->with('user', 'user.avatar', 'tracks', 'tracks.cover') ->with('user', 'user.avatar', 'tracks', 'tracks.cover', 'tracks.user', 'tracks.album', 'tracks.album.user')
->userDetails() ->userDetails()
->orderBy('created_at', 'desc') ->orderBy('created_at', 'desc')
->where('track_count', '>', 0) ->where('track_count', '>', 0)

View file

@ -99,7 +99,7 @@
'is_favourited' => false 'is_favourited' => false
]; ];
if ($album->users->count()) { if (Auth::check() && $album->users->count()) {
$userRow = $album->users[0]; $userRow = $album->users[0];
$userData = [ $userData = [
'stats' => [ 'stats' => [

View file

@ -71,7 +71,7 @@
'is_favourited' => false 'is_favourited' => false
]; ];
if ($playlist->users->count()) { if (Auth::check() && $playlist->users->count()) {
$userRow = $playlist->users[0]; $userRow = $playlist->users[0];
$userData = [ $userData = [
'stats' => [ 'stats' => [

View file

@ -136,7 +136,7 @@
'is_favourited' => false 'is_favourited' => false
]; ];
if ($track->users->count()) { if (Auth::check() && $track->users->count()) {
$userRow = $track->users[0]; $userRow = $track->users[0];
$userData = [ $userData = [
'stats' => [ 'stats' => [

View file

@ -10,7 +10,7 @@
@yield('styles') @yield('styles')
</head> </head>
<body ng-app="ponyfm" ng-controller="application"> <body ng-app="ponyfm" ng-controller="application" class="{{Auth::check() ? 'is-logged' : ''}}">
@yield('content') @yield('content')
@yield('scripts') @yield('scripts')
</body> </body>

View file

@ -1,8 +1,13 @@
@import-once 'variables'; @import-once 'variables';
@import-once 'mixins'; @import-once 'mixins';
body.is-logged {
.track-player {
margin-right: 75px;
}
}
.track-player { .track-player {
margin-right: 75px;
padding: 10px; padding: 10px;
.image { .image {