feat: update theme setting to 'lucentui' in SettingsProvider
This commit is contained in:
@@ -7,7 +7,7 @@ class Theme
|
|||||||
public static function getSettings()
|
public static function getSettings()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$theme = require base_path('themes/' . config('settings.theme', 'default') . '/theme.php');
|
$theme = require base_path('themes/' . config('settings.theme', 'lucentui') . '/theme.php');
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
// If not ran from the command line, throw an exception
|
// If not ran from the command line, throw an exception
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
@@ -20,7 +20,7 @@ class Theme
|
|||||||
// Add theme settings prefix to name <theme_name>_<setting_name>
|
// Add theme settings prefix to name <theme_name>_<setting_name>
|
||||||
$settings = [];
|
$settings = [];
|
||||||
foreach ($theme['settings'] as $setting) {
|
foreach ($theme['settings'] as $setting) {
|
||||||
$setting['name'] = 'theme_' . config('settings.theme', 'default') . '_' . $setting['name'];
|
$setting['name'] = 'theme_' . config('settings.theme', 'lucentui') . '_' . $setting['name'];
|
||||||
$settings[] = $setting;
|
$settings[] = $setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if (!function_exists('theme')) {
|
|||||||
*/
|
*/
|
||||||
function theme($key, $default = null)
|
function theme($key, $default = null)
|
||||||
{
|
{
|
||||||
$current_theme = config('settings.theme', 'default');
|
$current_theme = config('settings.theme', 'lucentui');
|
||||||
|
|
||||||
return config("settings.theme_$current_theme" . "_$key", $default) ?? $default;
|
return config("settings.theme_$current_theme" . "_$key", $default) ?? $default;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class SettingsProvider extends ServiceProvider
|
|||||||
|
|
||||||
date_default_timezone_set(config('settings.timezone', 'UTC'));
|
date_default_timezone_set(config('settings.timezone', 'UTC'));
|
||||||
|
|
||||||
Theme::set(config('settings.theme', 'default'), 'default');
|
Theme::set(config('settings.theme', 'lucentui'));
|
||||||
|
|
||||||
if (Str::startsWith(config('app.url') ?? '', 'https://')) {
|
if (Str::startsWith(config('app.url') ?? '', 'https://')) {
|
||||||
URL::forceScheme('https');
|
URL::forceScheme('https');
|
||||||
|
|||||||
Reference in New Issue
Block a user