Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore #434

Merged
merged 3 commits into from
Mar 30, 2024
Merged

chore #434

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions resources/views/pages/en/action_button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
['url' => '#color', 'label' => 'Color'],
['url' => '#onclick', 'label' => 'onClick'],
['url' => '#modal', 'label' => 'Modal'],
['url' => '#confirm', 'label' => 'Confirm'],
['url' => '#offcanvas', 'label' => 'Offcanvas'],
['url' => '#group', 'label' => 'Group'],
['url' => '#bulk', 'label' => 'Bulk'],
Expand Down Expand Up @@ -229,7 +230,6 @@ public function components(): array
actionBtn('Click me in modal', 'https://moonshine-laravel.com')
]) !!}


<x-p>
You can also open a modal window using the <code>toggleModal</code> method, and if the ActionButton is inside
modal window then just <code>openModal</code>
Expand Down Expand Up @@ -290,7 +290,7 @@ public function components(): array
can be found in the "Components" section
</x-moonshine::alert>

<x-moonshine::divider label="withConfirm" />
<x-sub-title id="confirm">Confirm</x-sub-title>

<x-p>
The <code>withConfirm()</code> method allows you to create a button with confirmation of an action.
Expand All @@ -315,6 +315,13 @@ public function components(): array
}
</x-code>

<x-moonshine::alert type="warning" icon="heroicons.information-circle">
<code>withConfirm</code> does not work with <code>async</code> modes. For asynchronous mode,
you need to make your own implementation via
<x-link link="{{ to_page('components-decoration_modal') }}">Modal</x-link> or
<x-link link="#modal">inModal()</x-link>.
</x-moonshine::alert>

<x-sub-title id="offcanvas">Offcanvas</x-sub-title>

<x-p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/pages/en/fields/file.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function fields(): array
//...
</x-code>

<x-moonshine::alert type="default" icon="heroicons.information-circle">
<x-moonshine::alert type="error" icon="heroicons.information-circle">
The field in the database must be of text or json type.<br>
You also need to add a cast for the eloquent model - json, or array, or collection.
</x-moonshine::alert>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/pages/en/resources/import_export.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ class PostResource extends ModelResource

protected string $title = 'Posts';

public function import() // [tl! focus:start]
public function import(): ?ImportHandler // [tl! focus:start]
{
return null;
}

public function export()
public function export(): ?ExportHandler
{
return null;
} // [tl! focus:end]
Expand Down
10 changes: 9 additions & 1 deletion resources/views/pages/ru/action_button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
['url' => '#color', 'label' => 'Цвет'],
['url' => '#onclick', 'label' => 'onClick'],
['url' => '#modal', 'label' => 'Modal'],
['url' => '#confirm', 'label' => 'Confirm'],
['url' => '#offcanvas', 'label' => 'Offcanvas'],
['url' => '#group', 'label' => 'Группы'],
['url' => '#bulk', 'label' => 'Bulk'],
Expand Down Expand Up @@ -289,7 +290,7 @@ public function components(): array
можно узнать в разделе "Components"
</x-moonshine::alert>

<x-moonshine::divider label="withConfirm" />
<x-sub-title id="confirm">Confirm</x-sub-title>

<x-p>
Метод <code>withConfirm()</code> позволяет создать кнопку с подтверждением действия.
Expand All @@ -314,6 +315,13 @@ public function components(): array
}
</x-code>

<x-moonshine::alert type="warning" icon="heroicons.information-circle">
<code>withConfirm</code> не работает с <code>async</code> режимами. Для асинхронного режима,
необходимо сделать свою реализацию через
<x-link link="{{ to_page('components-decoration_modal') }}">Modal</x-link> или
<x-link link="#modal">inModal()</x-link>.
</x-moonshine::alert>

<x-sub-title id="offcanvas">Offcanvas</x-sub-title>

<x-p>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/pages/ru/fields/file.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function fields(): array
//...
</x-code>

<x-moonshine::alert type="default" icon="heroicons.information-circle">
<x-moonshine::alert type="error" icon="heroicons.information-circle">
Поле в базе необходимо типа text или json.<br>
Также необходимо добавить cast для eloquent модели - json, или array, или collection.
</x-moonshine::alert>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/pages/ru/resources/import_export.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ class PostResource extends ModelResource

protected string $title = 'Posts';

public function import() // [tl! focus:start]
public function import(): ?ImportHandler // [tl! focus:start]
{
return null;
}

public function export()
public function export(): ?ExportHandler
{
return null;
} // [tl! focus:end]
Expand Down
Loading