commit
c74b45da7a
|
@ -7,6 +7,7 @@
|
|||
|
||||
### Metro 2.0 UI
|
||||
- Added UI Settings modal and fixed height media previews setting ([f2467e71](https://github.com/pixelfed/pixelfed/commit/f2467e71))
|
||||
- Set max-width of 1440px for larger screens ([af68872a](https://github.com/pixelfed/pixelfed/commit/af68872a))
|
||||
|
||||
### Added
|
||||
- Manual email verification requests. ([bc659387](https://github.com/pixelfed/pixelfed/commit/bc659387))
|
||||
|
@ -68,7 +69,8 @@
|
|||
- Updated Webfinger, fixes #3050. ([ff7ee3bd](https://github.com/pixelfed/pixelfed/commit/ff7ee3bd))
|
||||
- Updated status api, autolink caption before returning response. ([b00a453b](https://github.com/pixelfed/pixelfed/commit/b00a453b))
|
||||
- Updated Timeline, add new ui promo in timelines that can be hidden using localstorage. ([e13959ae](https://github.com/pixelfed/pixelfed/commit/e13959ae))
|
||||
- Update FederationController, increase webfinger cache ttl from 12 hours to 14 days. ([745c3580](https://github.com/pixelfed/pixelfed/commit/745c3580))
|
||||
- Updated FederationController, increase webfinger cache ttl from 12 hours to 14 days. ([745c3580](https://github.com/pixelfed/pixelfed/commit/745c3580))
|
||||
- Updated DiscoverController, add yearly option and increase limit from 15 to 30 posts. ([10b6058c](https://github.com/pixelfed/pixelfed/commit/10b6058c))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
|
|
|
@ -117,18 +117,22 @@ class DiscoverController extends Controller
|
|||
abort_if(config('instance.discover.public') == false && !Auth::check(), 403);
|
||||
|
||||
$this->validate($request, [
|
||||
'range' => 'nullable|string|in:daily,monthly'
|
||||
'range' => 'nullable|string|in:daily,monthly,yearly',
|
||||
]);
|
||||
|
||||
$range = $request->input('range') == 'monthly' ? 31 : 1;
|
||||
$range = $request->input('range');
|
||||
$days = $range == 'monthly' ? 31 : ($range == 'daily' ? 1 : 365);
|
||||
$ttls = [
|
||||
1 => 1500,
|
||||
31 => 14400,
|
||||
365 => 86400
|
||||
];
|
||||
$key = ':api:discover:trending:v2.12:range:' . $days;
|
||||
|
||||
$key = ':api:discover:trending:v2.8:range:' . $range;
|
||||
$ttl = now()->addMinutes(15);
|
||||
|
||||
$ids = Cache::remember($key, $ttl, function() use($range) {
|
||||
$days = $range == 1 ? 2 : 31;
|
||||
$ids = Cache::remember($key, $ttls[$days], function() use($days) {
|
||||
$min_id = SnowflakeService::byDate(now()->subDays($days));
|
||||
return Status::select(
|
||||
return DB::table('statuses')
|
||||
->select(
|
||||
'id',
|
||||
'scope',
|
||||
'type',
|
||||
|
@ -146,7 +150,7 @@ class DiscoverController extends Controller
|
|||
])
|
||||
->whereIsNsfw(false)
|
||||
->orderBy('likes_count','desc')
|
||||
->take(15)
|
||||
->take(30)
|
||||
->pluck('id');
|
||||
});
|
||||
|
||||
|
@ -155,7 +159,10 @@ class DiscoverController extends Controller
|
|||
$res = $ids->map(function($s) {
|
||||
return StatusService::get($s);
|
||||
})->filter(function($s) use($filtered) {
|
||||
return $s && !in_array($s['account']['id'], $filtered);
|
||||
return
|
||||
$s &&
|
||||
!in_array($s['account']['id'], $filtered) &&
|
||||
isset($s['account']);
|
||||
})->values();
|
||||
|
||||
return response()->json($res);
|
||||
|
|
2
public/js/spa.js
vendored
2
public/js/spa.js
vendored
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
|||
"/js/rempos.js": "/js/rempos.js?id=2ef46b249c6390aa4ef8",
|
||||
"/js/rempro.js": "/js/rempro.js?id=3971b84aef886204d286",
|
||||
"/js/search.js": "/js/search.js?id=dc888b173463dc3894ba",
|
||||
"/js/spa.js": "/js/spa.js?id=644bcc4d820f98ac07f6",
|
||||
"/js/spa.js": "/js/spa.js?id=9a82217c3a305738e70a",
|
||||
"/js/status.js": "/js/status.js?id=49fd7ac5b254220021f9",
|
||||
"/js/stories.js": "/js/stories.js?id=f882708d5f00b4738dd7",
|
||||
"/js/story-compose.js": "/js/story-compose.js?id=0f9d2f7ce5e63ef14c6a",
|
||||
|
|
Loading…
Reference in a new issue