From b6d9cbeb2700ac0eafdacad7fa5b592bf9a50779 Mon Sep 17 00:00:00 2001 From: SadElephant Date: Fri, 12 Jan 2024 11:51:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20+=20=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=86=D0=B0=20=D0=BA=D0=BB=D1=8E=D1=87=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/NotificationsController.php | 4 - .../Screens/Examples/ExampleActionsScreen.php | 182 ----------- .../Screens/Examples/ExampleCardsScreen.php | 86 ----- .../Screens/Examples/ExampleChartsScreen.php | 102 ------ .../Examples/ExampleFieldsAdvancedScreen.php | 299 ------------------ .../Screens/Examples/ExampleFieldsScreen.php | 275 ---------------- .../Screens/Examples/ExampleGridScreen.php | 89 ------ .../Screens/Examples/ExampleLayoutsScreen.php | 86 ----- app/Orchid/Screens/Examples/ExampleScreen.php | 175 ---------- .../Examples/ExampleTextEditorsScreen.php | 84 ----- app/Orchid/Screens/Idea/ListScreen.php | 1 + app/Orchid/Screens/Position/EditScreen.php | 11 +- app/Orchid/Screens/Position/ListScreen.php | 2 +- app/Orchid/Screens/Post/ListScreen.php | 2 +- public/img/ui/key.svg | 53 ++++ resources/views/idea/base.blade.php | 83 ----- resources/views/idea/index.blade.php | 163 +++++++--- resources/views/idea/key.blade.php | 77 +++-- resources/views/positions/edit.blade.php | 6 +- resources/views/post/edit.blade.php | 16 +- resources/views/profile/edit.blade.php | 5 +- routes/platform.php | 17 - 22 files changed, 249 insertions(+), 1569 deletions(-) delete mode 100644 app/Orchid/Screens/Examples/ExampleActionsScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleCardsScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleChartsScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleFieldsAdvancedScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleFieldsScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleGridScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleLayoutsScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleScreen.php delete mode 100644 app/Orchid/Screens/Examples/ExampleTextEditorsScreen.php create mode 100644 public/img/ui/key.svg delete mode 100644 resources/views/idea/base.blade.php diff --git a/app/Http/Controllers/NotificationsController.php b/app/Http/Controllers/NotificationsController.php index 45f024d9..c4c4d2b4 100644 --- a/app/Http/Controllers/NotificationsController.php +++ b/app/Http/Controllers/NotificationsController.php @@ -18,12 +18,8 @@ class NotificationsController extends Controller public function index(Request $request) { - //$request->user()->notify(new IdeaRequestAcceptedNotification(IdeaKey::find(1))); - - //$request->user()->notify(new ReplyCommentNotification(User::find(1), Comment::find(29), Post::find(56))); $notifications = $request->user() ->notifications() - //->orderBy('read_at') ->orderBy('created_at') ->cursorPaginate(5); diff --git a/app/Orchid/Screens/Examples/ExampleActionsScreen.php b/app/Orchid/Screens/Examples/ExampleActionsScreen.php deleted file mode 100644 index 35547fa1..00000000 --- a/app/Orchid/Screens/Examples/ExampleActionsScreen.php +++ /dev/null @@ -1,182 +0,0 @@ -method('buttonClickProcessing')->type(Color::PRIMARY), - Button::make('Secondary')->method('buttonClickProcessing')->type(Color::SECONDARY), - Button::make('Success')->method('buttonClickProcessing')->type(Color::SUCCESS), - Button::make('Danger')->method('buttonClickProcessing')->type(Color::DANGER), - Button::make('Warning')->method('buttonClickProcessing')->type(Color::WARNING), - Button::make('Info')->method('buttonClickProcessing')->type(Color::INFO), - Button::make('Light')->method('buttonClickProcessing')->type(Color::LIGHT), - Button::make('Dark')->method('buttonClickProcessing')->type(Color::DARK), - Button::make('Default')->method('buttonClickProcessing')->type(Color::BASIC), - Button::make('Link')->method('buttonClickProcessing')->type(Color::LINK), - ])->autoWidth(), - - Group::make([ - Link::make('Basic Link')->href('#'), - Link::make('Open new window')->href('#')->target('_blank'), - Link::make('Download File')->href('#')->download(), - ])->autoWidth(), - ]), - - Layout::block(Layout::rows([ - Group::make([ - DropDown::make('Dropdown for Buttons') - ->icon('bs.three-dots-vertical') - ->list([ - Button::make('Action')->method('buttonClickProcessing'), - Button::make('Another action')->method('buttonClickProcessing'), - Button::make('Something else here')->method('buttonClickProcessing'), - ]), - - DropDown::make('Dropdown for Links') - ->icon('bs.three-dots-vertical') - ->list([ - Link::make('Action')->href('#'), - Link::make('Another action')->href('#'), - Link::make('Something else here')->href('#'), - ]), - ])->autoWidth(), - ])) - ->title('Dropdowns') - ->description('Contextual overlays for displaying lists of links and buttons'), - - Layout::block(Layout::rows([ - Group::make([ - Button::make('Submit')->type(Color::PRIMARY)->disabled(), - Button::make('Submit')->disabled(), - ])->autoWidth(), - ])) - ->title('Disabled state') - ->description('A disabled button is unusable and un-clickable.'), - - Layout::block(Layout::rows([ - Button::make('Submit') - ->method('buttonClickProcessing') - ->confirm('Communicating the consequences of the decision.'), - ])) - ->title('Confirm Dialog') - ->description('Confirm Dialog is a modal Dialog used to confirm user actions.'), - - Layout::block(Layout::rows([ - Button::make('Button') - ->icon('bs.box-arrow-up-right') - ->method('buttonClickProcessing'), - ])) - ->title('Icons Button') - ->description('This type of button is often used to save space on a user interface and make the action more visually appealing.'), - - Layout::block(Layout::rows([ - Button::make('Download') - ->icon('bs.download') - ->method('export') - ->rawClick(), - ])) - ->title('Download Button') - ->description('This button is typically used when a user wants to download a file, such as a document or an image, to their local device.'), - - Layout::block(Layout::rows([ - Button::make('Google') - ->action('https://google.com'), - ])) - ->title('Custom Route') - ->description('The form is always sent by POST request, but the endpoint can be defined'), - - ]; - } - - /** - * @return void - */ - public function buttonClickProcessing(): void - { - Toast::warning('Click Processing'); - } - - /** - * @return \Symfony\Component\HttpFoundation\StreamedResponse - */ - public function export() - { - return response()->streamDownload(function () { - $csv = tap(fopen('php://output', 'wb'), function ($csv) { - fputcsv($csv, ['header:col1', 'header:col2', 'header:col3']); - }); - - collect([ - ['row1:col1', 'row1:col2', 'row1:col3'], - ['row2:col1', 'row2:col2', 'row2:col3'], - ['row3:col1', 'row3:col2', 'row3:col3'], - ])->each(function (array $row) use ($csv) { - fputcsv($csv, $row); - }); - - return tap($csv, function ($csv) { - fclose($csv); - }); - }, 'File-name.csv'); - } -} diff --git a/app/Orchid/Screens/Examples/ExampleCardsScreen.php b/app/Orchid/Screens/Examples/ExampleCardsScreen.php deleted file mode 100644 index 02e81448..00000000 --- a/app/Orchid/Screens/Examples/ExampleCardsScreen.php +++ /dev/null @@ -1,86 +0,0 @@ - User::firstOrFail(), - ]; - } - - /** - * The name of the screen displayed in the header. - */ - public function name(): ?string - { - return 'Cards'; - } - - /** - * Display header description. - */ - public function description(): ?string - { - return 'A comprehensive guide to the design and implementation of cards, including basic and advanced features.'; - } - - /** - * The screen's action buttons. - * - * @return Action[] - */ - public function commandBar(): iterable - { - return []; - } - - /** - * The screen's layout elements. - * - * @throws \Throwable - * - * @return array - */ - public function layout(): iterable - { - return [ - Layout::legend('user', [ - Sight::make('id')->popover('Identifier, a symbol which uniquely identifies an object or record'), - Sight::make('name'), - Sight::make('email'), - Sight::make('email_verified_at', 'Email Verified')->render(fn (User $user) => $user->email_verified_at === null - ? ' False' - : ' True'), - Sight::make('created_at', 'Created'), - Sight::make('updated_at', 'Updated'), - Sight::make('Simple Text')->render(fn () => 'This is a wider card with supporting text below as a natural lead-in to additional content.'), - Sight::make('Action')->render(fn () => Button::make('Show toast') - ->type(Color::BASIC) - ->method('showToast')), - ])->title('User'), - ]; - } - - public function showToast(Request $request): void - { - Toast::warning($request->get('toast', 'Hello, world! This is a toast message.')); - } -} diff --git a/app/Orchid/Screens/Examples/ExampleChartsScreen.php b/app/Orchid/Screens/Examples/ExampleChartsScreen.php deleted file mode 100644 index 08d56f4f..00000000 --- a/app/Orchid/Screens/Examples/ExampleChartsScreen.php +++ /dev/null @@ -1,102 +0,0 @@ - [ - [ - 'name' => 'Some Data', - 'values' => [25, 40, 30, 35, 8, 52, 17], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - [ - 'name' => 'Another Set', - 'values' => [25, 50, -10, 15, 18, 32, 27], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - [ - 'name' => 'Yet Another', - 'values' => [15, 20, -3, -15, 58, 12, -17], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - [ - 'name' => 'And Last', - 'values' => [10, 33, -8, -3, 70, 20, -34], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - ], - ]; - } - - /** - * The name of the screen displayed in the header. - */ - public function name(): ?string - { - return 'Charts'; - } - - /** - * Display header description. - */ - public function description(): ?string - { - return 'A comprehensive guide to creating and customizing various types of charts, including bar, line, and pie charts.'; - } - - /** - * The screen's action buttons. - * - * @return \Orchid\Screen\Action[] - */ - public function commandBar(): iterable - { - return []; - } - - /** - * The screen's layout elements. - * - * @throws \Throwable - * - * @return string[]|\Orchid\Screen\Layout[] - */ - public function layout(): iterable - { - return [ - ChartLineExample::make('charts', 'Actions with a Tweet') - ->description('The total number of interactions a user has with a tweet. This includes all clicks on any links in the tweet (including hashtags, links, avatar, username, and expand button), retweets, replies, likes, and additions to the read list.'), - - Layout::columns([ - ChartLineExample::make('charts', 'Line Chart') - ->description('Visualize data trends with multi-colored line graphs.'), - ChartBarExample::make('charts', 'Bar Chart') - ->description('Compare data sets with colorful bar graphs.'), - ]), - - Layout::columns([ - ChartPercentageExample::make('charts', 'Percentage Chart') - ->description('Display data as visually appealing and modern percentage graphs.'), - - ChartPieExample::make('charts', 'Pie Chart') - ->description('Break down data into easy-to-understand pie graphs with modern design.'), - ]), - ]; - } -} diff --git a/app/Orchid/Screens/Examples/ExampleFieldsAdvancedScreen.php b/app/Orchid/Screens/Examples/ExampleFieldsAdvancedScreen.php deleted file mode 100644 index cf85ec5f..00000000 --- a/app/Orchid/Screens/Examples/ExampleFieldsAdvancedScreen.php +++ /dev/null @@ -1,299 +0,0 @@ - 'Hello! We collected all the fields in one place', - 'place' => [ - 'lat' => 37.181244855427394, - 'lng' => -3.6021993309259415, - ], - ]; - } - - /** - * The name of the screen displayed in the header. - */ - public function name(): ?string - { - return 'Advanced Form Controls'; - } - - /** - * Display header description. - */ - public function description(): ?string - { - return 'Examples for creating a wide variety of forms.'; - } - - /** - * The screen's action buttons. - * - * @return Action[] - */ - public function commandBar(): iterable - { - return []; - } - - /** - * The screen's layout elements. - * - * @throws \Throwable - * - * @return \Orchid\Screen\Layout[] - */ - public function layout(): iterable - { - return [ - - ExampleElements::class, - Layout::rows([ - - UTM::make('link') - ->title('UTM link') - ->help('Generated UTM link'), - - Matrix::make('matrix') - ->columns([ - 'Attribute', - 'Value', - 'Units', - ]), - - Map::make('place') - ->title('Object on the map') - ->help('Enter the coordinates, or use the search'), - - ]), - - Layout::rows([ - - Group::make([ - Input::make('phone') - ->mask('(999) 999-9999') - ->title('Phone') - ->placeholder('Enter phone number') - ->help('Number Phone'), - - Input::make('ip_location') - ->title('IP location:') - ->placeholder('Enter location') - ->help('Specifies an location in IPv4 format') - ->mask([ - 'alias' => 'ip', - ]), - - Input::make('license_plate') - ->title('License plate:') - ->mask([ - 'mask' => '[9-]AAA-999', - ]), - ]), - - Group::make([ - - Input::make('credit_card') - ->mask('9999-9999-9999-9999') - ->title('Credit card:') - ->placeholder('Credit card number') - ->help('Number is the long set of digits displayed across the front your plastic card'), - - Input::make('currency') - ->title('Currency dollar:') - ->mask([ - 'alias' => 'currency', - ])->help('Some aliases found in the extensions are: email, currency, decimal, integer, date, datetime, dd/mm/yyyy, etc.'), - - Input::make('currency') - ->title('Currency euro:') - ->mask([ - 'mask' => '€ 999.999.999,99', - 'numericInput' => true, - ]), - ]), - - ])->title('Input mask'), - - Layout::rows([ - - Group::make([ - DateTimer::make('open') - ->title('Opening date') - ->help('The opening event will take place'), - - DateTimer::make('allowInput') - ->title('Allow input') - ->required() - ->allowInput(), - - DateTimer::make('enabledTime') - ->title('Enabled time') - ->enableTime(), - ]), - - Group::make([ - DateTimer::make('AllowEmpty') - ->title('Allow Empty') - ->allowEmpty(), - - DateTimer::make('AvailableDates') - ->title('Available Dates') - ->available([ - now(), - now()->addDays(2), - now()->addDays(3), - ]), - - DateTimer::make('AvailableDatesPeriod') - ->title('Available Dates Period') - ->available([ - ['from' => now(), 'to' => now()->addWeek()], - ]), - ]), - - Group::make([ - DateTimer::make('format24hr') - ->title('Format 24hr') - ->enableTime() - ->format24hr(), - - DateTimer::make('custom') - ->title('Custom format') - ->noCalendar() - ->format('h:i K'), - - DateRange::make('rangeDate') - ->title('Range date'), - ]), - - ])->title('DateTime'), - - Layout::columns([ - Layout::rows([ - Select::make('robot.') - ->options([ - 'index' => 'Index', - 'noindex' => 'No index', - ]) - ->multiple() - ->title('Multiple select') - ->help('Allow search bots to index'), - - Relation::make('user') - ->fromModel(User::class, 'name') - ->title('Select for Eloquent model'), - ])->title('Select'), - Layout::rows([ - - Group::make([ - CheckBox::make('free-checkbox') - ->sendTrueOrFalse() - ->title('Free checkbox') - ->placeholder('Event for free') - ->help('Event for free'), - - Switcher::make('free-switch') - ->sendTrueOrFalse() - ->title('Free switch') - ->placeholder('Event for free') - ->help('Event for free'), - ]), - - RadioButtons::make('radioButtons') - ->options([ - 1 => 'Enabled', - 0 => 'Disabled', - 3 => 'Pause', - 4 => 'Work', - ]) - ->help('Radio buttons are normally presented in radio groups'), - - ])->title('Status'), - ]), - - Layout::rows([ - Group::make([ - Range::make('range') - ->title('Example range') - ->max(5) - ->min(0) - ->step(1) - ->help('The track and thumb are both styled to appear the same across browsers.'), - - Range::make('range_disabled') - ->title('Disabled range') - ->disabled(), - ]), - ])->title('Range'), - - Layout::rows([ - - Input::make('raw_file') - ->type('file') - ->title('File input example') - ->horizontal(), - - Input::make('raw_files') - ->type('file') - ->title('Multiple files input example') - ->multiple() - ->horizontal(), - - Picture::make('picture') - ->title('Picture') - ->horizontal(), - - Cropper::make('cropper') - ->title('Cropper') - ->width(500) - ->height(300) - ->horizontal(), - - Upload::make('files') - ->title('Upload files') - ->horizontal(), - - Upload::make('files_with_catalog') - ->title('Upload with catalog') - ->media() - ->closeOnAdd() - ->horizontal(), - - ])->title('File upload'), - - ]; - } -} diff --git a/app/Orchid/Screens/Examples/ExampleFieldsScreen.php b/app/Orchid/Screens/Examples/ExampleFieldsScreen.php deleted file mode 100644 index 8545b7ef..00000000 --- a/app/Orchid/Screens/Examples/ExampleFieldsScreen.php +++ /dev/null @@ -1,275 +0,0 @@ - 'Hello! We collected all the fields in one place', - ]; - } - - /** - * The name of the screen displayed in the header. - */ - public function name(): ?string - { - return 'Form Controls'; - } - - /** - * Display header description. - */ - public function description(): ?string - { - return 'A comprehensive guide to basic form controls, including input fields, buttons, checkboxes, and radio buttons.'; - } - - /** - * The screen's action buttons. - * - * @return Action[] - */ - public function commandBar(): iterable - { - return []; - } - - /** - * The screen's layout elements. - * - * @return \Orchid\Screen\Layout[] - */ - public function layout(): iterable - { - return [ - - ExampleElements::class, - Layout::rows([ - Input::make('test') - ->title('Text') - ->value('Artisanal kale') - ->help('Basic single-line text fields.') - ->horizontal(), - - Input::make('search') - ->type('search') - ->title('Search') - ->value('How do I shoot web') - ->help('Text fields designed for the user to enter search queries into.') - ->horizontal(), - - Input::make('email') - ->type('email') - ->title('Email') - ->value('bootstrap@example.com') - ->help('Used to let the user enter and edit an e-mail location') - ->horizontal(), - - Input::make('url') - ->type('url') - ->title('Url') - ->value('https://getbootstrap.com') - ->horizontal() - ->help('You might use this when asking to input their website location for a business directory'), - - Input::make('tel') - ->type('tel') - ->title('Telephone') - ->value('1-(555)-555-5555') - ->horizontal() - ->popover('The device’s autocomplete mechanisms kick in and suggest - phone numbers that can be autofilled with a single tap.') - ->help('Focusing input on a telephone field brings up - a numeric keypad ready for keying in a number.'), - - Input::make('password') - ->type('password') - ->title('Password') - ->value('Password') - ->horizontal(), - - Input::make('number') - ->type('number') - ->title('Number') - ->value(42) - ->horizontal(), - - Input::make('date_and_time') - ->type('datetime-local') - ->title('Date and time') - ->value('2011-08-19T13:45:00') - ->horizontal(), - - Input::make('date') - ->type('date') - ->title('Date') - ->value('2011-08-19') - ->horizontal(), - - Input::make('month') - ->type('month') - ->title('Month') - ->value('2011-08') - ->horizontal(), - - Input::make('week') - ->type('week') - ->title('Week') - ->value('2011-W33') - ->horizontal(), - - Input::make('Time') - ->type('time') - ->title('Time') - ->value('13:45:00') - ->horizontal(), - - Input::make('datalist') - ->title('Datalist example') - ->help('Most browsers include some support for "datalist" - elements, their styling is inconsistent at best.') - ->datalist([ - 'San Francisco', - 'New York', - 'Seattle', - 'Los Angeles', - 'Chicago', - ]) - ->horizontal(), - - Input::make('color') - ->type('color') - ->title('Color') - ->value('#563d7c') - ->horizontal(), - - Button::make('Submit') - ->method('buttonClickProcessing') - ->type(Color::BASIC), - - ]), //->title('Textual HTML5 Inputs'), - - Layout::columns([ - Layout::rows([ - - Input::make('name') - ->title('Full Name:') - ->placeholder('Enter full name') - ->required() - ->help('Please enter your full name'), - - Input::make('email') - ->title('Email location') - ->placeholder('Email location') - ->help("We'll never share your email with anyone else.") - ->popover('Tooltip - hint that user opens himself.'), - - Password::make('password') - ->title('Password') - ->placeholder('Password'), - - Label::make('static') - ->title('Static:') - ->value('email@example.com'), - - Select::make('select') - ->title('Select') - ->options([1, 2]), - - CheckBox::make('checkbox') - ->title('Checkbox') - ->placeholder('Remember me'), - - Radio::make('radio') - ->placeholder('Yes') - ->value(1) - ->title('Radio'), - - Radio::make('radio') - ->placeholder('No') - ->value(0), - - TextArea::make('textarea') - ->title('Example textarea') - ->rows(6), - - ])->title('Base Controls'), - Layout::rows([ - Input::make('disabled_input') - ->title('Disabled Input') - ->placeholder('Disabled Input') - ->help('A disabled input element is unusable and un-clickable.') - ->disabled(), - - Select::make('disabled_select') - ->title('Disabled select') - ->options([1, 2]) - ->value(0) - ->disabled(), - - TextArea::make('disabled_textarea') - ->title('Disabled textarea') - ->placeholder('Disabled textarea') - ->rows(6) - ->disabled(), - - Input::make('readonly_input') - ->title('Readonly Input') - ->placeholder('Readonly Input') - ->readonly(), - - CheckBox::make('readonly_checkbox') - ->title('Readonly Checkbox') - ->placeholder('Remember me') - ->disabled(), - - Radio::make('radio') - ->placeholder('Yes') - ->value(1) - ->title('Radio') - ->disabled(), - - Radio::make('radio') - ->placeholder('No') - ->value(0) - ->disabled(), - - TextArea::make('readonly_textarea') - ->title('Readonlyd textarea') - ->placeholder('Readonlyd textarea') - ->rows(7) - ->disabled(), - - ])->title('Input States'), - ]), - ]; - } - - public function buttonClickProcessing() - { - Alert::warning('Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.'); - } -} diff --git a/app/Orchid/Screens/Examples/ExampleGridScreen.php b/app/Orchid/Screens/Examples/ExampleGridScreen.php deleted file mode 100644 index 13f97907..00000000 --- a/app/Orchid/Screens/Examples/ExampleGridScreen.php +++ /dev/null @@ -1,89 +0,0 @@ -ratio('30/70')->reverseOnPhone(), - - Layout::split([ - $template, - $template, - ])->ratio('40/60'), - - Layout::split([ - $template, - $template, - ])->ratio('50/50'), - - Layout::split([ - $template, - $template, - ])->ratio('60/40'), - - Layout::split([ - $template, - $template, - ])->ratio('70/30'), - ]; - } -} diff --git a/app/Orchid/Screens/Examples/ExampleLayoutsScreen.php b/app/Orchid/Screens/Examples/ExampleLayoutsScreen.php deleted file mode 100644 index 466b8b7a..00000000 --- a/app/Orchid/Screens/Examples/ExampleLayoutsScreen.php +++ /dev/null @@ -1,86 +0,0 @@ -title('Block header') - ->description('Excellent description that editing or views in block'), - - Layout::tabs([ - 'Example Tab 1' => Layout::view('platform::dummy.block'), - 'Example Tab 2' => Layout::view('platform::dummy.block'), - 'Example Tab 3' => Layout::view('platform::dummy.block'), - ]), - - TabMenuExample::class, - Layout::view('platform::dummy.block'), - - Layout::columns([ - Layout::view('platform::dummy.block'), - Layout::view('platform::dummy.block'), - Layout::view('platform::dummy.block'), - ]), - - Layout::accordion([ - 'Collapsible Group Item #1' => Layout::view('platform::dummy.block'), - 'Collapsible Group Item #2' => Layout::view('platform::dummy.block'), - 'Collapsible Group Item #3' => Layout::view('platform::dummy.block'), - ]), - - ]; - } -} diff --git a/app/Orchid/Screens/Examples/ExampleScreen.php b/app/Orchid/Screens/Examples/ExampleScreen.php deleted file mode 100644 index 2c94842b..00000000 --- a/app/Orchid/Screens/Examples/ExampleScreen.php +++ /dev/null @@ -1,175 +0,0 @@ - [ - [ - 'name' => 'Some Data', - 'values' => [25, 40, 30, 35, 8, 52, 17], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - [ - 'name' => 'Another Set', - 'values' => [25, 50, -10, 15, 18, 32, 27], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - [ - 'name' => 'Yet Another', - 'values' => [15, 20, -3, -15, 58, 12, -17], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - [ - 'name' => 'And Last', - 'values' => [10, 33, -8, -3, 70, 20, -34], - 'labels' => ['12am-3am', '3am-6am', '6am-9am', '9am-12pm', '12pm-3pm', '3pm-6pm', '6pm-9pm'], - ], - ], - 'table' => [ - new Repository(['id' => 100, 'name' => self::TEXT_EXAMPLE, 'price' => 10.24, 'created_at' => '01.01.2020']), - new Repository(['id' => 200, 'name' => self::TEXT_EXAMPLE, 'price' => 65.9, 'created_at' => '01.01.2020']), - new Repository(['id' => 300, 'name' => self::TEXT_EXAMPLE, 'price' => 754.2, 'created_at' => '01.01.2020']), - new Repository(['id' => 400, 'name' => self::TEXT_EXAMPLE, 'price' => 0.1, 'created_at' => '01.01.2020']), - new Repository(['id' => 500, 'name' => self::TEXT_EXAMPLE, 'price' => 0.15, 'created_at' => '01.01.2020']), - - ], - 'metrics' => [ - 'sales' => ['value' => number_format(6851), 'diff' => 10.08], - 'visitors' => ['value' => number_format(24668), 'diff' => -30.76], - 'orders' => ['value' => number_format(10000), 'diff' => 0], - 'total' => number_format(65661), - ], - ]; - } - - /** - * The name of the screen displayed in the header. - */ - public function name(): ?string - { - return 'Example Screen'; - } - - /** - * Display header description. - */ - public function description(): ?string - { - return 'Sample Screen Components'; - } - - /** - * The screen's action buttons. - * - * @return \Orchid\Screen\Action[] - */ - public function commandBar(): iterable - { - return [ - Button::make('Show toast') - ->method('showToast') - ->novalidate() - ->icon('bs.chat-square-dots'), - - ModalToggle::make('Launch demo modal') - ->modal('exampleModal') - ->method('showToast') - ->icon('bs.window'), - ]; - } - - /** - * The screen's layout elements. - * - * @return string[]|\Orchid\Screen\Layout[] - */ - public function layout(): iterable - { - return [ - Layout::metrics([ - 'Sales Today' => 'metrics.sales', - 'Visitors Today' => 'metrics.visitors', - 'Pending Orders' => 'metrics.orders', - 'Total Earnings' => 'metrics.total', - ]), - - Layout::columns([ - ChartLineExample::make('charts', 'Line Chart') - ->description('Visualize data trends with multi-colored line graphs.'), - - ChartBarExample::make('charts', 'Bar Chart') - ->description('Compare data sets with colorful bar graphs.'), - ]), - - Layout::table('table', [ - TD::make('id', 'ID') - ->width('100') - ->render(fn (Repository $model) => // Please use view('path') - "sample - # {$model->get('id')}"), - - TD::make('name', 'Name') - ->width('450') - ->render(fn (Repository $model) => Str::limit($model->get('name'), 200)), - - TD::make('price', 'Price') - ->width('100') - ->usingComponent(Currency::class, before: '$') - ->align(TD::ALIGN_RIGHT) - ->sort(), - - TD::make('created_at', 'Created') - ->width('100') - ->usingComponent(DateTimeSplit::class) - ->align(TD::ALIGN_RIGHT), - ]), - - Layout::modal('exampleModal', Layout::rows([ - Input::make('toast') - ->title('Messages to display') - ->placeholder('Hello world!') - ->help('The entered text will be displayed on the right side as a toast.') - ->required(), - ]))->title('Create your own toast message'), - ]; - } - - public function showToast(Request $request): void - { - Toast::warning($request->get('toast', 'Hello, world! This is a toast message.')); - } -} diff --git a/app/Orchid/Screens/Examples/ExampleTextEditorsScreen.php b/app/Orchid/Screens/Examples/ExampleTextEditorsScreen.php deleted file mode 100644 index 181edac3..00000000 --- a/app/Orchid/Screens/Examples/ExampleTextEditorsScreen.php +++ /dev/null @@ -1,84 +0,0 @@ - 'Hello! We collected all the fields in one place', - 'simplemde' => '# Big header', - 'code' => Str::limit(file_get_contents(__FILE__), 500), - ]; - } - - /** - * The name of the screen displayed in the header. - */ - public function name(): ?string - { - return 'Form Text Editors'; - } - - /** - * Display header description. - */ - public function description(): ?string - { - return 'Examples for creating a wide variety of forms.'; - } - - /** - * The screen's action buttons. - * - * @return Action[] - */ - public function commandBar(): iterable - { - return []; - } - - /** - * The screen's layout elements. - * - * @throws \Throwable - * - * @return \Orchid\Screen\Layout[] - */ - public function layout(): iterable - { - return [ - - ExampleElements::class, - - Layout::rows([ - SimpleMDE::make('simplemde') - ->title('SimpleMDE') - ->popover('SimpleMDE is a simple, embeddable, and beautiful JS markdown editor'), - - Quill::make('quill') - ->title('Quill') - ->popover('Quill is a free, open source WYSIWYG editor built for the modern web.'), - - Code::make('code') - ->title('Code'), - - ]), - ]; - } -} diff --git a/app/Orchid/Screens/Idea/ListScreen.php b/app/Orchid/Screens/Idea/ListScreen.php index 70d8c3ea..2d310f49 100644 --- a/app/Orchid/Screens/Idea/ListScreen.php +++ b/app/Orchid/Screens/Idea/ListScreen.php @@ -39,6 +39,7 @@ public function query(): iterable { return [ 'ideaRequests' => IdeaRequest::with(['user', 'key']) + ->defaultSort('created_at','desc') ->filters() ->paginate(), 'metrics' => [ diff --git a/app/Orchid/Screens/Position/EditScreen.php b/app/Orchid/Screens/Position/EditScreen.php index 5d173e61..5fb27001 100644 --- a/app/Orchid/Screens/Position/EditScreen.php +++ b/app/Orchid/Screens/Position/EditScreen.php @@ -38,7 +38,7 @@ public function query(Position $position): iterable return [ 'position' => $position, - 'position.schedule' => $position->schedule?->value, + //'position.schedule' => $position->schedule?->value, ]; } @@ -96,7 +96,7 @@ public function layout(): iterable ->title('Локация'), Select::make('position.schedule') - ->options($this->getSchedules()) + ->fromEnum(ScheduleEnum::class, 'text') ->title('Формат'), Input::make('position.contact') @@ -174,11 +174,4 @@ public function remove(Position $position) return redirect()->route('platform.position'); } - public function getSchedules(): array - { - return collect(ScheduleEnum::cases()) - ->mapWithKeys(fn (ScheduleEnum $schedule) => [$schedule->value => $schedule->text()]) - ->all(); - } - } diff --git a/app/Orchid/Screens/Position/ListScreen.php b/app/Orchid/Screens/Position/ListScreen.php index ba6b8dca..3b139826 100644 --- a/app/Orchid/Screens/Position/ListScreen.php +++ b/app/Orchid/Screens/Position/ListScreen.php @@ -29,7 +29,7 @@ public function query(): iterable return [ 'positions' => Position::with('author') ->filters() - ->defaultSort('created_at') + ->defaultSort('approved') ->paginate(), ]; } diff --git a/app/Orchid/Screens/Post/ListScreen.php b/app/Orchid/Screens/Post/ListScreen.php index 11ada0bb..01bddb70 100644 --- a/app/Orchid/Screens/Post/ListScreen.php +++ b/app/Orchid/Screens/Post/ListScreen.php @@ -28,7 +28,7 @@ public function query(): iterable return [ 'posts' => Post::with('author') ->filters() - ->defaultSort('created_at') + ->defaultSort('created_at','desc') ->paginate(), ]; } diff --git a/public/img/ui/key.svg b/public/img/ui/key.svg new file mode 100644 index 00000000..bab20c98 --- /dev/null +++ b/public/img/ui/key.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/idea/base.blade.php b/resources/views/idea/base.blade.php deleted file mode 100644 index c5174acc..00000000 --- a/resources/views/idea/base.blade.php +++ /dev/null @@ -1,83 +0,0 @@ -@extends('layout') - -@section('content') - - Среда разработки - - Laravel Idea - - - - Полезные дополнения для IDE, включая генерацию кода, автодополнение синтаксиса - Eloquent, автодополнение правил валидации и многое другое. - - - - Перейти на сайт - Маркетплейс - - - - - - - - -
-
-
-
-
-
-
-
- -
-
-

Генерация кода

-
-

- Мощная настраиваемая генерация кода для Laravel, автозаполнение полей и завершение отношений. -

-
-
-
-
-
- -
-
-

Eloquent завершение

-
-

- Полное автозаполнение полей и отношений, автоматическое создание фабрики ресурсов и баз данных JSON. -

-
-
-
-
-
- -
-
-

Полезные помощники

-
-

- Сотни полезных помощников, включая маршруты, валидацию, настройки и переводы, завершение имен шлюзов, поддержка Blade и многое другое. -

-
-
-
-
- @yield('col') - -
-
-
- -
-@endsection diff --git a/resources/views/idea/index.blade.php b/resources/views/idea/index.blade.php index 21d2d3ca..c2e84419 100644 --- a/resources/views/idea/index.blade.php +++ b/resources/views/idea/index.blade.php @@ -1,50 +1,135 @@ -@extends('idea.base') +@extends('layout') @section('title', 'Laravel Idea') -@section('col') +@section('content') + + Среда разработки + + Laravel Idea + -
- @csrf + + Полезные дополнения для IDE, включая генерацию кода, автодополнение синтаксиса + Eloquent, автодополнение правил валидации и многое другое. + -

- Русскоязычные участники из России, Белоруссии и Украины имеют возможность подать заявку на - получение бесплатного ключа. Заполните форму, и после того, как ваш запрос - будет обработан, мы отправим вам ключ. -

+ + Перейти на сайт + + Маркетплейс + + + + -
-
- - -
-
- - -
-
+ -
-
- - -
+
+
+
+
+
+
+
+
+ +
+
+

Генерация кода

+
+

+ Мощная настраиваемая генерация кода для Laravel, автозаполнение полей и завершение + отношений. +

+
+
+
+
+
+ +
+
+

Eloquent завершение

+
+

+ Полное автозаполнение полей и отношений, автоматическое создание фабрики ресурсов и баз + данных JSON. +

+
+
+
+
+
+ +
+
+

Полезные помощники

+
+

+ Сотни полезных помощников, включая маршруты, валидацию, настройки и переводы, завершение + имен шлюзов, поддержка Blade и многое другое. +

+
+
+
+
+ + @csrf -
- - -
-
+

+ Русскоязычные участники из России, Белоруссии и Украины имеют возможность подать заявку на + получение бесплатного ключа. Заполните форму, и после того, как ваш запрос + будет обработан, мы отправим вам ключ. +

-
- - -
-
- -
+
+
+ + +
+
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + + + +
+
+
- +
@endsection diff --git a/resources/views/idea/key.blade.php b/resources/views/idea/key.blade.php index 0c51f1d3..0d3d9465 100644 --- a/resources/views/idea/key.blade.php +++ b/resources/views/idea/key.blade.php @@ -1,35 +1,66 @@ -@extends('idea.base') +@extends('layout') @section('title', 'Laravel Idea Key') -@section('col') +@section('content') -
- @csrf + + всё наглядно + + Бесплатный ключ Laravel IDEA для наших пользователей + -

- Русскоязычные участники из России, Белоруссии и Украины имеют возможность подать заявку на - получение бесплатного ключа. Заполните форму, и после того, как ваш запрос - будет обработан, мы отправим вам ключ. -

+ + Lorem ipsum dolor sit amet consectetur. Euismod in nunc sed nunc duis proin arcu arcu. + +
+ + + +
+
+
+

+ Русскоязычные участники из России, Белоруссии и Украины имеют возможность + получить бесплатный ключ. +

+
+
+
+ + +
-
-
- {{$key->key}}
-
- +
+
+ + {{$key->key}} + +
+
+ + + + Мы лишь прикоснулись к поверхности. + + В Laravel есть все необходимое для создания веб-приложения, включая проверку электронной почты, + ограничение скорости и пользовательские консольные команды. + + -
@endsection diff --git a/resources/views/positions/edit.blade.php b/resources/views/positions/edit.blade.php index 589f2366..2520e59f 100644 --- a/resources/views/positions/edit.blade.php +++ b/resources/views/positions/edit.blade.php @@ -160,13 +160,13 @@ class="form-label">Как связаться?
-
- @if($position->exists) - diff --git a/resources/views/post/edit.blade.php b/resources/views/post/edit.blade.php index 7da8cf38..028d140f 100644 --- a/resources/views/post/edit.blade.php +++ b/resources/views/post/edit.blade.php @@ -22,22 +22,18 @@ class="w-100 py-3 form-editor form-editor-title">{{ old('title', $post->title) } -
-
- -
+
diff --git a/resources/views/profile/edit.blade.php b/resources/views/profile/edit.blade.php index efd58cf9..63e30cbf 100644 --- a/resources/views/profile/edit.blade.php +++ b/resources/views/profile/edit.blade.php @@ -88,8 +88,11 @@ class="btn-group mb-3" role="group" aria-label="Тема оформления" i адаптировался автоматически в соответствии с вашей системой.
+
+ +
+ -
diff --git a/routes/platform.php b/routes/platform.php index 054f1c07..351cb9fb 100644 --- a/routes/platform.php +++ b/routes/platform.php @@ -77,23 +77,6 @@ ->parent('platform.index') ->push(__('Roles'), route('platform.systems.roles'))); -// Example... -Route::screen('example', ExampleScreen::class) - ->name('platform.example') - ->breadcrumbs(fn (Trail $trail) => $trail - ->parent('platform.index') - ->push('Example Screen')); - -Route::screen('/examples/form/fields', ExampleFieldsScreen::class)->name('platform.example.fields'); -Route::screen('/examples/form/advanced', ExampleFieldsAdvancedScreen::class)->name('platform.example.advanced'); -Route::screen('/examples/form/editors', ExampleTextEditorsScreen::class)->name('platform.example.editors'); -Route::screen('/examples/form/actions', ExampleActionsScreen::class)->name('platform.example.actions'); - -Route::screen('/examples/layouts', ExampleLayoutsScreen::class)->name('platform.example.layouts'); -Route::screen('/examples/grid', ExampleGridScreen::class)->name('platform.example.grid'); -Route::screen('/examples/charts', ExampleChartsScreen::class)->name('platform.example.charts'); -Route::screen('/examples/cards', ExampleCardsScreen::class)->name('platform.example.cards'); - //Route::screen('idea', Idea::class, 'platform.screens.idea');