Skip to content

Commit cc2fb6b

Browse files
committed
[FIX] Fixes #2164: speed up TTFB performance.
1 parent 957064e commit cc2fb6b

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

core/config/blade-icons.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<?php
2-
3-
return [
4-
1+
<?php return [
52
/*
63
|--------------------------------------------------------------------------
74
| Icons Sets
@@ -12,7 +9,6 @@
129
| set and a combination from the options below.
1310
|
1411
*/
15-
1612
'sets' => [
1713
// Custom icon sets can be defined here
1814
],
@@ -28,7 +24,6 @@
2824
| Default size: inline-block w-5 h-5 (Tailwind)
2925
|
3026
*/
31-
3227
'class' => 'inline-block',
3328

3429
/*
@@ -45,7 +40,6 @@
4540
| - stroke: currentColor (inherits text color)
4641
|
4742
*/
48-
4943
'attributes' => [
5044
'width' => 20,
5145
'height' => 20,
@@ -64,7 +58,6 @@
6458
| reference any icon from any configured set.
6559
|
6660
*/
67-
6861
'fallback' => '',
6962

7063
/*
@@ -76,9 +69,7 @@
7669
| settings related to Blade Components.
7770
|
7871
*/
79-
8072
'components' => [
81-
8273
/*
8374
|----------------------------------------------------------------------
8475
| Disable Components
@@ -89,7 +80,6 @@
8980
| when working with large icon libraries.
9081
|
9182
*/
92-
9383
'disabled' => false,
9484

9585
/*
@@ -101,10 +91,6 @@
10191
| for the default Icon class component.
10292
|
10393
*/
104-
10594
'default' => 'icon',
106-
10795
],
108-
10996
];
110-

core/factory/settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
'manager_theme_mode' => '3',
107107
'login_form_position' => 'left',
108108
'login_form_style' => 'dark',
109-
'manager_menu_position' => 'top',
109+
'manager_menu_position' => 'left',
110110
'tinymce4_skin' => 'lightgray',
111111
'manager_login_startup' => 0,
112112
'base_url' => '/',

core/src/Providers/BladeIconsAdapterServiceProvider.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
namespace EvolutionCMS\Providers;
1+
<?php namespace EvolutionCMS\Providers;
42

53
use BladeUI\Icons\Factory;
64
use BladeUI\Icons\IconsManifest;
@@ -31,7 +29,7 @@ public function boot(): void
3129

3230
private function registerConfig(): void
3331
{
34-
$this->mergeConfigFrom(__DIR__ . '/../../../core/config/blade-icons.php', 'blade-icons');
32+
$this->mergeConfigFrom(EVO_CORE_PATH . 'config/blade-icons.php', 'blade-icons');
3533
}
3634

3735
private function registerFactory(): void
@@ -77,6 +75,10 @@ private function bootIconComponent(): void
7775
{
7876
// Register icon component without Application type-hint
7977
$this->callAfterResolving(ViewFactory::class, function ($view) {
78+
if (!is_file($this->manifestPath())) {
79+
return;
80+
}
81+
8082
$this->app->make(Factory::class)->registerComponents();
8183
});
8284
}
@@ -85,7 +87,7 @@ private function bootPublishing(): void
8587
{
8688
if ($this->app->runningInConsole()) {
8789
$this->publishes([
88-
__DIR__ . '/../../../core/config/blade-icons.php' => $this->app->configPath('blade-icons.php'),
90+
EVO_CORE_PATH . 'config/blade-icons.php' => $this->app->configPath('blade-icons.php'),
8991
], 'blade-icons-config');
9092
}
9193
}
@@ -95,4 +97,3 @@ private function manifestPath(): string
9597
return $this->app->bootstrapPath('cache/blade-icons.php');
9698
}
9799
}
98-

0 commit comments

Comments
 (0)