From ad5551ed5eed4587e9f0e000c89f2495f76b51c5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 11 Feb 2019 12:30:56 -0700 Subject: [PATCH 1/2] Update ProfileController --- app/Http/Controllers/ProfileController.php | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 0e9271ab..5440b789 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -66,18 +66,9 @@ class ProfileController extends Controller if ($isPrivate == true || $isBlocked == true) { return view('profile.private', compact('user', 'is_following')); } - $is_admin = is_null($user->domain) ? $user->user->is_admin : false; - $timeline = $user->statuses() - ->whereHas('media') - ->whereNull('in_reply_to_id') - ->whereNull('reblog_of_id') - ->whereIn('visibility', ['public', 'unlisted']) - ->orderBy('created_at', 'desc') - ->withCount(['comments', 'likes']) - ->simplePaginate(21); - - return view('profile.show', compact('user', 'settings', 'owner', 'is_following', 'is_admin', 'timeline')); + $profile = $user; + return view('profile.show', compact('user', 'profile', 'settings', 'owner', 'is_following', 'is_admin', 'timeline')); } public function permalinkRedirect(Request $request, $username) @@ -130,6 +121,7 @@ class ProfileController extends Controller { switch ($profile->status) { case 'disabled': + case 'suspended': case 'delete': return view('profile.disabled'); break; @@ -248,4 +240,13 @@ class ProfileController extends Controller $is_admin = is_null($user->domain) ? $user->user->is_admin : false; return view('profile.show', compact('user', 'settings', 'owner', 'following', 'timeline', 'is_following', 'is_admin')); } + + public function createCollection(Request $request) + { + } + + + public function collections(Request $request) + { + } } From 83a21ff81d3783b2fe723b4354e0e1492fa136f0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 11 Feb 2019 12:33:23 -0700 Subject: [PATCH 2/2] Update profile view --- resources/views/profile/show.blade.php | 110 ++----------------------- 1 file changed, 9 insertions(+), 101 deletions(-) diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index 52ed7284..0d9a3beb 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app',['title' => $user->username . " on " . config('app.name')]) +@extends('layouts.app',['title' => $profile->username . " on " . config('app.name')]) @section('content') @if (session('error')) @@ -6,116 +6,24 @@ {{ session('error') }} @endif -@include('profile.partial.user-info') -@if(true === $owner) -
- -
-@endif -
- @if($owner && request()->is('*/saved')) -
-

{{__('profile.savedWarning')}}

-
- @endif - -
-
- {{$timeline->links()}} -
-
- @else -
-
-
-
- @if($owner && request()->is('*/saved')) -

{{ __('profile.emptySaved') }}

- @else -

{{ __('profile.emptyTimeline') }}

- @endif -
-
-
-
-
- @endif - - + @endsection -@push('meta') - - - @if(false == $settings->crawlable || $user->remote_url) +@push('meta') + + + @if(false == $settings->crawlable || $profile->remote_url) @endif @endpush @push('scripts') + - @endpush -