From 654c8d1c46f466f0ff07417c97322f67caf447b7 Mon Sep 17 00:00:00 2001 From: tabuna Date: Mon, 8 Apr 2024 00:42:49 +0300 Subject: [PATCH] Stantartization names --- composer.json | 3 +- config/{platform.php => orchid.php} | 18 ++--- resources/views/app.blade.php | 20 +++--- resources/views/auth.blade.php | 8 +-- resources/views/auth/impersonation.blade.php | 4 +- resources/views/auth/lockme.blade.php | 2 +- resources/views/auth/login.blade.php | 8 +-- .../views/components/notification.blade.php | 6 +- resources/views/components/stream.blade.php | 2 +- resources/views/dashboard.blade.php | 16 ++--- resources/views/errors/404.blade.php | 2 +- resources/views/fields/cropper.blade.php | 2 +- resources/views/fields/matrix.blade.php | 4 +- resources/views/fields/picture.blade.php | 2 +- resources/views/fields/relation.blade.php | 2 +- resources/views/fields/upload.blade.php | 2 +- resources/views/footer.blade.php | 25 ++++--- resources/views/layouts/base.blade.php | 6 +- resources/views/layouts/pagination.blade.php | 4 +- resources/views/layouts/sortable.blade.php | 2 +- resources/views/layouts/table.blade.php | 2 +- resources/views/partials/layouts/th.blade.php | 2 +- resources/views/partials/profile.blade.php | 2 +- .../views/partials/result-compact.blade.php | 2 +- resources/views/partials/result.blade.php | 2 +- resources/views/partials/search.blade.php | 2 +- .../views/partials/update-assets.blade.php | 2 +- resources/views/workspace/compact.blade.php | 4 +- resources/views/workspace/full.blade.php | 4 +- routes/auth.php | 2 +- routes/{dashboard.php => orchid.php} | 6 +- src/Access/Impersonation.php | 2 +- src/Access/RoleAccess.php | 4 +- src/Access/StatusAccess.php | 4 +- src/Access/UserAccess.php | 4 +- src/Attachment/Attachable.php | 4 +- src/Attachment/File.php | 10 +-- src/Attachment/Models/Attachment.php | 6 +- src/Platform/Commands/AdminCommand.php | 8 +-- src/Platform/Commands/ChartCommand.php | 4 +- src/Platform/Commands/FilterCommand.php | 4 +- src/Platform/Commands/InstallCommand.php | 6 +- src/Platform/Commands/ListenerCommand.php | 4 +- src/Platform/Commands/PresenterCommand.php | 4 +- src/Platform/Commands/RowsCommand.php | 4 +- src/Platform/Commands/ScreenCommand.php | 4 +- src/Platform/Commands/SelectionCommand.php | 4 +- src/Platform/Commands/TabMenuCommand.php | 4 +- src/Platform/Commands/TableCommand.php | 4 +- src/Platform/Components/Notification.php | 4 +- src/Platform/Components/Stream.php | 2 +- .../Http/Controllers/AttachmentController.php | 6 +- .../Http/Controllers/IndexController.php | 4 +- .../Http/Controllers/LoginController.php | 10 +-- .../Http/Layouts/NotificationTable.php | 2 +- src/Platform/Http/Layouts/SearchLayout.php | 6 +- src/Platform/Http/Middleware/Access.php | 10 +-- .../Http/Screens/NotificationScreen.php | 4 +- src/Platform/Http/Screens/SearchScreen.php | 12 ++-- src/Platform/ItemPermission.php | 35 +++++++++- src/Platform/Models/User.php | 4 +- src/Platform/{Dashboard.php => Orchid.php} | 35 +++++----- src/Platform/OrchidServiceProvider.php | 41 ++++++------ .../Providers/ConsoleServiceProvider.php | 26 ++++---- .../Providers/FoundationServiceProvider.php | 13 ++-- .../Providers/PlatformServiceProvider.php | 20 +++--- .../Providers/RouteServiceProvider.php | 37 ++++++----- src/Screen/Action.php | 2 +- src/Screen/Actions/Button.php | 6 +- src/Screen/Actions/DropDown.php | 2 +- src/Screen/Actions/Link.php | 2 +- src/Screen/Actions/Menu.php | 2 +- src/Screen/Actions/ModalToggle.php | 2 +- src/Screen/Components/Popover.php | 2 +- src/Screen/Field.php | 6 +- src/Screen/Fields/Attach.php | 2 +- src/Screen/Fields/CheckBox.php | 2 +- src/Screen/Fields/Code.php | 2 +- src/Screen/Fields/Cropper.php | 2 +- src/Screen/Fields/DateRange.php | 2 +- src/Screen/Fields/DateTimer.php | 2 +- src/Screen/Fields/Group.php | 2 +- src/Screen/Fields/Input.php | 2 +- src/Screen/Fields/Label.php | 2 +- src/Screen/Fields/Map.php | 2 +- src/Screen/Fields/Matrix.php | 2 +- src/Screen/Fields/NumberRange.php | 2 +- src/Screen/Fields/Password.php | 2 +- src/Screen/Fields/Picture.php | 6 +- src/Screen/Fields/Quill.php | 2 +- src/Screen/Fields/Radio.php | 2 +- src/Screen/Fields/RadioButtons.php | 2 +- src/Screen/Fields/Range.php | 2 +- src/Screen/Fields/Relation.php | 2 +- src/Screen/Fields/Select.php | 2 +- src/Screen/Fields/SimpleMDE.php | 2 +- src/Screen/Fields/Switcher.php | 2 +- src/Screen/Fields/TextArea.php | 2 +- src/Screen/Fields/TimeZone.php | 2 +- src/Screen/Fields/UTM.php | 2 +- src/Screen/Fields/Upload.php | 6 +- src/Screen/Layouts/Accordion.php | 2 +- src/Screen/Layouts/Blank.php | 2 +- src/Screen/Layouts/Block.php | 2 +- src/Screen/Layouts/Browsing.php | 2 +- src/Screen/Layouts/Card.php | 2 +- src/Screen/Layouts/Chart.php | 2 +- src/Screen/Layouts/Columns.php | 2 +- src/Screen/Layouts/Facepile.php | 2 +- src/Screen/Layouts/Legend.php | 2 +- src/Screen/Layouts/Listener.php | 8 +-- src/Screen/Layouts/Metric.php | 2 +- src/Screen/Layouts/Modal.php | 8 +-- src/Screen/Layouts/Persona.php | 2 +- src/Screen/Layouts/Rows.php | 2 +- src/Screen/Layouts/Selection.php | 4 +- src/Screen/Layouts/Sortable.php | 2 +- src/Screen/Layouts/Split.php | 2 +- src/Screen/Layouts/TabMenu.php | 2 +- src/Screen/Layouts/Table.php | 2 +- src/Screen/Layouts/Tabs.php | 2 +- src/Screen/Screen.php | 16 ++--- src/Screen/Sight.php | 2 +- src/Screen/TD.php | 6 +- .../Facades/{Dashboard.php => Orchid.php} | 8 +-- .../Layouts/Examples/ExampleElements.php | 8 +-- .../Layouts/Examples/TabMenuExample.php | 4 +- stubs/app/Orchid/PlatformProvider.php | 30 +++------ .../Orchid/Screens/User/UserListScreen.php | 2 +- stubs/app/Providers/OrchidServiceProvider.php | 24 +++++++ stubs/app/routes/{platform.php => orchid.php} | 66 +++++++++---------- tests/App/ExemplarServiceProvider.php | 10 +-- tests/Console/ArtisanTest.php | 4 +- tests/Environment.php | 4 +- tests/Feature/App/RouteResolveScreenTest.php | 10 +-- tests/Feature/Example/UserTest.php | 2 +- tests/Feature/Platform/AuthTest.php | 4 +- .../Feature/Platform/FallbackDisabledTest.php | 4 +- .../Feature/Platform/FallbackEnabledTest.php | 4 +- tests/Feature/Platform/GuardAuthTest.php | 4 +- tests/Unit/DashboardTest.php | 32 ++++----- tests/Unit/LocaleTest.php | 14 ++-- tests/Unit/PermissionTest.php | 8 +-- tests/Unit/PublishedResourceTest.php | 8 +-- 144 files changed, 492 insertions(+), 443 deletions(-) rename config/{platform.php => orchid.php} (96%) rename routes/{dashboard.php => orchid.php} (94%) rename src/Platform/{Dashboard.php => Orchid.php} (93%) rename src/Support/Facades/{Dashboard.php => Orchid.php} (89%) create mode 100644 stubs/app/Providers/OrchidServiceProvider.php rename stubs/app/routes/{platform.php => orchid.php} (66%) diff --git a/composer.json b/composer.json index 273b5b01ed..ac00709daf 100644 --- a/composer.json +++ b/composer.json @@ -88,7 +88,8 @@ ], "aliases": { "Alert": "Orchid\\Support\\Facades\\Alert", - "Dashboard": "Orchid\\Support\\Facades\\Dashboard" + "Orchid": "Orchid\\Support\\Facades\\Orchid", + "Dashboard": "Orchid\\Support\\Facades\\Orchid" } } }, diff --git a/config/platform.php b/config/orchid.php similarity index 96% rename from config/platform.php rename to config/orchid.php index c044da558a..62651b7ecd 100644 --- a/config/platform.php +++ b/config/orchid.php @@ -16,7 +16,7 @@ | */ - 'domain' => env('DASHBOARD_DOMAIN', null), + 'domain' => env('ORCHID_DOMAIN', null), /* |-------------------------------------------------------------------------- @@ -25,11 +25,11 @@ | | This prefix method can be used to specify the prefix of every route in | the administrator dashboard. This way, you can easily change the path - | to a URL you find more appropriate. For instance: '/', '/admin', or '/panel'. + | to a URL you find more appropriate. For instance: '/', '/admin', or '/orchid'. | */ - 'prefix' => env('DASHBOARD_PREFIX', '/admin'), + 'prefix' => env('ORCHID_PREFIX', '/admin'), /* |-------------------------------------------------------------------------- @@ -46,7 +46,7 @@ 'middleware' => [ 'public' => ['web', 'cache.headers:private;must_revalidate;etag'], - 'private' => ['web', 'platform', 'cache.headers:private;must_revalidate;etag'], + 'private' => ['web', 'orchid', 'cache.headers:private;must_revalidate;etag'], ], /* @@ -95,11 +95,11 @@ | redirected to this page when they enter the dashboard or click on the | dashboard's logo or links. | - | Example: 'platform.main' + | Example: 'orchid.main' | */ - 'index' => 'platform.main', + 'index' => 'orchid.main', /* |-------------------------------------------------------------------------- @@ -185,7 +185,7 @@ */ 'attachment' => [ - 'disk' => env('DASHBOARD_FILESYSTEM_DISK', 'public'), + 'disk' => env('ORCHID_FILESYSTEM_DISK', 'public'), 'generator' => \Orchid\Attachment\Engines\Generator::class, ], @@ -286,11 +286,11 @@ | It determines whether the entire user screen will be used or whether | the content will be compressed to a fixed width. | - | Options: 'platform::workspace.compact', 'platform::workspace.full' + | Options: 'orchid::workspace.compact', 'orchid::workspace.full' | */ - 'workspace' => 'platform::workspace.compact', + 'workspace' => 'orchid::workspace.compact', /* |-------------------------------------------------------------------------- diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index b23dbd572b..f1f84e2ebc 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -21,12 +21,12 @@ @stack('head') - - - - + + + + - @if(!config('platform.turbo.cache', false)) + @if(!config('orchid.turbo.cache', false)) @endif @@ -34,18 +34,18 @@ - @foreach(Dashboard::getResource('stylesheets') as $stylesheet) + @foreach(Orchid::getResource('stylesheets') as $stylesheet) @endforeach @stack('stylesheets') - @foreach(Dashboard::getResource('scripts') as $scripts) + @foreach(Orchid::getResource('scripts') as $scripts) @endforeach - @if(!empty(config('platform.vite', []))) - @vite(config('platform.vite')) + @if(!empty(config('orchid.vite', []))) + @vite(config('orchid.vite')) @endif @@ -62,7 +62,7 @@ - @include('platform::partials.toast') + @include('orchid::partials.toast') @stack('scripts') diff --git a/resources/views/auth.blade.php b/resources/views/auth.blade.php index e8b8b27c89..e9f725f84e 100644 --- a/resources/views/auth.blade.php +++ b/resources/views/auth.blade.php @@ -1,4 +1,4 @@ -@extends('platform::app') +@extends('orchid::app') @section('body') @@ -6,8 +6,8 @@
diff --git a/resources/views/auth/impersonation.blade.php b/resources/views/auth/impersonation.blade.php index cb202b30c0..b113de91ee 100644 --- a/resources/views/auth/impersonation.blade.php +++ b/resources/views/auth/impersonation.blade.php @@ -1,4 +1,4 @@ -@extends('platform::auth') +@extends('orchid::auth') @section('title',__('Access Denied: Viewing as Another User')) @section('content') @@ -9,7 +9,7 @@ data-controller="form" data-form-need-prevents-form-abandonment-value="false" data-action="form#submit" - action="{{ route('platform.switch.logout') }}"> + action="{{ route('orchid.switch.logout') }}"> @csrf

diff --git a/resources/views/auth/lockme.blade.php b/resources/views/auth/lockme.blade.php index e8fd3be672..bdad9b5ab4 100644 --- a/resources/views/auth/lockme.blade.php +++ b/resources/views/auth/lockme.blade.php @@ -29,7 +29,7 @@

diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index aaa1ffae1c..34a90f9fbc 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,4 +1,4 @@ -@extends('platform::auth') +@extends('orchid::auth') @section('title',__('Sign in to your account')) @section('content') @@ -10,10 +10,10 @@ data-controller="form" data-form-need-prevents-form-abandonment-value="false" data-action="form#submit" - action="{{ route('platform.login.auth') }}"> + action="{{ route('orchid.login.auth') }}"> @csrf - @includeWhen($isLockUser,'platform::auth.lockme') - @includeWhen(!$isLockUser,'platform::auth.signin') + @includeWhen($isLockUser,'orchid::auth.lockme') + @includeWhen(!$isLockUser,'orchid::auth.signin') @endsection diff --git a/resources/views/components/notification.blade.php b/resources/views/components/notification.blade.php index b597217a48..346c33f192 100644 --- a/resources/views/components/notification.blade.php +++ b/resources/views/components/notification.blade.php @@ -1,10 +1,10 @@ - diff --git a/resources/views/components/stream.blade.php b/resources/views/components/stream.blade.php index 9dba6a0b16..1e1287055b 100644 --- a/resources/views/components/stream.blade.php +++ b/resources/views/components/stream.blade.php @@ -1,4 +1,4 @@ -@props(['target', 'action', 'push', 'rule' => \Orchid\Support\Facades\Dashboard::isPartialRequest()]) +@props(['target', 'action', 'push', 'rule' => \Orchid\Support\Facades\Orchid::isPartialRequest()]) @if(filter_var($rule, FILTER_VALIDATE_BOOLEAN)) diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 16a80a473a..2c11985b21 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,4 +1,4 @@ -@extends(config('platform.workspace', 'platform::workspace.compact')) +@extends(config('orchid.workspace', 'orchid::workspace.compact')) @section('aside')
@@ -10,17 +10,17 @@ @yield('title') - - @includeFirst([config('platform.template.header'), 'platform::header']) + + @includeFirst([config('orchid.template.header'), 'orchid::header'])
- @include('platform::partials.alert') + @include('orchid::partials.alert') @yield('content') @endsection diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 3a546fda34..7957dca245 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -1,4 +1,4 @@ -@extends('platform::dashboard') +@extends('orchid::dashboard') @section('title', '404') @section('description', __("You requested a page that doesn't exist.")) diff --git a/resources/views/fields/cropper.blade.php b/resources/views/fields/cropper.blade.php index f53edebef4..5366ac3d5b 100644 --- a/resources/views/fields/cropper.blade.php +++ b/resources/views/fields/cropper.blade.php @@ -1,7 +1,7 @@ @component($typeForm, get_defined_vars())
@foreach($value as $key => $row) - @include('platform::partials.fields.matrixRow',['row' => $row, 'key' => $key]) + @include('orchid::partials.fields.matrixRow',['row' => $row, 'key' => $key]) @endforeach @@ -31,7 +31,7 @@ diff --git a/resources/views/fields/picture.blade.php b/resources/views/fields/picture.blade.php index c120a9c48c..fcd9e1f523 100644 --- a/resources/views/fields/picture.blade.php +++ b/resources/views/fields/picture.blade.php @@ -1,7 +1,7 @@ @component($typeForm, get_defined_vars())

Crafted with - - - + + + - by Alexandr Chernyaev

+ by Alexandr Chernyaev +

@@ -17,10 +20,14 @@

@else @@ -28,7 +35,7 @@

{{ __('The application code is published under the MIT license.') }} 2016 - {{date('Y')}}
- {{ __('Version') }}: {{\Orchid\Platform\Dashboard::VERSION}} + {{ __('Version') }}: {{\Orchid\Platform\Orchid::VERSION}}

diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 6d09e27699..fb99391bc9 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -1,4 +1,4 @@ -@extends('platform::dashboard') +@extends('orchid::dashboard') @section('title', (string) __($name)) @section('description', (string) __($description)) @@ -33,7 +33,7 @@ class="mb-md-4 h-100" > {!! $layouts !!} @csrf - @include('platform::partials.confirm') + @include('orchid::partials.confirm')
@@ -43,5 +43,5 @@ class="mb-md-4 h-100" >
- @includeWhen(isset($state), 'platform::partials.state') + @includeWhen(isset($state), 'orchid::partials.state') @endsection diff --git a/resources/views/layouts/pagination.blade.php b/resources/views/layouts/pagination.blade.php index b1cc5f2e89..31eeb20b15 100644 --- a/resources/views/layouts/pagination.blade.php +++ b/resources/views/layouts/pagination.blade.php @@ -34,14 +34,14 @@ class="btn btn-sm btn-link dropdown-toggle p-0 m-0" {!! $paginator->appends(request() ->except(['page','_token'])) - ->links('platform::partials.pagination') + ->links('orchid::partials.pagination') !!} @elseif($paginator instanceof \Illuminate\Contracts\Pagination\Paginator) {!! $paginator->appends(request() ->except(['page','_token'])) ->onEachSide($onEachSide ?? 3) - ->links('platform::partials.pagination') + ->links('orchid::partials.pagination') !!} @endif
diff --git a/resources/views/layouts/sortable.blade.php b/resources/views/layouts/sortable.blade.php index 51d22862a2..37d87f6ef9 100644 --- a/resources/views/layouts/sortable.blade.php +++ b/resources/views/layouts/sortable.blade.php @@ -14,7 +14,7 @@ data-controller="sortable" data-sortable-selector-value=".reorder-handle" data-sortable-model-value="{{ get_class($rows->first()) }}" - data-sortable-action-value="{{ route('platform.systems.sorting') }}" + data-sortable-action-value="{{ route('orchid.systems.sorting') }}" data-sortable-success-message-value="{{ $successSortMessage }}" data-sortable-failure-message-value="{{ $failureSortMessage }}" class="list-group"> diff --git a/resources/views/layouts/table.blade.php b/resources/views/layouts/table.blade.php index f7df4bd583..0ae6abe822 100644 --- a/resources/views/layouts/table.blade.php +++ b/resources/views/layouts/table.blade.php @@ -73,7 +73,7 @@ @else - @include('platform::layouts.pagination',[ + @include('orchid::layouts.pagination',[ 'paginator' => $rows, 'columns' => $columns, 'onEachSide' => $onEachSide, diff --git a/resources/views/partials/layouts/th.blade.php b/resources/views/partials/layouts/th.blade.php index ff2660fd4d..894d593e25 100644 --- a/resources/views/partials/layouts/th.blade.php +++ b/resources/views/partials/layouts/th.blade.php @@ -1,7 +1,7 @@
- @includeWhen($filter !== null, "platform::partials.layouts.filter", ['filter' => $filter]) + @includeWhen($filter !== null, "orchid::partials.layouts.filter", ['filter' => $filter]) @if($sort) - + @if($image = Auth::user()->presenter()->image()) {{ Auth::user()->presenter()->title()}} @endif diff --git a/resources/views/partials/result-compact.blade.php b/resources/views/partials/result-compact.blade.php index f02d7eb973..1393215ea6 100644 --- a/resources/views/partials/result-compact.blade.php +++ b/resources/views/partials/result-compact.blade.php @@ -33,7 +33,7 @@ @if($total >= 5) - + {{ __('See more results.') }} ({{ $total }}) diff --git a/resources/views/partials/result.blade.php b/resources/views/partials/result.blade.php index c0fb7799ba..d3ac93404f 100644 --- a/resources/views/partials/result.blade.php +++ b/resources/views/partials/result.blade.php @@ -39,7 +39,7 @@
@includeWhen($results instanceof \Illuminate\Contracts\Pagination\Paginator && $results->isNotEmpty(), - 'platform::layouts.pagination', + 'orchid::layouts.pagination', ['paginator' => $results] )
diff --git a/resources/views/partials/search.blade.php b/resources/views/partials/search.blade.php index e0deee0f16..f6348765ea 100644 --- a/resources/views/partials/search.blade.php +++ b/resources/views/partials/search.blade.php @@ -1,4 +1,4 @@ -@empty(!Dashboard::getSearch()->all()) +@empty(!Orchid::getSearch()->all())