From f55e7ca3c9c4a67c457318c3747b685dbfb38ddc Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 19 Oct 2023 15:24:48 +0100 Subject: [PATCH] User Account: Ensured page titles for pages and api tokens --- app/Api/UserApiTokenController.php | 6 ++++++ app/Users/Controllers/UserAccountController.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/app/Api/UserApiTokenController.php b/app/Api/UserApiTokenController.php index b77e39089..3606e8260 100644 --- a/app/Api/UserApiTokenController.php +++ b/app/Api/UserApiTokenController.php @@ -22,6 +22,8 @@ class UserApiTokenController extends Controller $user = User::query()->findOrFail($userId); + $this->setPageTitle(trans('settings.user_api_token_create')); + return view('users.api-tokens.create', [ 'user' => $user, 'back' => $this->getRedirectPath($user), @@ -74,6 +76,8 @@ class UserApiTokenController extends Controller [$user, $token] = $this->checkPermissionAndFetchUserToken($userId, $tokenId); $secret = session()->pull('api-token-secret:' . $token->id, null); + $this->setPageTitle(trans('settings.user_api_token')); + return view('users.api-tokens.edit', [ 'user' => $user, 'token' => $token, @@ -111,6 +115,8 @@ class UserApiTokenController extends Controller { [$user, $token] = $this->checkPermissionAndFetchUserToken($userId, $tokenId); + $this->setPageTitle(trans('settings.user_api_token_delete')); + return view('users.api-tokens.delete', [ 'user' => $user, 'token' => $token, diff --git a/app/Users/Controllers/UserAccountController.php b/app/Users/Controllers/UserAccountController.php index 2ff58ffac..6bf23df47 100644 --- a/app/Users/Controllers/UserAccountController.php +++ b/app/Users/Controllers/UserAccountController.php @@ -40,6 +40,8 @@ class UserAccountController extends Controller */ public function showProfile() { + $this->setPageTitle(trans('preferences.profile')); + return view('users.account.profile', [ 'model' => user(), 'category' => 'profile',