Merge pull request #2757 from pixelfed/staging

Staging
This commit is contained in:
daniel 2021-05-12 22:21:52 -06:00 committed by GitHub
commit f960f63b6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 9 deletions

View File

@ -86,6 +86,7 @@
- Updated Timeline component, change like logic. ([7bcbf96b](https://github.com/pixelfed/pixelfed/commit/7bcbf96b))
- Updated LikeService, fix likedBy method. ([a5e64da6](https://github.com/pixelfed/pixelfed/commit/a5e64da6))
- Updated PublicApiController, increase public timeline to 6 months from 3. ([8a736432](https://github.com/pixelfed/pixelfed/commit/8a736432))
- Updated LikeService, show like count to status owner. ([4408e2ef](https://github.com/pixelfed/pixelfed/commit/4408e2ef))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10)

View File

@ -11,7 +11,6 @@ use App\{
Status,
StatusHashtag,
};
use App\Models\StatusVideo;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -119,7 +118,6 @@ class StatusDelete implements ShouldQueue
->forceDelete();
$tag->delete();
});
StatusVideo::whereStatusId($status->id)->delete();
AccountInterstitial::where('item_type', 'App\Status')
->where('item_id', $status->id)
->delete();

View File

@ -71,9 +71,16 @@ class LikeService {
$id = $like->profile_id;
return [
$res = [
'username' => ProfileService::get($id)['username'],
'others' => $status->likes_count >= 5,
];
if(request()->user()->profile_id == $status->profile_id) {
$res['total_count'] = $status->likes_count;
$res['total_count_pretty'] = number_format($res['total_count']);
}
return $res;
}
}

2
public/js/status.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,8 +26,8 @@
"/js/rempos.js": "/js/rempos.js?id=26c37eace801046187bf",
"/js/rempro.js": "/js/rempro.js?id=99242973aa5063217944",
"/js/search.js": "/js/search.js?id=3ba14b0584cb9d408a3f",
"/js/status.js": "/js/status.js?id=57bec167d0ec302f27b1",
"/js/status.js": "/js/status.js?id=db1fff70d4f8ce0f280c",
"/js/story-compose.js": "/js/story-compose.js?id=5d24aadd2fc69fce6862",
"/js/theme-monokai.js": "/js/theme-monokai.js?id=8842103833ba4861bcfa",
"/js/timeline.js": "/js/timeline.js?id=a1f5f04aa8136634ac68"
"/js/timeline.js": "/js/timeline.js?id=a813f82fabcb46d9a3f6"
}

View File

@ -225,7 +225,7 @@
<span class="like-count">Liked by
<a class="font-weight-bold text-dark" :href="'/'+status.liked_by.username">{{status.liked_by.username}}</a>
<span v-if="status.liked_by.others == true">
and <span class="font-weight-bold text-dark cursor-pointer" @click="likesModal">others</span>
and <span class="font-weight-bold text-dark cursor-pointer" @click="likesModal"><span v-if="status.liked_by.total_count_pretty">{{status.liked_by.total_count_pretty}}</span> others</span>
</span>
</span>
</div>

View File

@ -228,7 +228,7 @@
<span class="like-count">Liked by
<a class="font-weight-bold text-dark" :href="'/'+status.liked_by.username">{{status.liked_by.username}}</a>
<span v-if="status.liked_by.others == true">
and <span class="font-weight-bold">others</span>
and <span class="font-weight-bold" v-if="status.liked_by.total_count_pretty">{{status.liked_by.total_count_pretty}}</span> <span class="font-weight-bold">others</span>
</span>
</span>
</div>