mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update AdminPanelProvider.php
This commit is contained in:
parent
c71ec174d4
commit
29493603b4
1 changed files with 14 additions and 5 deletions
|
@ -95,14 +95,16 @@ class AdminPanelProvider extends PanelProvider
|
|||
]);
|
||||
|
||||
$defaultColor = Color::Yellow;
|
||||
$brandLogo = asset('images/phyre-logo.svg');
|
||||
|
||||
|
||||
$brandLogo = null;
|
||||
$brandName = null;
|
||||
$isAppInstalled = file_exists(storage_path('installed'));
|
||||
if ($isAppInstalled) {
|
||||
if (setting('general.brand_logo_url')) {
|
||||
$brandLogo = setting('general.brand_logo_url');
|
||||
}
|
||||
if (setting('general.brand_name')) {
|
||||
$brandName = setting('general.brand_name');
|
||||
}
|
||||
if (setting('general.brand_primary_color')) {
|
||||
$defaultColor = Color::hex(setting('general.brand_primary_color'));
|
||||
}
|
||||
|
@ -142,8 +144,15 @@ class AdminPanelProvider extends PanelProvider
|
|||
}
|
||||
}
|
||||
|
||||
$panel->brandLogo($brandLogo)
|
||||
->brandLogoHeight('2.2rem')
|
||||
if ($brandLogo) {
|
||||
$panel->brandLogo($brandLogo);
|
||||
} else if ($brandName) {
|
||||
$panel->brandName($brandName);
|
||||
} else {
|
||||
$panel->brandLogo(asset('images/phyre-logo.svg'));
|
||||
}
|
||||
|
||||
$panel->brandLogoHeight('2.2rem')
|
||||
->colors([
|
||||
'primary'=>$defaultColor,
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue