kopia lustrzana https://github.com/pixelfed/pixelfed
commit
a68d7652e8
|
@ -68,6 +68,17 @@ class ProfileController extends Controller
|
|||
}
|
||||
$is_admin = is_null($user->domain) ? $user->user->is_admin : false;
|
||||
$profile = $user;
|
||||
$settings = [
|
||||
'crawlable' => $settings->crawlable,
|
||||
'following' => [
|
||||
'count' => $settings->show_profile_following_count,
|
||||
'list' => $settings->show_profile_following
|
||||
],
|
||||
'followers' => [
|
||||
'count' => $settings->show_profile_follower_count,
|
||||
'list' => $settings->show_profile_followers
|
||||
]
|
||||
];
|
||||
return view('profile.show', compact('user', 'profile', 'settings', 'owner', 'is_following', 'is_admin'));
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,7 +6,7 @@
|
|||
"/js/components.js": "/js/components.js?id=fe7e6d95339a03a9b03f",
|
||||
"/js/discover.js": "/js/discover.js?id=75fb12b06ee23fa05186",
|
||||
"/js/micro.js": "/js/micro.js?id=178479fb6990f8806257",
|
||||
"/js/profile.js": "/js/profile.js?id=dce4efc17bd33c44997c",
|
||||
"/js/profile.js": "/js/profile.js?id=9b4b7d662fb70fb48856",
|
||||
"/js/status.js": "/js/status.js?id=d3866ac390bc28d9bcc1",
|
||||
"/js/timeline.js": "/js/timeline.js?id=8a3d417eb838a7219cc9"
|
||||
}
|
||||
|
|
|
@ -38,13 +38,13 @@
|
|||
Posts
|
||||
</a>
|
||||
</div>
|
||||
<div class="font-weight-light pr-5">
|
||||
<div v-if="profileSettings.followers.count" class="font-weight-light pr-5">
|
||||
<a class="text-dark cursor-pointer" v-on:click="followersModal()">
|
||||
<span class="font-weight-bold">{{profile.followers_count}}</span>
|
||||
Followers
|
||||
</a>
|
||||
</div>
|
||||
<div class="font-weight-light pr-5">
|
||||
<div v-if="profileSettings.following.count" class="font-weight-light pr-5">
|
||||
<a class="text-dark cursor-pointer" v-on:click="followingModal()">
|
||||
<span class="font-weight-bold">{{profile.following_count}}</span>
|
||||
Following
|
||||
|
@ -318,7 +318,8 @@
|
|||
<script type="text/javascript">
|
||||
export default {
|
||||
props: [
|
||||
'profile-id'
|
||||
'profile-id',
|
||||
'profile-settings'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
|
@ -671,6 +672,9 @@ export default {
|
|||
},
|
||||
|
||||
followingModal() {
|
||||
if(this.profileSettings.following.list == false) {
|
||||
return;
|
||||
}
|
||||
if(this.following.length > 0) {
|
||||
this.$refs.followingModal.show();
|
||||
return;
|
||||
|
@ -691,6 +695,9 @@ export default {
|
|||
},
|
||||
|
||||
followersModal() {
|
||||
if(this.profileSettings.followers.list == false) {
|
||||
return;
|
||||
}
|
||||
if(this.followers.length > 0) {
|
||||
this.$refs.followerModal.show();
|
||||
return;
|
||||
|
|
Ładowanie…
Reference in New Issue