diff --git a/app/Http/Controllers/TenantCustomizationController.php b/app/Http/Controllers/TenantCustomizationController.php index 522836d..01ede78 100644 --- a/app/Http/Controllers/TenantCustomizationController.php +++ b/app/Http/Controllers/TenantCustomizationController.php @@ -4,6 +4,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; class TenantCustomizationController extends Controller @@ -11,8 +12,12 @@ class TenantCustomizationController extends Controller /** * Custom method for theme customization */ - public function theme(Request $request): View|Factory + public function theme(Request $request): RedirectResponse|View|Factory { + if(tenant('plan') == 'nano') { + return redirect()->route('dashboard')->with('error_message', 'You need to upgrade your plan to access this feature.'); + } + if(is_null($request->input("prefersDarkMode"))) { return view('tenants.customizations.init'); } diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index c0cb989..eb6af69 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,4 +1,4 @@ - +

{{ __('Dashboard') }} @@ -6,6 +6,10 @@
+ @if (session()->has('error_message')) + + @endif {{-- NOTE: we will only check for updates if were on the dashboard route of the central app --}} @if (is_null(tenant('id'))) @if (Route::current()->getName() === 'dashboard') @@ -74,5 +78,4 @@ class="text-orange-500" color="text-pink-500" tooltip-right="Gosh!" /> @yield('content') @endif
- - ayout> +