mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update Profile, fix unauthenticated private profiles
This commit is contained in:
parent
1a2e41b1e3
commit
9017f7c4e1
4 changed files with 115 additions and 123 deletions
|
@ -47,7 +47,8 @@ class ProfileController extends Controller
|
|||
});
|
||||
|
||||
if ($user->is_private == true) {
|
||||
abort(404);
|
||||
$profile = null;
|
||||
return view('profile.private', compact('user'));
|
||||
}
|
||||
|
||||
$owner = false;
|
||||
|
|
|
@ -703,6 +703,11 @@
|
|||
this.fetchProfile();
|
||||
let u = new URLSearchParams(window.location.search);
|
||||
let forceMetro = localStorage.getItem('pf_metro_ui.exp.forceMetro') == 'true';
|
||||
|
||||
if(u.has('ui') && u.get('ui') == 'moment' && this.layout != 'moment') {
|
||||
this.layout = 'moment';
|
||||
}
|
||||
|
||||
if(forceMetro == true || u.has('ui') && u.get('ui') == 'metro' && this.layout != 'metro') {
|
||||
this.layout = 'metro';
|
||||
}
|
||||
|
@ -739,10 +744,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
if(window.outerWidth < 576) {
|
||||
$('nav.navbar').hide();
|
||||
this.isMobile = true;
|
||||
}
|
||||
},
|
||||
|
||||
updated() {
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
</form>
|
||||
</span>
|
||||
@endif
|
||||
@auth
|
||||
<span class="pl-4">
|
||||
<i class="fas fa-cog fa-lg text-muted cursor-pointer" data-toggle="modal" data-target="#ctxProfileMenu"></i>
|
||||
<div class="modal" tabindex="-1" role="dialog" id="ctxProfileMenu">
|
||||
|
@ -59,21 +60,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</span>
|
||||
@endauth
|
||||
</div>
|
||||
<div class="profile-stats pb-3 d-inline-flex lead">
|
||||
<div class="font-weight-light pr-5">
|
||||
<span class="font-weight-bold">{{$user->statuses()->whereNull('reblog_of_id')->whereNull('in_reply_to_id')->count()}}</span>
|
||||
Posts
|
||||
</div>
|
||||
</div>
|
||||
<p class="lead mb-0">
|
||||
<span class="font-weight-bold">{{$user->name}}</span>
|
||||
@if($user->remote_url)
|
||||
<span class="badge badge-info">REMOTE PROFILE</span>
|
||||
@endif
|
||||
</p>
|
||||
<p class="mb-0 lead">{{$user->bio}}</p>
|
||||
<p class="mb-0"><a href="{{$user->website}}" class="font-weight-bold" rel="me external nofollow noopener" target="_blank">{{str_limit($user->website, 30)}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -81,6 +69,7 @@
|
|||
</div>
|
||||
|
||||
@push('scripts')
|
||||
@auth
|
||||
<script type="text/javascript">
|
||||
function muteProfile() {
|
||||
axios.post('/i/mute', {
|
||||
|
@ -104,4 +93,5 @@
|
|||
}
|
||||
|
||||
</script>
|
||||
@endauth
|
||||
@endpush
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
<div class="container">
|
||||
<div class="profile-timeline mt-2 mt-md-4">
|
||||
<div class="card">
|
||||
<div class="card-body py-5">
|
||||
<p class="text-center lead font-weight-bold mb-0">
|
||||
<div class="">
|
||||
<div class="py-5">
|
||||
<p class="text-center lead font-weight-bold">
|
||||
{{__('profile.privateProfileWarning')}}
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue