Point to single source of truth for view name.

This commit is contained in:
James Cole 2024-04-08 07:45:58 +02:00
parent c166b9242e
commit 0e0eeb736f
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
4 changed files with 4 additions and 5 deletions

View File

@ -106,7 +106,7 @@ class ShowController extends Controller
$periods = $this->getAccountPeriodOverview($account, $firstTransaction, $end); $periods = $this->getAccountPeriodOverview($account, $firstTransaction, $end);
// if layout = v2, overrule the page title. // if layout = v2, overrule the page title.
if ('v1' !== config('firefly.layout')) { if ('v1' !== config('view.layout')) {
$subTitle = (string)trans('firefly.all_journals_for_account', ['name' => $account->name]); $subTitle = (string)trans('firefly.all_journals_for_account', ['name' => $account->name]);
} }

View File

@ -70,7 +70,7 @@ abstract class Controller extends BaseController
$logoutUrl = config('firefly.custom_logout_url'); $logoutUrl = config('firefly.custom_logout_url');
// overrule v2 layout back to v1. // overrule v2 layout back to v1.
if ('true' === request()->get('force_default_layout') && 'v2' === config('firefly.layout')) { if ('true' === request()->get('force_default_layout') && 'v2' === config('view.layout')) {
app('view')->getFinder()->setPaths([realpath(base_path('resources/views'))]); // @phpstan-ignore-line app('view')->getFinder()->setPaths([realpath(base_path('resources/views'))]); // @phpstan-ignore-line
} }

View File

@ -206,7 +206,6 @@ return [
// web configuration: // web configuration:
'trusted_proxies' => env('TRUSTED_PROXIES', ''), 'trusted_proxies' => env('TRUSTED_PROXIES', ''),
'layout' => envNonEmpty('FIREFLY_III_LAYOUT', 'v1'),
// map configuration // map configuration
'default_location' => [ 'default_location' => [

View File

@ -72,8 +72,8 @@
</tr> </tr>
<tr> <tr>
<td>Layout</td> <td>Layout</td>
<td>{{ config('firefly.layout') }} <td>{{ config('view.layout') }}
{% if 'v2' == config('firefly.layout') %} {% if 'v2' == config('view.layout') %}
<!-- .eOxNZAmyGz6CXMyf --> <!-- .eOxNZAmyGz6CXMyf -->
{% endif %} {% endif %}
</td> </td>