mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
fix(theming): fix admin-disabled background and user pristine theming settings
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
494a0c1073
commit
88b5f7e340
1 changed files with 10 additions and 2 deletions
|
|
@ -131,6 +131,7 @@ trait CommonThemeTrait {
|
|||
&& $this->appManager->isEnabledForUser(Application::APP_ID)) {
|
||||
$themingBackground = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background', 'default');
|
||||
$currentVersion = (int)$this->config->getUserValue($user->getUID(), Application::APP_ID, 'userCacheBuster', '0');
|
||||
$globalBackgroundDeleted = $this->config->getAppValue(Application::APP_ID, 'backgroundMime', '') === 'backgroundColor';
|
||||
|
||||
// The user uploaded a custom background
|
||||
if ($themingBackground === 'custom') {
|
||||
|
|
@ -153,12 +154,19 @@ trait CommonThemeTrait {
|
|||
// The user picked a static colour
|
||||
if (substr($themingBackground, 0, 1) === '#') {
|
||||
return [
|
||||
'--image-background' => 'no',
|
||||
'--image-background-plain' => 'true',
|
||||
'--color-background-plain' => $this->themingDefaults->getColorPrimary(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
// Admin disabled the background and the user
|
||||
// did not customized anything
|
||||
if ($globalBackgroundDeleted) {
|
||||
return [
|
||||
'--image-background-plain' => 'true',
|
||||
];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue