From 556073534c8e3b3c1569ec3e5e22dcb0ddcb563a Mon Sep 17 00:00:00 2001 From: Tony Lea Date: Fri, 4 Oct 2024 18:57:39 -0400 Subject: [PATCH] updating the .env.example to make sure it doesn't have demo mode on by default. --- wave/src/WaveServiceProvider.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/wave/src/WaveServiceProvider.php b/wave/src/WaveServiceProvider.php index c6a9ae079..b439df46a 100644 --- a/wave/src/WaveServiceProvider.php +++ b/wave/src/WaveServiceProvider.php @@ -269,22 +269,24 @@ protected function setDefaultThemeColors(){ if(config('wave.demo')){ $theme = $this->getActiveTheme(); - if(Cookie::get('theme')){ - $theme_cookied = \DevDojo\Themes\Models\Theme::where('folder', '=', Cookie::get('theme'))->first(); - if(isset($theme_cookied->id)){ - $theme = $theme_cookied; + if(isset($theme->id)){ + if(Cookie::get('theme')){ + $theme_cookied = \DevDojo\Themes\Models\Theme::where('folder', '=', Cookie::get('theme'))->first(); + if(isset($theme_cookied->id)){ + $theme = $theme_cookied; + } } - } - $default_theme_color = match($theme->folder){ - 'anchor' => '#000000', - 'blank' => '#090909', - 'cove' => '#0069ff', - 'drift' => '#000000', - 'fusion' => '#0069ff' - }; + $default_theme_color = match($theme->folder){ + 'anchor' => '#000000', + 'blank' => '#090909', + 'cove' => '#0069ff', + 'drift' => '#000000', + 'fusion' => '#0069ff' + }; - Config::set('wave.primary_color', $default_theme_color); + Config::set('wave.primary_color', $default_theme_color); + } } }