From ebe08b777de2e31092b53495f573435a1e90104e Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 16 Oct 2023 13:22:22 +0300 Subject: [PATCH 1/2] allow to show or hide presets --- config/zeus-bolt.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/zeus-bolt.php b/config/zeus-bolt.php index a150ba0f..7dea92e9 100644 --- a/config/zeus-bolt.php +++ b/config/zeus-bolt.php @@ -38,4 +38,6 @@ 'uploadDisk' => 'public', 'uploadDirectory' => 'forms', + + 'show_presets' => false, ]; From 2f85343e88447f031ffd9e60808a742322932abf Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 16 Oct 2023 14:08:30 +0300 Subject: [PATCH 2/2] allow to hide design tab --- config/zeus-bolt.php | 2 ++ src/Concerns/Schemata.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/zeus-bolt.php b/config/zeus-bolt.php index 7dea92e9..849ace2d 100644 --- a/config/zeus-bolt.php +++ b/config/zeus-bolt.php @@ -40,4 +40,6 @@ 'uploadDirectory' => 'forms', 'show_presets' => false, + + 'allow_design' => false, ]; diff --git a/src/Concerns/Schemata.php b/src/Concerns/Schemata.php index 0ec0d84e..d0dfeaf5 100644 --- a/src/Concerns/Schemata.php +++ b/src/Concerns/Schemata.php @@ -225,7 +225,7 @@ public static function getTabsSchema(): array Tabs\Tab::make('design') ->label(__('Design')) - ->visible(fn (): bool => class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class)) + ->visible(fn (): bool => class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class) && config('zeus-bolt.allow_design')) ->schema([ ViewField::make('options.primary_color') ->view('zeus::filament.components.color-picker'),