mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 22:47:59 +01:00
performance for when not logged in
simple style updates
This commit is contained in:
parent
2d43bf64af
commit
018e880508
6 changed files with 11 additions and 6 deletions
|
@ -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)
|
||||||
|
|
|
@ -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' => [
|
||||||
|
|
|
@ -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' => [
|
||||||
|
|
|
@ -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' => [
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue