From fe60d7d4d34f535a9613182111e74984bd0b1e5c Mon Sep 17 00:00:00 2001 From: A1Gard Date: Wed, 11 Dec 2024 23:16:57 +0330 Subject: [PATCH] added button checkbox to homayon menu --- resources/lang/fa.json | 2 +- .../menu/HomayonMenu/HomayonMenu.blade.php | 4 ++++ .../segments/menu/HomayonMenu/HomayonMenu.php | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/resources/lang/fa.json b/resources/lang/fa.json index db94067..fda09f4 100644 --- a/resources/lang/fa.json +++ b/resources/lang/fa.json @@ -524,7 +524,7 @@ "Transports list": "فهرست حمل و نقل‌ها", "Trashed": "حذف شده‌ها", "Trashed items": "موارد قابل بازیافت", - "True": "صحیح", + "True": "بلی", "Type": "نوع", "Unavailable": "ناموجود", "Unit": "واحد", diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php b/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php index 4840a74..7567176 100644 --- a/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php @@ -20,9 +20,13 @@
+ @if(getSetting($data->area_name.'_'.$data->part.'_btn')) {{getSetting($data->area_name.'_'.$data->part.'_title')}} + @else +   + @endif
diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.php b/resources/views/segments/menu/HomayonMenu/HomayonMenu.php index 0e8b09f..85b2d91 100644 --- a/resources/views/segments/menu/HomayonMenu/HomayonMenu.php +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.php @@ -39,7 +39,7 @@ class HomayonMenu $setting->value = '#dddddd'; $setting->type = 'COLOR'; $setting->data = json_encode(['name' => 'homayon-bg']); - $setting->size = 6; + $setting->size = 4; $setting->title = $part->area_name . ' ' . $part->part .' background color'; $setting->save(); @@ -49,11 +49,22 @@ class HomayonMenu $setting->value = gfx()['primary']; $setting->type = 'COLOR'; $setting->data = json_encode(['name' => 'homayon-bg-menu']); - $setting->size = 6; + $setting->size = 4; $setting->title = $part->area_name . ' ' . $part->part .' background color'; $setting->save(); + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_btn'; + $setting->value = 1; + $setting->size = 4; + $setting->type = 'CHECKBOX'; +// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]); + $setting->title = $part->area_name . ' ' . $part->part. ' shop btn'; + $setting->save(); + + File::copy(__DIR__.'/../../default-assets/header-circle.svg',public_path('upload/images/').$part->area_name . '.' . $part->part.'.svg'); @@ -66,6 +77,7 @@ class HomayonMenu Setting::where('key',$part->area_name . '_' . $part->part.'_bg')->first()?->delete(); Setting::where('key',$part->area_name . '_' . $part->part.'_bg2')->first()?->delete(); Setting::where('key',$part->area_name . '_' . $part->part.'_menu')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_btn')->first()?->delete(); } public static function onMount(Part $part = null) {