diff --git a/app/Http/Controllers/App/DashboardController.php b/app/Http/Controllers/App/DashboardController.php index b4694340..922e4b7b 100644 --- a/app/Http/Controllers/App/DashboardController.php +++ b/app/Http/Controllers/App/DashboardController.php @@ -58,6 +58,7 @@ public function index(): View ]; return view('dashboard', [ + 'pageTitle' => trans('linkace.dashboard'), 'recent_links' => $recentLinks, 'recent_tags' => $recentTags, 'recent_lists' => $recentLists, diff --git a/app/Http/Controllers/App/ExportController.php b/app/Http/Controllers/App/ExportController.php index 5fc8aa19..e8952877 100644 --- a/app/Http/Controllers/App/ExportController.php +++ b/app/Http/Controllers/App/ExportController.php @@ -21,7 +21,9 @@ class ExportController extends Controller */ public function getExport(): View { - return view('app.export.export'); + return view('app.export.export', [ + 'pageTitle' => trans('export.export'), + ]); } /** diff --git a/app/Http/Controllers/App/ImportController.php b/app/Http/Controllers/App/ImportController.php index 45e1aa86..71e0a8fe 100644 --- a/app/Http/Controllers/App/ImportController.php +++ b/app/Http/Controllers/App/ImportController.php @@ -18,7 +18,9 @@ class ImportController extends Controller */ public function getImport(): View { - return view('app.import.import'); + return view('app.import.import', [ + 'pageTitle' => trans('import.import'), + ]); } /** diff --git a/app/Http/Controllers/App/SearchController.php b/app/Http/Controllers/App/SearchController.php index 86c84059..fb8eb214 100644 --- a/app/Http/Controllers/App/SearchController.php +++ b/app/Http/Controllers/App/SearchController.php @@ -18,7 +18,9 @@ class SearchController extends Controller */ public function getSearch(): View { - return view('app.search.search') + return view('app.search.search', [ + 'pageTitle' => trans('search.search'), + ]) ->with('results', collect([])) ->with('order_by_options', $this->orderByOptions) ->with('query_settings', [ @@ -47,7 +49,9 @@ public function doSearch(SearchRequest $request): View $search = $this->buildDatabaseQuery($request); $results = $search->paginate(getPaginationLimit()); - return view('app.search.search') + return view('app.search.search', [ + 'pageTitle' => trans('search.results_for') . ' ' . $this->searchQuery, + ]) ->with('results', $results) ->with('order_by_options', $this->orderByOptions) ->with('query_settings', [ diff --git a/app/Http/Controllers/App/SystemSettingsController.php b/app/Http/Controllers/App/SystemSettingsController.php index 89b7782b..3d7417af 100644 --- a/app/Http/Controllers/App/SystemSettingsController.php +++ b/app/Http/Controllers/App/SystemSettingsController.php @@ -22,6 +22,7 @@ class SystemSettingsController extends Controller public function getSystemSettings(): View { return view('app.settings.system', [ + 'pageTitle' => trans('settings.system_settings'), 'linkaceVersion' => UpdateHelper::currentVersion(), ]); } diff --git a/app/Http/Controllers/App/TrashController.php b/app/Http/Controllers/App/TrashController.php index 6063c395..94ec2f3a 100644 --- a/app/Http/Controllers/App/TrashController.php +++ b/app/Http/Controllers/App/TrashController.php @@ -39,6 +39,7 @@ public function index(): View ->get(); return view('app.trash.index', [ + 'pageTitle' => trans('trash.trash'), 'links' => $links, 'lists' => $lists, 'tags' => $tags, diff --git a/app/Http/Controllers/App/UserSettingsController.php b/app/Http/Controllers/App/UserSettingsController.php index 2e314e39..d3bac0d5 100644 --- a/app/Http/Controllers/App/UserSettingsController.php +++ b/app/Http/Controllers/App/UserSettingsController.php @@ -27,6 +27,7 @@ public function getUserSettings(): View $bookmarkletCode = LinkAce::generateBookmarkletCode(); return view('app.settings.user', [ + 'pageTitle' => trans('settings.user_settings'), 'user' => auth()->user(), 'bookmarklet_code' => $bookmarkletCode, ]); diff --git a/app/Http/Controllers/Guest/LinkController.php b/app/Http/Controllers/Guest/LinkController.php index f17ab313..40696c9e 100644 --- a/app/Http/Controllers/Guest/LinkController.php +++ b/app/Http/Controllers/Guest/LinkController.php @@ -32,6 +32,7 @@ public function index(Request $request): View } return view('guest.links.index', [ + 'pageTitle' => trans('link.links'), 'links' => $links->paginate(getPaginationLimit()), 'route' => $request->getBaseUrl(), 'orderBy' => $request->input('orderBy', 'created_at'), diff --git a/app/Http/Controllers/Guest/ListController.php b/app/Http/Controllers/Guest/ListController.php index 9b731ecf..0df62a12 100644 --- a/app/Http/Controllers/Guest/ListController.php +++ b/app/Http/Controllers/Guest/ListController.php @@ -29,6 +29,7 @@ public function index(Request $request): View ->paginate(getPaginationLimit()); return view('guest.lists.index', [ + 'pageTitle' => trans('list.lists'), 'lists' => $lists, 'orderBy' => $request->input('orderBy', 'name'), 'orderDir' => $this->getOrderDirection($request, 'asc'), @@ -54,6 +55,7 @@ public function show(Request $request, int $listID): View )->paginate(getPaginationLimit()); return view('guest.lists.show', [ + 'pageTitle' => trans('list.list') . ': ' . $list->name, 'list' => $list, 'listLinks' => $links, 'route' => $request->getBaseUrl(), diff --git a/app/Http/Controllers/Guest/TagController.php b/app/Http/Controllers/Guest/TagController.php index 633dab21..33eb8f98 100644 --- a/app/Http/Controllers/Guest/TagController.php +++ b/app/Http/Controllers/Guest/TagController.php @@ -29,6 +29,7 @@ public function index(Request $request): View ->paginate(getPaginationLimit()); return view('guest.tags.index', [ + 'pageTitle' => trans('tag.tags'), 'tags' => $tags, 'route' => $request->getBaseUrl(), 'orderBy' => $request->input('orderBy', 'name'), @@ -55,6 +56,7 @@ public function show(Request $request, int $tagID): View )->paginate(getPaginationLimit()); return view('guest.tags.show', [ + 'pageTitle' => trans('tag.tag') . ': ' . $tag->name, 'tag' => $tag, 'tagLinks' => $links, 'route' => $request->getBaseUrl(), diff --git a/app/Http/Controllers/Models/LinkController.php b/app/Http/Controllers/Models/LinkController.php index 920b4f38..531eb04b 100644 --- a/app/Http/Controllers/Models/LinkController.php +++ b/app/Http/Controllers/Models/LinkController.php @@ -41,6 +41,7 @@ public function index(Request $request): View } return view('models.links.index', [ + 'pageTitle' => trans('link.links'), 'links' => $links->paginate(getPaginationLimit()), 'route' => $request->getBaseUrl(), 'orderBy' => $orderBy, @@ -59,6 +60,7 @@ public function create(): View session()->forget('bookmarklet.create'); return view('models.links.create', [ + 'pageTitle' => trans('link.add'), 'existing_link' => null, ]); } @@ -111,6 +113,7 @@ public function store(LinkStoreRequest $request): RedirectResponse public function show(Link $link): View { return view('models.links.show', [ + 'pageTitle' => trans('link.link') . ': ' . $link->shortTitle(), 'link' => $link, 'history' => $link->revisionHistory()->latest()->get(), ]); @@ -125,6 +128,7 @@ public function show(Link $link): View public function edit(Link $link): View { return view('models.links.edit', [ + 'pageTitle' => trans('link.edit') . ': ' . $link->shortTitle(), 'link' => $link, 'existing_link' => null, ]); diff --git a/app/Http/Controllers/Models/ListController.php b/app/Http/Controllers/Models/ListController.php index d904d3cf..d15299da 100644 --- a/app/Http/Controllers/Models/ListController.php +++ b/app/Http/Controllers/Models/ListController.php @@ -42,6 +42,7 @@ public function index(Request $request): View $lists = $lists->paginate(getPaginationLimit()); return view('models.lists.index', [ + 'pageTitle' => trans('list.lists'), 'lists' => $lists, 'route' => $request->getBaseUrl(), 'orderBy' => $orderBy, @@ -56,7 +57,9 @@ public function index(Request $request): View */ public function create(): View { - return view('models.lists.create'); + return view('models.lists.create', [ + 'pageTitle' => trans('list.add'), + ]); } /** @@ -98,6 +101,7 @@ public function show(Request $request, LinkList $list): View )->paginate(getPaginationLimit()); return view('models.lists.show', [ + 'pageTitle' => trans('list.list') . ': ' . $list->name, 'list' => $list, 'listLinks' => $links, 'route' => $request->getBaseUrl(), @@ -114,7 +118,10 @@ public function show(Request $request, LinkList $list): View */ public function edit(LinkList $list): View { - return view('models.lists.edit', ['list' => $list]); + return view('models.lists.edit', [ + 'pageTitle' => trans('list.edit') . ': ' . $list->name, + 'list' => $list, + ]); } /** diff --git a/app/Http/Controllers/Models/NoteController.php b/app/Http/Controllers/Models/NoteController.php index 2d281636..2478b18c 100644 --- a/app/Http/Controllers/Models/NoteController.php +++ b/app/Http/Controllers/Models/NoteController.php @@ -48,7 +48,10 @@ public function edit(Note $note): View abort(403); } - return view('models.notes.edit', ['note' => $note]); + return view('models.notes.edit', [ + 'pageTitle' => trans('note.edit'), + 'note' => $note, + ]); } /** diff --git a/app/Http/Controllers/Models/TagController.php b/app/Http/Controllers/Models/TagController.php index 619af64c..425e693b 100644 --- a/app/Http/Controllers/Models/TagController.php +++ b/app/Http/Controllers/Models/TagController.php @@ -42,6 +42,7 @@ public function index(Request $request): View $tags = $tags->paginate(getPaginationLimit()); return view('models.tags.index', [ + 'pageTitle' => trans('tag.tags'), 'tags' => $tags, 'route' => $request->getBaseUrl(), 'orderBy' => $orderBy, @@ -57,7 +58,9 @@ public function index(Request $request): View */ public function create(): View { - return view('models.tags.create'); + return view('models.tags.create', [ + 'pageTitle' => trans('tag.add'), + ]); } /** @@ -99,6 +102,7 @@ public function show(Request $request, Tag $tag): View ->paginate(getPaginationLimit()); return view('models.tags.show', [ + 'pageTitle' => trans('tag.tag') . ': ' . $tag->name, 'tag' => $tag, 'tagLinks' => $links, 'route' => $request->getBaseUrl(), @@ -115,7 +119,10 @@ public function show(Request $request, Tag $tag): View */ public function edit(Tag $tag): View { - return view('models.tags.edit', ['tag' => $tag]); + return view('models.tags.edit', [ + 'pageTitle' => trans('tag.edit') . ': ' . $tag->name, + 'tag' => $tag, + ]); } /** diff --git a/app/Http/Controllers/Setup/AccountController.php b/app/Http/Controllers/Setup/AccountController.php index 22fb5fc3..66d3535c 100644 --- a/app/Http/Controllers/Setup/AccountController.php +++ b/app/Http/Controllers/Setup/AccountController.php @@ -24,7 +24,9 @@ protected function redirectTo(): string */ public function index(): View { - return view('setup.account'); + return view('setup.account', [ + 'pageTitle' => trans('setup.account_setup'), + ]); } /** diff --git a/app/Http/Controllers/Setup/DatabaseController.php b/app/Http/Controllers/Setup/DatabaseController.php index f67f8f93..04294866 100644 --- a/app/Http/Controllers/Setup/DatabaseController.php +++ b/app/Http/Controllers/Setup/DatabaseController.php @@ -25,7 +25,9 @@ class DatabaseController extends Controller */ public function index(): View { - return view('setup.database'); + return view('setup.database', [ + 'pageTitle' => trans('setup.database_configure'), + ]); } /** diff --git a/app/Http/Controllers/Setup/MetaController.php b/app/Http/Controllers/Setup/MetaController.php index a6fff6a0..2323afce 100644 --- a/app/Http/Controllers/Setup/MetaController.php +++ b/app/Http/Controllers/Setup/MetaController.php @@ -17,7 +17,9 @@ class MetaController extends Controller */ public function welcome(): View { - return view('setup.welcome'); + return view('setup.welcome', [ + 'pageTitle' => trans('setup.setup'), + ]); } /** @@ -30,6 +32,8 @@ public function complete(): View Setting::create(['key' => 'system_setup_completed', 'value' => true]); Cache::forget('systemsettings'); - return view('setup.complete'); + return view('setup.complete', [ + 'pageTitle' => trans('setup.complete'), + ]); } } diff --git a/app/Http/Controllers/Setup/RequirementsController.php b/app/Http/Controllers/Setup/RequirementsController.php index 68163920..b7579283 100644 --- a/app/Http/Controllers/Setup/RequirementsController.php +++ b/app/Http/Controllers/Setup/RequirementsController.php @@ -18,6 +18,7 @@ public function index(): View [$success, $results] = $this->checkRequirements(); return view('setup.requirements', [ + 'pageTitle' => trans('setup.setup_requirements'), 'success' => $success, 'results' => $results, ]); diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index b49e4fab..00120d4e 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -34,23 +34,33 @@ public function boot(): void Fortify::resetUserPasswordsUsing(ResetUserPassword::class); Fortify::loginView(function () { - return view('auth.login'); + return view('auth.login', [ + 'pageTitle' => trans('linkace.login'), + ]); }); Fortify::requestPasswordResetLinkView(function () { - return view('auth.passwords.email'); + return view('auth.passwords.email', [ + 'pageTitle' => trans('linkace.reset_password'), + ]); }); Fortify::resetPasswordView(function () { - return view('auth.passwords.reset'); + return view('auth.passwords.reset', [ + 'pageTitle' => trans('linkace.reset_password'), + ]); }); Fortify::confirmPasswordView(function () { - return view('auth.confirm-password'); + return view('auth.confirm-password', [ + 'pageTitle' => trans('linkace.password_confirm'), + ]); }); Fortify::twoFactorChallengeView(function () { - return view('auth.two-factor-challenge'); + return view('auth.two-factor-challenge', [ + 'pageTitle' => trans('auth.two_factor'), + ]); }); } } diff --git a/lang/de_DE/linkace.php b/lang/de_DE/linkace.php index 278eb1f5..31fad23f 100644 --- a/lang/de_DE/linkace.php +++ b/lang/de_DE/linkace.php @@ -11,6 +11,7 @@ 'logout' => 'Abmelden', 'remember_me' => 'Angemeldet bleiben', 'go_to_dashboard' => 'Zur Übersicht gehen', + 'dashboard' => 'Übersicht', 'system_logs' => 'System Logs', 'reset_password' => 'Passwort zurücksetzen', diff --git a/lang/de_DE/search.php b/lang/de_DE/search.php index c7edd1bb..71a15e25 100644 --- a/lang/de_DE/search.php +++ b/lang/de_DE/search.php @@ -25,6 +25,7 @@ 'order_by.random' => 'Zufällig', 'no_results' => 'Keine Ergebnisse gefunden.', + 'results_for' => 'Ergebnisse für', 'validation_query_missing' => 'Es muss entweder eine Suchanfrage eingeben oder eine Liste oder ein Tag ausgewählt werden, oder die Suche nach kaputten Links muss aktiviert sein.', ]; diff --git a/lang/de_DE/setup.php b/lang/de_DE/setup.php index f03f23a9..e1abb11b 100644 --- a/lang/de_DE/setup.php +++ b/lang/de_DE/setup.php @@ -11,6 +11,7 @@ 'intro.step2' => 'Richten Sie eine Datenbank ein und prüfen Sie, ob die Verbindung erfolgreich ist.', 'intro.step3' => 'Erstellen Sie Ihr Benutzerkonto.', + 'setup_requirements' => 'Setup-Anforderungen', 'check_requirements' => 'Anforderungen prüfen', 'requirements.php_version' => 'PHP-Version >= 7.4.0', 'requirements.extension_bcmath' => 'PHP Extension: BCMath', diff --git a/lang/en_US/linkace.php b/lang/en_US/linkace.php index a35c5115..c38804a6 100644 --- a/lang/en_US/linkace.php +++ b/lang/en_US/linkace.php @@ -11,6 +11,7 @@ 'logout' => 'Logout', 'remember_me' => 'Remember me', 'go_to_dashboard' => 'Go to the Dashboard', + 'dashboard' => 'Dashboard', 'system_logs' => 'System Logs', 'reset_password' => 'Reset Password', diff --git a/lang/en_US/search.php b/lang/en_US/search.php index 5b30960b..27491631 100644 --- a/lang/en_US/search.php +++ b/lang/en_US/search.php @@ -25,6 +25,7 @@ 'order_by.random' => 'Random', 'no_results' => 'No results found.', + 'results_for' => 'Search results for', 'validation_query_missing' => 'You must either enter a search query, or select a list, a tag or enable searching for broken links.', ]; diff --git a/lang/en_US/setup.php b/lang/en_US/setup.php index 48d19cc5..8a4aa028 100644 --- a/lang/en_US/setup.php +++ b/lang/en_US/setup.php @@ -11,6 +11,7 @@ 'intro.step2' => 'Setup up a database and check if the connection is successful.', 'intro.step3' => 'Create your user account.', + 'setup_requirements' => 'Setup Requirements', 'check_requirements' => 'Check Requirements', 'requirements.php_version' => 'PHP version >= 7.4.0', 'requirements.extension_bcmath' => 'PHP Extension: BCMath', diff --git a/resources/views/layouts/setup.blade.php b/resources/views/layouts/setup.blade.php index d25aa515..13338b90 100644 --- a/resources/views/layouts/setup.blade.php +++ b/resources/views/layouts/setup.blade.php @@ -7,7 +7,7 @@ - {{ config('app.name', 'LinkAce') }} + @isset($pageTitle){{$pageTitle}} - @endisset{{ config('app.name', 'LinkAce') }} diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index 0ba6fe7d..43c50404 100644 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -2,7 +2,7 @@ -{{ systemsettings('system_page_title') ?: config('app.name', 'LinkAce') }} +@isset($pageTitle){{$pageTitle}} - @endisset{{ systemsettings('system_page_title') ?: config('app.name', 'LinkAce') }} @stack('html-header') @include('partials.favicon')