Enable SCSS for guest pages
SCSS is disabled for several types of pages, as the SCSS compiler uses the cache system, which is not available for example when Nextcloud is not installed yet. However, in regular guest pages the cache system is available, so SCSS is now enabled for them too. To keep the same behaviour for guest pages the guest style is automatically added for them, as before this commit it was automatically added due to SCSS not being used. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
09d5b61c9e
commit
8c004fdc64
|
@ -122,6 +122,7 @@ class TemplateLayout extends \OC_Template {
|
||||||
$this->assign('bodyid', 'body-login');
|
$this->assign('bodyid', 'body-login');
|
||||||
} else if ($renderAs == 'guest') {
|
} else if ($renderAs == 'guest') {
|
||||||
parent::__construct('core', 'layout.guest');
|
parent::__construct('core', 'layout.guest');
|
||||||
|
\OC_Util::addStyle('guest');
|
||||||
$this->assign('bodyid', 'body-login');
|
$this->assign('bodyid', 'body-login');
|
||||||
} else if ($renderAs == 'public') {
|
} else if ($renderAs == 'public') {
|
||||||
parent::__construct('core', 'layout.public');
|
parent::__construct('core', 'layout.public');
|
||||||
|
@ -187,7 +188,7 @@ class TemplateLayout extends \OC_Template {
|
||||||
&& !\OCP\Util::needUpgrade()
|
&& !\OCP\Util::needUpgrade()
|
||||||
&& $pathInfo !== ''
|
&& $pathInfo !== ''
|
||||||
&& !preg_match('/^\/login/', $pathInfo)
|
&& !preg_match('/^\/login/', $pathInfo)
|
||||||
&& $renderAs !== 'error' && $renderAs !== 'guest'
|
&& $renderAs !== 'error'
|
||||||
) {
|
) {
|
||||||
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
|
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue