This commit is contained in:
the-djmaze 2023-01-26 20:02:48 +01:00
parent 188b419910
commit d65d77ef2f
3 changed files with 42 additions and 23 deletions

View file

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

View file

@ -59,6 +59,7 @@ export const
convertThemeName = theme => theme
.replace(/@custom$/, '')
.replace(/@nextcloud$/, '')
.replace(/([A-Z])/g, ' $1')
.replace(/[^a-zA-Z0-9]+/g, ' ')
.trim();