File tree 6 files changed +29
-11
lines changed
6 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,7 @@ public function store(Request $request)
427
427
Cache::forget ('profile:status_count: ' .$ profile ->id );
428
428
Cache::forget ('status:transformer:media:attachments: ' .$ status ->id );
429
429
Cache::forget ($ user ->storageUsedKey ());
430
+ Cache::forget ('profile:embed: ' . $ status ->profile_id );
430
431
431
432
return $ status ->url ();
432
433
}
Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ public function privacyStore(Request $request)
74
74
}
75
75
Cache::forget ('profile:settings: ' . $ profile ->id );
76
76
Cache::forget ('user:account:id: ' . $ profile ->user_id );
77
+ Cache::forget ('profile:follower_count: ' . $ profile ->id );
78
+ Cache::forget ('profile:following_count: ' . $ profile ->id );
79
+ Cache::forget ('profile:embed: ' . $ profile ->id );
77
80
return redirect (route ('settings.privacy ' ))->with ('status ' , 'Settings successfully updated! ' );
78
81
}
79
82
Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ public function statuses()
65
65
public function followingCount ($ short = false )
66
66
{
67
67
$ count = Cache::remember ('profile:following_count: ' .$ this ->id , now ()->addMonths (1 ), function () {
68
+ if ($ this ->domain == null && $ this ->user ->settings ->show_profile_following_count == false ) {
69
+ return 0 ;
70
+ }
68
71
$ count = $ this ->following ()->count ();
69
72
if ($ this ->following_count != $ count ) {
70
73
$ this ->following_count = $ count ;
@@ -79,6 +82,9 @@ public function followingCount($short = false)
79
82
public function followerCount ($ short = false )
80
83
{
81
84
$ count = Cache::remember ('profile:follower_count: ' .$ this ->id , now ()->addMonths (1 ), function () {
85
+ if ($ this ->domain == null && $ this ->user ->settings ->show_profile_follower_count == false ) {
86
+ return 0 ;
87
+ }
82
88
$ count = $ this ->followers ()->count ();
83
89
if ($ this ->followers_count != $ count ) {
84
90
$ this ->followers_count = $ count ;
Original file line number Diff line number Diff line change 18
18
<link rel =" apple-touch-icon" type =" image/png" href =" /img/favicon.png?v=2" >
19
19
<link href =" {{ mix (' css/app.css' ) } }" rel =" stylesheet" >
20
20
<style type =" text/css" >
21
- body .embed-card {
21
+ .embed-card {
22
+ display : flex ;
23
+ align-items : center ;
24
+ justify-content : center ;
25
+ width : 100vw ;
26
+ height : 100vh ;
27
+ min-height : 573px ;
22
28
background : #fff !important ;
23
29
margin : 0 ;
24
30
padding-bottom : 0 ;
31
37
</style >
32
38
</head >
33
39
<body class =" bg-white" >
34
- <div class =" embed-card" >
35
- <div class =" card status-card-embed card-md-rounded-0 border card-body border shadow-none rounded-0 d-flex justify-content-center align-items-center " >
40
+ <div class =" embed-card border " >
41
+ <div class =" card status-card-embed card-md-rounded-0 card-body shadow-none rounded-0" >
36
42
<div class =" text-center p-5" >
37
43
<img src =" /img/pixelfed-icon-color.svg" width =" 40px" height =" 40px" >
38
44
<p class =" h2 py-3 font-weight-bold" >Pixelfed</p >
Original file line number Diff line number Diff line change 54
54
<p class =" mb-0 text-muted text-uppercase small font-weight-bold" >Posts</p >
55
55
</div >
56
56
<div class =" text-center" >
57
- <p class =" mb-0 font-weight-bold prettyCount" >{{ $profile -> followers () -> count ( )} } </p >
57
+ <p class =" mb-0 font-weight-bold prettyCount" >{{ $profile -> followerCount ( true )} } </p >
58
58
<p class =" mb-0 text-muted text-uppercase small font-weight-bold" >Followers</p >
59
59
</div >
60
- <div class =" text-center" >
61
- <p class =" mb-0 font-weight-bold prettyCount" >{{ $profile -> following ()-> count ()} } </p >
62
- <p class =" mb-0 text-muted text-uppercase small font-weight-bold" >Following</p >
63
- </div >
64
60
<div class =" text-center" >
65
61
<p class =" mb-0" ><a href =" /i/intent/follow?user={{ $profile -> username } }" class =" btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold" target =" _blank" >Follow</a ></p >
66
62
</div >
Original file line number Diff line number Diff line change 18
18
<link rel =" apple-touch-icon" type =" image/png" href =" /img/favicon.png?v=2" >
19
19
<link href =" {{ mix (' css/app.css' ) } }" rel =" stylesheet" >
20
20
<style type =" text/css" >
21
- body .embed-card {
21
+ .embed-card {
22
+ display : flex ;
23
+ align-items : center ;
24
+ justify-content : center ;
25
+ width : 100vw ;
26
+ height : 100vh ;
27
+ min-height : 573px ;
22
28
background : #fff !important ;
23
29
margin : 0 ;
24
30
padding-bottom : 0 ;
31
37
</style >
32
38
</head >
33
39
<body class =" bg-white" >
34
- <div class =" embed-card" >
35
- <div class =" card status-card-embed card-md-rounded-0 border card-body border shadow-none rounded-0 d-flex justify-content-center align-items-center " >
40
+ <div class =" embed-card border " >
41
+ <div class =" card status-card-embed card-md-rounded-0 card-body shadow-none rounded-0" >
36
42
<div class =" text-center p-5" >
37
43
<img src =" /img/pixelfed-icon-color.svg" width =" 40px" height =" 40px" >
38
44
<p class =" h2 py-3 font-weight-bold" >Pixelfed</p >
You can’t perform that action at this time.
0 commit comments