diff --git a/CHANGELOG.md b/CHANGELOG.md index fc905f9d9..193240e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,8 @@ - Updated ComposeController, add collection support to compose endpoint. ([ec2cfaf5](https://github.com/pixelfed/pixelfed/commit/ec2cfaf5)) - Updated instance config, match default oauth settings in AuthServiceProvider. ([52f25ff1](https://github.com/pixelfed/pixelfed/commit/52f25ff1)) - Updated ComposeModal.vue, fix redirect after posting. Fixes #3254. ([5db64e94](https://github.com/pixelfed/pixelfed/commit/5db64e94)) +- Updated StatusController, redirect status view for authed users to Metro 2.0 UI. ([71dff472](https://github.com/pixelfed/pixelfed/commit/71dff472)) +- Updated ProfileController, redirect profile view for authed users to Metro 2.0 UI. ([7f8129a7](https://github.com/pixelfed/pixelfed/commit/7f8129a7)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 83872b443..7dbda1191 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -26,6 +26,17 @@ class ProfileController extends Controller { public function show(Request $request, $username) { + // redirect authed users to Metro 2.0 + if($request->user()) { + // unless they force static view + if(!$request->has('fs') || $request->input('fs') != '1') { + $pid = AccountService::usernameToId($username); + if($pid) { + return redirect('/i/web/profile/' . $pid); + } + } + } + $user = Profile::whereNull('domain') ->whereNull('status') ->whereUsername($username) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index edea1ea1e..1940390d5 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -31,6 +31,14 @@ class StatusController extends Controller { public function show(Request $request, $username, $id) { + // redirect authed users to Metro 2.0 + if($request->user()) { + // unless they force static view + if(!$request->has('fs') || $request->input('fs') != '1') { + return redirect('/i/web/post/' . $id); + } + } + $user = Profile::whereNull('domain')->whereUsername($username)->firstOrFail(); if($user->status != null) { diff --git a/public/js/compose-chunk.js b/public/js/compose-chunk.js index d8f8bc635..0e914358e 100644 Binary files a/public/js/compose-chunk.js and b/public/js/compose-chunk.js differ diff --git a/public/js/compose.js b/public/js/compose.js index e85f3aec2..0792cc7c4 100644 Binary files a/public/js/compose.js and b/public/js/compose.js differ diff --git a/public/js/home-chunk.js b/public/js/home-chunk.js index e2ee04110..fb454e53b 100644 Binary files a/public/js/home-chunk.js and b/public/js/home-chunk.js differ diff --git a/public/js/post-chunk.js b/public/js/post-chunk.js index ae8c5748d..02e7dbafa 100644 Binary files a/public/js/post-chunk.js and b/public/js/post-chunk.js differ diff --git a/public/js/profile-chunk.js b/public/js/profile-chunk.js index e19ab0684..2106b88e1 100644 Binary files a/public/js/profile-chunk.js and b/public/js/profile-chunk.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 112f25641..6cc789cb0 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ