Merge pull request #265 from dansup/frontend-ui-refactor

Update status template
This commit is contained in:
daniel 2018-06-14 01:43:34 -06:00 committed by GitHub
commit d7f6a94f4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 10 deletions

View file

@ -41,7 +41,7 @@ class AccountController extends Controller
if(EmailVerification::whereUserId(Auth::id())->count() !== 0) { if(EmailVerification::whereUserId(Auth::id())->count() !== 0) {
return redirect()->back()->with('status', 'A verification email has already been sent! Please check your email.'); return redirect()->back()->with('status', 'A verification email has already been sent! Please check your email.');
} }
$user = User::whereNull('email_verified_at')->find(Auth::id()); $user = User::whereNull('email_verified_at')->find(Auth::id());
$utoken = hash('sha512', $user->id); $utoken = hash('sha512', $user->id);
$rtoken = str_random(40); $rtoken = str_random(40);
@ -60,8 +60,8 @@ class AccountController extends Controller
public function confirmVerifyEmail(Request $request, $userToken, $randomToken) public function confirmVerifyEmail(Request $request, $userToken, $randomToken)
{ {
$verify = EmailVerification::where(DB::raw('BINARY `user_token`'), $userToken) $verify = EmailVerification::where(DB::raw('BINARY user_token'), $userToken)
->where(DB::raw('BINARY `random_token`'), $randomToken) ->where(DB::raw('BINARY random_token'), $randomToken)
->firstOrFail(); ->firstOrFail();
if(Auth::id() === $verify->user_id) { if(Auth::id() === $verify->user_id) {
$user = User::find(Auth::id()); $user = User::find(Auth::id());

View file

@ -74,7 +74,7 @@
</div> </div>
@if($item->comments()->count() > 3) @if($item->comments()->count() > 3)
<div class="more-comments"> <div class="more-comments">
<a class="text-muted" href="#">Load more comments</a> <a class="text-muted" href="{{$item->url()}}">Load more comments</a>
</div> </div>
@endif @endif
<div class="comments"> <div class="comments">
@ -93,12 +93,6 @@
</span> </span>
</p> </p>
@else @else
@foreach($item->comments->reverse()->take(3) as $comment)
<p class="mb-0">
<span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="{{$comment->profile->url()}}">{{$comment->profile->username}}</a></bdi></span>
<span class="comment-text">{!! str_limit($item->rendered ?? e($item->caption), 150) !!}</span>
</p>
@endforeach
@endif @endif
</div> </div>
<div class="timestamp pt-1"> <div class="timestamp pt-1">