Skip to content

Commit

Permalink
Issue #3374: Shifted color definitions to Defaults.pm.
Browse files Browse the repository at this point in the history
Adapted logic accordingly.
  • Loading branch information
stefanhaerter authored and svenoe committed May 6, 2024
1 parent 2ae59f0 commit 10fccb2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
25 changes: 25 additions & 0 deletions Kernel/Config/Defaults.pm
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,31 @@ sub LoadDefaults {
# (URL CSS path.)
$Self->{'Frontend::CSSPath'} = '<OTOBO_CONFIG_Frontend::WebPath>css/';

# AgentColorDefinitions
$Self->{'AgentColorDefinitions'} = {
MainDark => '#00023c',
MainLight => '#000099',
MainHover => '#001bff',
BGElement => '#fff',
BGLight => '#f7f7f9',
BGLightMedium => '#eeeef2',
BGMedium => '#e5e5eb',
BGMediumDark => '#cdcdd8',
BGDark => '#bfc0ce',
TextLight => '#7f809d',
TextMedium => '#54557c',
TextDark => '#00023c',
TextErr => '#ea2400',
TextWarn => '#f5af36',
Highlight => '#fef235',
NotifyOK => '#c4cdfa',
NotifyWarn => '#fffccc',
NotifyErr => '#f9bcb2',
HoverLight => '#fffccc',
HoverDark => '#fef235',
ShadowDark => 'rgba(0,2,71,0.16)',
};

# Frontend::ImagePath
# (URL image path of icons for navigation.)
$Self->{'Frontend::ImagePath'} = '<OTOBO_CONFIG_Frontend::WebPath>skins/Agent/default/img/';
Expand Down
32 changes: 6 additions & 26 deletions Kernel/Output/HTML/Layout.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1649,32 +1649,12 @@ sub Header {
# Load colors based on Skin selection
$Self->{SkinSelected} ||= 'default';

my $ColorDefinitions
= $Self->{SkinSelected} eq 'default' ? $ConfigObject->Get("AgentColorDefinitions") : $ConfigObject->Get("SkinColorDefinition::$Self->{SkinSelected}");

if ( !IsHashRefWithData($ColorDefinitions) ) {
$ColorDefinitions = {
MainDark => '#00023c',
MainLight => '#000099',
MainHover => '#001bff',
BGElement => '#fff',
BGLight => '#f7f7f9',
BGLightMedium => '#eeeef2',
BGMedium => '#e5e5eb',
BGMediumDark => '#cdcdd8',
BGDark => '#bfc0ce',
TextLight => '#7f809d',
TextMedium => '#54557c',
TextDark => '#00023c',
TextErr => '#ea2400',
Highlight => '#fef235',
NotifyOK => '#c4cdfa',
NotifyWarn => '#fffccc',
NotifyErr => '#f9bcb2',
HoverLight => '#fffccc',
HoverDark => '#fef235',
ShadowDark => 'rgba(0,2,71,0.16)',
};
my $ColorDefinitions;
if ( $Self->{SkinSelected} // $Self->{SkinSelected} ne 'default' ) {
$ColorDefinitions = $ConfigObject->Get("SkinColorDefinition::$Self->{SkinSelected}") // $ConfigObject->Get('AgentColorDefinitions');
}
else {
$ColorDefinitions = $ConfigObject->Get('AgentColorDefinitions');
}

for my $Color ( sort keys %{$ColorDefinitions} ) {
Expand Down

0 comments on commit 10fccb2

Please sign in to comment.