diff --git a/database/seeders/AreaSeeder.php b/database/seeders/AreaSeeder.php index 259aaa0..c87df8d 100644 --- a/database/seeders/AreaSeeder.php +++ b/database/seeders/AreaSeeder.php @@ -184,16 +184,16 @@ class AreaSeeder extends Seeder // 'preview' => 'client.groups', // 'icon' => 'ri-book-shelf-line', // ], - [ - 'name' => 'card', - 'valid_segments' => json_encode( - ["top", "header", "footer", "menu", - "parallax", "other", "card", "ads"] - ), - 'max' => 6, - 'preview' => 'client.card', - 'icon' => 'ri-shopping-cart-2-line', - ], +// [ +// 'name' => 'card', +// 'valid_segments' => json_encode( +// ["top", "header", "footer", "menu", +// "parallax", "other", "card", "ads"] +// ), +// 'max' => 6, +// 'preview' => 'client.card', +// 'icon' => 'ri-shopping-cart-2-line', +// ], [ 'name' => 'login', 'valid_segments' => json_encode( diff --git a/resources/js/client-custom/login.js b/resources/js/client-custom/login.js index 4947c0a..e8e3949 100644 --- a/resources/js/client-custom/login.js +++ b/resources/js/client-custom/login.js @@ -5,6 +5,7 @@ function isValidMobile(p) { return regex.test(p); } + document.addEventListener('DOMContentLoaded', function () { document.querySelector('#send-auth-code')?.addEventListener('click', async function () { let url = this.getAttribute('data-route'); diff --git a/resources/views/segments/default-assets/pattern.png b/resources/views/segments/default-assets/pattern.png new file mode 100644 index 0000000..a049dce Binary files /dev/null and b/resources/views/segments/default-assets/pattern.png differ diff --git a/resources/views/segments/default-assets/pattern.svg b/resources/views/segments/default-assets/pattern.svg new file mode 100644 index 0000000..8aa6350 --- /dev/null +++ b/resources/views/segments/default-assets/pattern.svg @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/segments/login/LoginBigBg/LoginBigBg.blade.php b/resources/views/segments/login/LoginBigBg/LoginBigBg.blade.php index f212b63..12f30fa 100644 --- a/resources/views/segments/login/LoginBigBg/LoginBigBg.blade.php +++ b/resources/views/segments/login/LoginBigBg/LoginBigBg.blade.php @@ -1,4 +1,4 @@ -
@csrf diff --git a/resources/views/segments/login/LoginBigBg/LoginBigBg.php b/resources/views/segments/login/LoginBigBg/LoginBigBg.php index aee8a6e..638ef76 100644 --- a/resources/views/segments/login/LoginBigBg/LoginBigBg.php +++ b/resources/views/segments/login/LoginBigBg/LoginBigBg.php @@ -23,6 +23,7 @@ class LoginBigBg } public static function onRemove(Part $part = null) { + Setting::where('key',$part->area->name . '_' . $part->part.'_jpg')->first()?->delete(); } public static function onMount(Part $part = null) diff --git a/resources/views/segments/login/LoginPatternBg/LoginPatternBg.blade.php b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.blade.php new file mode 100644 index 0000000..16f6091 --- /dev/null +++ b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.blade.php @@ -0,0 +1,59 @@ +
+
+ + @csrf +

+ {{$subtitle}} +

+
+ @include('components.err') +
+
+ @if(!config('app.sign.sms')) + + + + + + @else + + +
+ + + + + + + +
+
+ +
+ @endif +
+ +
+
diff --git a/resources/views/segments/login/LoginPatternBg/LoginPatternBg.js b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.js new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/segments/login/LoginPatternBg/LoginPatternBg.json b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.json new file mode 100644 index 0000000..48b3fb9 --- /dev/null +++ b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.json @@ -0,0 +1,10 @@ +{ + "name": "LoginPatternBg", + "version": "1.0", + "author": "xStack", + "email": "xshop@xstack.ir", + "license": "GPL-3.0-or-later", + "url": "https:\/\/xstack.ir", + "author_url": "https:\/\/4xmen.ir", + "packages": [] +} \ No newline at end of file diff --git a/resources/views/segments/login/LoginPatternBg/LoginPatternBg.php b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.php new file mode 100644 index 0000000..e8922fb --- /dev/null +++ b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.php @@ -0,0 +1,57 @@ +section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_color1'; + $setting->value = gfx()['primary']; + $setting->type = 'COLOR'; + $setting->data = json_encode(['name' => 'login-bg-color-1']); + $setting->size = 6; + $setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 1'; + $setting->save(); + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_color2'; + $setting->value = gfx()['secondary']; + $setting->data = json_encode(['name' => 'login-bg-color-2']); + $setting->type = 'COLOR'; + $setting->size = 6; + + $setting->title = $part->area->name . ' ' . $part->part .' second gradiant color 2'; + $setting->save(); + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area->name . '_' . $part->part.'_png'; + $setting->value = null; + $setting->type = 'FILE'; + $setting->size = 12; + $setting->title = $part->area->name . ' ' . $part->part.' background pattern image'; + $setting->save(); + + File::copy(__DIR__.'/../../default-assets/pattern.png',public_path('upload/images/').$part->area->name . '.' . $part->part.'.jpg'); + } + public static function onRemove(Part $part = null) + { + Setting::where('key',$part->area->name . '_' . $part->part.'_png')->first()?->delete(); + Setting::where('key',$part->area->name . '_' . $part->part.'_color1')->first()?->delete(); + Setting::where('key',$part->area->name . '_' . $part->part.'_color2')->first()?->delete(); + + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/login/LoginPatternBg/LoginPatternBg.scss b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.scss new file mode 100644 index 0000000..fd8675f --- /dev/null +++ b/resources/views/segments/login/LoginPatternBg/LoginPatternBg.scss @@ -0,0 +1,31 @@ +#LoginPatternBg { + background: linear-gradient(180deg, var(--login-bg-color-1) 0%, var(--login-bg-color-2) 100%); + //background-size: cover; + //background-position: center; + #login-container{ + height: 90vh; + display: flex; + align-items: center; + justify-content: center; + text-align: center; + background-position: center; + } + + + #login-form{ + max-width: 90%; + width: 450px; + } + #login-content{ + + text-align: start; + padding: 1rem; + background: #ffffff99; + backdrop-filter: blur(4px); + border-radius: var(--xshop-border-radius); + } + + .not-send{ + display: none; + } +} diff --git a/resources/views/segments/login/LoginPatternBg/screenshot.png b/resources/views/segments/login/LoginPatternBg/screenshot.png new file mode 100644 index 0000000..192947b Binary files /dev/null and b/resources/views/segments/login/LoginPatternBg/screenshot.png differ