Nextcloud /themes/*/snappymail/(style.css|preview.png) for #875

This commit is contained in:
the-djmaze 2023-01-26 21:42:14 +01:00
parent 3b43a8bc78
commit 0b421d5a62
3 changed files with 3 additions and 8 deletions

View file

@ -81,7 +81,7 @@ export const
themePreviewLink = theme => {
if (theme.endsWith('@nextcloud')) {
theme = theme.slice(0, theme.length - 10).trim();
return OC().webroot + '/themes/' + encodeURI(theme) + '/snappymail.png';
return OC().webroot + '/themes/' + encodeURI(theme) + '/snappymail/preview.png';
}
let path = 'webVersionPath';
if (theme.endsWith('@custom')) {

View file

@ -57,12 +57,7 @@ export const
}, clearTimer);
},
convertThemeName = theme => theme
.replace(/@custom$/, '')
.replace(/@nextcloud$/, '')
.replace(/([A-Z])/g, ' $1')
.replace(/[^a-zA-Z0-9]+/g, ' ')
.trim();
convertThemeName = theme => theme.replace(/@[a-z]+$/, '').replace(/([A-Z])/g, ' $1').trim();
ThemeStore.isMobile.subscribe(value => $htmlCL.toggle('rl-mobile', value));

View file

@ -103,7 +103,7 @@ trait Themes
if ('@nextcloud' === \substr($sTheme, -10)) {
$sBase = \OC::$WEBROOT . '/';
$sThemeCSSFile = \OC::$SERVERROOT . '/themes/' . \str_replace('@nextcloud', '/snappymail.css', $sTheme);
$sThemeCSSFile = \OC::$SERVERROOT . '/themes/' . \str_replace('@nextcloud', '/snappymail/style.css', $sTheme);
} else {
$bCustomTheme = '@custom' === \substr($sTheme, -7);
if ($bCustomTheme) {