Просмотр исходного кода

chore: Update user theme to match company theme

3.x
wallo 2 лет назад
Родитель
Сommit
89482f37d6

+ 4
- 3
app/Providers/Filament/UserPanelProvider.php Просмотреть файл

@@ -22,9 +22,6 @@ class UserPanelProvider extends PanelProvider
22 22
         return $panel
23 23
             ->id('user')
24 24
             ->path('user')
25
-            ->colors([
26
-                'primary' => Color::Indigo,
27
-            ])
28 25
             ->userMenuItems([
29 26
                 'profile' => MenuItem::make()
30 27
                     ->label('Profile')
@@ -41,6 +38,10 @@ class UserPanelProvider extends PanelProvider
41 38
                     ->icon('heroicon-o-key')
42 39
                     ->url(static fn () => url(PersonalAccessTokens::getUrl())),
43 40
             ])
41
+            ->colors([
42
+                'primary' => Color::Indigo,
43
+            ])
44
+            ->viteTheme('resources/css/filament/user/theme.css')
44 45
             ->discoverResources(in: app_path('Filament/User/Resources'), for: 'App\\Filament\\User\\Resources')
45 46
             ->discoverPages(in: app_path('Filament/User/Pages'), for: 'App\\Filament\\User\\Pages')
46 47
             ->pages([

+ 22
- 0
resources/css/filament/user/tailwind.config.js Просмотреть файл

@@ -0,0 +1,22 @@
1
+import preset from '../../../../vendor/filament/filament/tailwind.config.preset'
2
+
3
+export default {
4
+    presets: [preset],
5
+    content: [
6
+        './app/Filament/User/**/*.php',
7
+        './resources/views/**/*.blade.php',
8
+        './resources/views/filament/user/**/*.blade.php',
9
+        './vendor/filament/**/*.blade.php',
10
+        './vendor/andrewdwallo/filament-companies/resources/views/**/*.blade.php',
11
+    ],
12
+    theme: {
13
+        extend: {
14
+            colors: {
15
+                white: '#F6F5F3',
16
+                platinum: '#E8E9EB',
17
+                moonlight: '#F6F5F3',
18
+                translucent: 'rgba(54, 54, 52, 0.06)',
19
+            }
20
+        }
21
+    }
22
+}

+ 17
- 0
resources/css/filament/user/theme.css Просмотреть файл

@@ -0,0 +1,17 @@
1
+@import '../../../../vendor/filament/filament/resources/css/theme.css';
2
+
3
+@config './tailwind.config.js';
4
+
5
+.fi-body {
6
+    @apply bg-platinum;
7
+}
8
+
9
+.fi-topbar > nav {
10
+    @apply bg-translucent;
11
+}
12
+
13
+.fi-sidebar-header {
14
+    @apply bg-translucent;
15
+}
16
+
17
+

+ 1
- 0
vite.config.js Просмотреть файл

@@ -8,6 +8,7 @@ export default defineConfig({
8 8
                 'resources/css/app.css',
9 9
                 'resources/js/app.js',
10 10
                 'resources/css/filament/company/theme.css',
11
+                'resources/css/filament/user/theme.css',
11 12
             ],
12 13
             refresh: [
13 14
                 ...refreshPaths,

Загрузка…
Отмена
Сохранить