Skip to content

Commit 3b494f1

Browse files
committed
Draft wip
1 parent 8f05d66 commit 3b494f1

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
<p align="center">
1313
<a href="https://www.tailwindcss.com"><img alt="TailwindCSS 3" src="https://img.shields.io/badge/TailwindCSS-v3-orange?logo=tailwindcss&color=06B6D4"></a>
1414
<a href="https://www.alpinejs.dev"><img alt="AlpineJS 3" src="https://img.shields.io/badge/AlpineJS-v3-orange?logo=alpine.js&color=8BC0D0"></a>
15-
<a href="https://www.laravel.com"><img alt="Laravel 11" src="https://img.shields.io/badge/Laravel-v11-orange?logo=Laravel&color=FF2D20"></a>
15+
<a href="https://www.laravel.com"><img alt="Laravel 12" src="https://img.shields.io/badge/Laravel-v12-orange?logo=Laravel&color=FF2D20"></a>
1616
<a href="https://www.laravel-livewire.com"><img alt="Laravel Livewire 2" src="https://img.shields.io/badge/Livewire-v3-orange?logo=livewire&color=4E56A6"></a>
17+
<a href="https://www.filamentphp.com"><img alt="Filament 3" src="https://img.shields.io/badge/Filament-v3-orange?logo=filament&color=4E56A6"></a>
1718
</p>
1819
<p align="center">
1920
<a href="https://app.codacy.com/gh/mooxphp/moox/dashboard"><img src="https://app.codacy.com/project/badge/Grade/2b912412bb6e4892b52688272dec1555" alt="Codacy Code Quality"></a>

docs/_devlog/Alf.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
- [ ] https://moox.test/components
66
- [ ] Auto-rendering of all components
7-
- [ ] Theme switcher
7+
- [ ] Theme switcher implementation
8+
- [ ] Responsive concept and implementation
89
- [ ] Where do I get the contents?
910
- [ ] Playground link, see Pines UI
1011
- [ ] Write protected fields, images
@@ -18,7 +19,7 @@
1819

1920
## Todo
2021

21-
- [ ] Write protected fields, items
22+
- [ ] Write protected items - config?
2223
- [ ] remove boilerplate code taxonomy
2324
- [ ] finish core implementation docs
2425
- [ ] Publish and Unpublish docs

packages/core/src/Entities/Items/Draft/BaseDraftResource.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public static function enableView(): bool
2828

2929
public static function enableDelete(): bool
3030
{
31+
if (config('draft.single')) {
32+
return false;
33+
}
34+
3135
return true;
3236
}
3337

packages/draft/config/draft.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
*/
1717

1818
return [
19+
'draft' => [
20+
'writeProtected' => true,
21+
],
22+
1923
'single' => 'trans//draft::draft.draft',
2024
'plural' => 'trans//draft::draft.drafts',
2125
'tabs' => [

packages/draft/src/Moox/Entities/Drafts/Draft/Pages/ListDrafts.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public function getTabs(): array
2424

2525
protected function getHeaderActions(): array
2626
{
27-
return [CreateAction::make()];
27+
if (DraftResource::enableCreate()) {
28+
return [CreateAction::make()];
29+
}
30+
31+
return [];
2832
}
2933
}

0 commit comments

Comments
 (0)