Various code cleanup and fixed alignments.

This commit is contained in:
James Cole
2024-01-01 14:43:56 +01:00
parent 1368aafe5f
commit f963ac63f1
443 changed files with 3668 additions and 3672 deletions

View File

@@ -66,25 +66,25 @@ abstract class Controller extends BaseController
app('view')->share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === config('firefly.allow_webhooks'));
// share custom auth guard info.
$authGuard = config('firefly.authentication_guard');
$logoutUrl = config('firefly.custom_logout_url');
$authGuard = config('firefly.authentication_guard');
$logoutUrl = config('firefly.custom_logout_url');
app('view')->share('authGuard', $authGuard);
app('view')->share('logoutUrl', $logoutUrl);
// upload size
$maxFileSize = app('steam')->phpBytes((string)ini_get('upload_max_filesize'));
$maxPostSize = app('steam')->phpBytes((string)ini_get('post_max_size'));
$uploadSize = min($maxFileSize, $maxPostSize);
$maxFileSize = app('steam')->phpBytes((string)ini_get('upload_max_filesize'));
$maxPostSize = app('steam')->phpBytes((string)ini_get('post_max_size'));
$uploadSize = min($maxFileSize, $maxPostSize);
app('view')->share('uploadSize', $uploadSize);
// share is alpha, is beta
$isAlpha = false;
$isAlpha = false;
if (str_contains(config('firefly.version'), 'alpha')) {
$isAlpha = true;
}
$isBeta = false;
$isBeta = false;
if (str_contains(config('firefly.version'), 'beta')) {
$isBeta = true;
}
@@ -94,7 +94,7 @@ abstract class Controller extends BaseController
$this->middleware(
function ($request, $next): mixed {
$locale = app('steam')->getLocale();
$locale = app('steam')->getLocale();
// translations for specific strings:
$this->monthFormat = (string)trans('config.month_js', [], $locale);
$this->monthAndDayFormat = (string)trans('config.month_and_day_js', [], $locale);