Fixed document color issue..
This commit is contained in:
parent
a149b358a3
commit
62ccb79c2d
@ -974,15 +974,22 @@ abstract class Show extends Component
|
||||
return $backgroundColor;
|
||||
}
|
||||
|
||||
if ($background_color = config('type.' . static::OBJECT_TYPE . '.' . $type . '.color', false)) {
|
||||
return $background_color;
|
||||
// checking setting color
|
||||
$key = $this->getSettingKey($type, 'color');
|
||||
|
||||
if (! empty(setting($key))) {
|
||||
$backgroundColor = setting($key);
|
||||
}
|
||||
|
||||
if (! empty($alias = config('type.' . static::OBJECT_TYPE . '.' . $type . '.alias'))) {
|
||||
$type = $alias . '.' . str_replace('-', '_', $type);
|
||||
// checking config color
|
||||
if (empty($backgroundColor) && $background_color = config('type.document.' . $type . '.color', false)) {
|
||||
$backgroundColor = $background_color;
|
||||
}
|
||||
|
||||
$backgroundColor = setting($this->getSettingKey($type, 'color'), '#55588b');
|
||||
// set default color
|
||||
if (empty($backgroundColor)) {
|
||||
$backgroundColor = '#55588b';
|
||||
}
|
||||
|
||||
return $this->getHexCodeOfTailwindClass($backgroundColor);
|
||||
}
|
||||
|
@ -274,16 +274,22 @@ abstract class Template extends Component
|
||||
return $backgroundColor;
|
||||
}
|
||||
|
||||
if ($background_color = config('type.document.' . $type . '.color', false)) {
|
||||
return $background_color;
|
||||
// checking setting color
|
||||
$key = $this->getSettingKey($type, 'color');
|
||||
|
||||
if (! empty(setting($key))) {
|
||||
return setting($key);
|
||||
}
|
||||
|
||||
|
||||
if (! empty($alias = config('type.document.' . $type . '.alias'))) {
|
||||
$type = $alias . '.' . str_replace('-', '_', $type);
|
||||
// checking config color
|
||||
if (empty($backgroundColor) && $background_color = config('type.document.' . $type . '.color', false)) {
|
||||
$backgroundColor = $background_color;
|
||||
}
|
||||
|
||||
$backgroundColor = setting($this->getSettingKey($type, 'color'), '#55588b');
|
||||
// set default color
|
||||
if (empty($backgroundColor)) {
|
||||
$backgroundColor = '#55588b';
|
||||
}
|
||||
|
||||
return $this->getHexCodeOfTailwindClass($backgroundColor);
|
||||
}
|
||||
|
@ -149,8 +149,11 @@ trait Documents
|
||||
|
||||
$prefix = config('type.document.' . $type . '.setting.prefix');
|
||||
|
||||
|
||||
if (! empty($prefix)) {
|
||||
$key .= $prefix . '.' . $setting_key;
|
||||
} else {
|
||||
$key .= $setting_key;
|
||||
}
|
||||
|
||||
return $key;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user