diff options
author | Julius Härtl <jus@bitgrid.net> | 2017-11-07 12:31:23 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-11-07 12:31:23 +0100 |
commit | 00956c00b240789ad29289b9c100c237b1843e1f (patch) | |
tree | b72ecc9a040af0f9041330e72f4a165313287535 /apps/theming/lib | |
parent | 44f9779f9f1b85110d2185ca4396d9b26ab85eec (diff) | |
download | nextcloud-server-00956c00b240789ad29289b9c100c237b1843e1f.tar.gz nextcloud-server-00956c00b240789ad29289b9c100c237b1843e1f.zip |
Theming: expose element color though capabilities API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r-- | apps/theming/lib/Capabilities.php | 7 | ||||
-rw-r--r-- | apps/theming/lib/Util.php | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php index bb06ab107ea..b43779a27b5 100644 --- a/apps/theming/lib/Capabilities.php +++ b/apps/theming/lib/Capabilities.php @@ -68,14 +68,15 @@ class Capabilities implements IPublicCapability { */ public function getCapabilities() { $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false); - + $color = $this->theming->getColorPrimary(); return [ 'theming' => [ 'name' => $this->theming->getName(), 'url' => $this->theming->getBaseUrl(), 'slogan' => $this->theming->getSlogan(), - 'color' => $this->theming->getColorPrimary(), - 'color-text' => $this->util->invertTextColor($this->theming->getColorPrimary()) ? '#000000' : '#FFFFFF', + 'color' => $color, + 'color-text' => $this->util->invertTextColor($color) ? '#000000' : '#FFFFFF', + 'color-element' => $this->util->elementColor($color), 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), 'background' => $backgroundLogo === 'backgroundColor' ? $this->theming->getColorPrimary() : diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 5d0eba49ecd..194b5eeb0d0 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -81,9 +81,8 @@ class Util { $l = $this->calculateLuminance($color); if($l>0.8) { return '#555555'; - } else { - return $color; } + return $color; } /** |