|
@@ -18,15 +18,15 @@ class SinglePageController extends Controller
|
|
|
{
|
|
|
event(new ScanForNewReleaseCalled());
|
|
|
|
|
|
- $settings = Settings::all()->toJson();
|
|
|
- $proxyAuth = config('auth.defaults.guard') === 'reverse-proxy-guard' ? true : false;
|
|
|
- $proxyLogoutUrl = config('2fauth.config.proxyLogoutUrl') ? config('2fauth.config.proxyLogoutUrl') : false;
|
|
|
- $subdir = config('2fauth.config.appSubdirectory') ? '/' . config('2fauth.config.appSubdirectory') : '';
|
|
|
- $userPreferences = Auth::user()->preferences ?? collect(config('2fauth.preferences')); /** @phpstan-ignore-line */
|
|
|
- $isDemoApp = config('2fauth.config.isDemoApp') ? 'true' : 'false';
|
|
|
- $isTestingApp = config('2fauth.config.isTestingApp') ? 'true' : 'false';
|
|
|
- $lang = App::getLocale();
|
|
|
- $locales = collect(config('2fauth.locales'))->toJson(); /** @phpstan-ignore-line */
|
|
|
+ $settings = Settings::all()->toJson();
|
|
|
+ $proxyAuth = config('auth.defaults.guard') === 'reverse-proxy-guard' ? true : false;
|
|
|
+ $proxyLogoutUrl = config('2fauth.config.proxyLogoutUrl') ? config('2fauth.config.proxyLogoutUrl') : false;
|
|
|
+ $subdir = config('2fauth.config.appSubdirectory') ? '/' . config('2fauth.config.appSubdirectory') : '';
|
|
|
+ $defaultPreferences = collect(config('2fauth.preferences')); /** @phpstan-ignore-line */
|
|
|
+ $isDemoApp = config('2fauth.config.isDemoApp') ? 'true' : 'false';
|
|
|
+ $isTestingApp = config('2fauth.config.isTestingApp') ? 'true' : 'false';
|
|
|
+ $lang = App::getLocale();
|
|
|
+ $locales = collect(config('2fauth.locales'))->toJson(); /** @phpstan-ignore-line */
|
|
|
|
|
|
// if (Auth::user()->preferences)
|
|
|
|
|
@@ -37,12 +37,12 @@ class SinglePageController extends Controller
|
|
|
'proxyLogoutUrl' => $proxyLogoutUrl,
|
|
|
'subdirectory' => $subdir,
|
|
|
])->toJson(),
|
|
|
- 'userPreferences' => $userPreferences,
|
|
|
- 'subdirectory' => $subdir,
|
|
|
- 'isDemoApp' => $isDemoApp,
|
|
|
- 'isTestingApp' => $isTestingApp,
|
|
|
- 'lang' => $lang,
|
|
|
- 'locales' => $locales,
|
|
|
+ 'defaultPreferences' => $defaultPreferences,
|
|
|
+ 'subdirectory' => $subdir,
|
|
|
+ 'isDemoApp' => $isDemoApp,
|
|
|
+ 'isTestingApp' => $isTestingApp,
|
|
|
+ 'lang' => $lang,
|
|
|
+ 'locales' => $locales,
|
|
|
]);
|
|
|
}
|
|
|
}
|