Skip to content

Commit b703bf2

Browse files
committed
Featherlight working
1 parent 218ac2e commit b703bf2

22 files changed

+179
-9
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
3+
namespace App\Builder;
4+
5+
use Filament\Http\Middleware\Authenticate;
6+
use Filament\Http\Middleware\DisableBladeIconComponents;
7+
use Filament\Http\Middleware\DispatchServingFilamentEvent;
8+
use Filament\Pages\Dashboard;
9+
use Filament\Panel;
10+
use Filament\PanelProvider;
11+
use Filament\Support\Colors\Color;
12+
use Filament\Widgets\AccountWidget;
13+
use Filament\Widgets\FilamentInfoWidget;
14+
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
15+
use Illuminate\Cookie\Middleware\EncryptCookies;
16+
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
17+
use Illuminate\Routing\Middleware\SubstituteBindings;
18+
use Illuminate\Session\Middleware\AuthenticateSession;
19+
use Illuminate\Session\Middleware\StartSession;
20+
use Illuminate\View\Middleware\ShareErrorsFromSession;
21+
use Moox\Security\Services\RequestPasswordReset;
22+
use Moox\User\Services\Login;
23+
24+
class BuilderPanelProvider extends PanelProvider
25+
{
26+
public function getTitle(): string
27+
{
28+
return 'Builder';
29+
}
30+
31+
public function panel(Panel $panel): Panel
32+
{
33+
return $panel
34+
->default()
35+
->id('builder')
36+
->path('builder')
37+
->passwordReset(RequestPasswordReset::class)
38+
->login(Login::class)
39+
// TODO: check this
40+
// ->authGuard('admin')
41+
->brandLogo(asset('img/logo.png'))
42+
->brandLogoHeight('1.6rem')
43+
->font('Exo 2')
44+
->favicon(asset('img/moox-icon.png'))
45+
->colors([
46+
'primary' => Color::Violet,
47+
'secondary' => Color::Neutral,
48+
])
49+
->discoverResources(in: app_path('Builder/Resources'), for: 'App\\Builder\\Resources')
50+
->discoverPages(in: app_path('Builder/Pages'), for: 'App\\Builder\\Pages')
51+
->pages([
52+
Dashboard::class,
53+
])
54+
->discoverWidgets(in: app_path('Builder/Widgets'), for: 'App\\Builder\\Widgets')
55+
->widgets([
56+
AccountWidget::class,
57+
FilamentInfoWidget::class,
58+
])
59+
->middleware([
60+
EncryptCookies::class,
61+
AddQueuedCookiesToResponse::class,
62+
StartSession::class,
63+
AuthenticateSession::class,
64+
ShareErrorsFromSession::class,
65+
VerifyCsrfToken::class,
66+
SubstituteBindings::class,
67+
DisableBladeIconComponents::class,
68+
DispatchServingFilamentEvent::class,
69+
])
70+
->authMiddleware([
71+
Authenticate::class,
72+
])
73+
->spa();
74+
}
75+
}

app/Builder/Resources/PublishItemResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace App\Builder\Resources;
66

77
use App\Builder\Resources\PublishItemResource\Pages;
8-
use Camya\Filament\Forms\Components\TitleWithSlugInput;
98
use Filament\Forms\Components\Grid;
109
use Filament\Forms\Components\MarkdownEditor;
1110
use Filament\Forms\Components\Section;
@@ -19,6 +18,7 @@
1918
use Moox\Core\Traits\Base\BaseInResource;
2019
use Moox\Core\Traits\Publish\SinglePublishInResource;
2120
use Moox\Core\Traits\Tabs\HasResourceTabs;
21+
use Moox\Slug\Forms\Components\TitleWithSlugInput;
2222

2323
class PublishItemResource extends Resource
2424
{

config/app.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use App\Builder\BuilderPanelProvider;
34
use App\Providers\AppServiceProvider;
45
use App\Providers\EventServiceProvider;
56
use App\Providers\Filament\AdminPanelProvider;
@@ -222,6 +223,7 @@
222223
// App\Providers\BroadcastServiceProvider::class,
223224
EventServiceProvider::class,
224225
AdminPanelProvider::class,
226+
BuilderPanelProvider::class,
225227
PressPanelProvider::class,
226228
DevopsPanelProvider::class,
227229
RouteServiceProvider::class,

config/previews/simple-item.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
'createForm' => \Moox\Category\Forms\TaxonomyCreateForm::class,
4646
'hierarchical' => true,
4747
],
48-
4948
'tag' => [
5049
'label' => 'Tags',
5150
'model' => \Moox\Tag\Models\Tag::class,
@@ -56,6 +55,5 @@
5655
'createForm' => \Moox\Tag\Forms\TaxonomyCreateForm::class,
5756
'hierarchical' => false,
5857
],
59-
6058
],
6159
];

packages/featherlight/resources/css/app.css

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Loading
2.67 MB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://unsplash.com/@evieshaffer
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2+
<svg width="800px" height="800px" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M470.7 20L368.2 49.81l41.5-28.09c-26.2 5.92-59.3 17.5-100.9 36.19l-67.9 70.79L265 79.25c-23.3 12.96-48 29.95-71.8 49.85l-15.8 64.3-3.4-47.6c-23.5 21.6-45.6 45.6-63.9 70.9-19.23 26.5-34.26 54.5-41.79 82.4l-28.12-18.8c2.52 23.7 10.31 44.3 23.09 63.2l-33.62-10.3c7.64 23.5 20.13 38.7 41.25 51-11.83 33.3-17.38 68.1-23.34 102.8l18.4 3.1C87.31 277.4 237.9 141.8 374 81.72l6.9 17.38c-121.7 54.5-216.3 146.5-265.8 279.1 18.1.1 35.8-2.1 52.2-6.3l4.9-60.9 13.1 55.5c10.9-4 20.9-8.8 29.8-14.4l-20.7-43.5 32.8 34.8c8-6.4 14.6-13.6 19.6-21.5 30.4-47.5 62.2-94.7 124.8-134.2l-45.7-16.2 70.1 2.1c11.4-5.8 23.4-12.9 32.5-19.6l-49.7-4 74.7-17.6c5.8-5.8 11.2-11.9 16.1-18 17.3-21.94 29-44.78 26.2-65.55-1.3-10.39-7.5-20.16-17.6-25.63-2.5-1.3-5.2-2.45-7.5-3.22z"/></svg>

packages/featherlight/resources/img/feather-color.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)