Fix public page css fallback loading
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
1952560ac7
commit
2c9d7eeb76
4 changed files with 5 additions and 8 deletions
|
@ -169,8 +169,6 @@ class LoginController extends Controller {
|
||||||
$parameters['user_autofocus'] = true;
|
$parameters['user_autofocus'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
\OC_Util::addStyle('guest');
|
|
||||||
|
|
||||||
return new TemplateResponse(
|
return new TemplateResponse(
|
||||||
$this->appName, 'login', $parameters, 'guest'
|
$this->appName, 'login', $parameters, 'guest'
|
||||||
);
|
);
|
||||||
|
|
|
@ -92,7 +92,6 @@ class SetupController {
|
||||||
|
|
||||||
\OC_Util::addVendorScript('strengthify/jquery.strengthify');
|
\OC_Util::addVendorScript('strengthify/jquery.strengthify');
|
||||||
\OC_Util::addVendorStyle('strengthify/strengthify');
|
\OC_Util::addVendorStyle('strengthify/strengthify');
|
||||||
\OC_Util::addStyle('guest');
|
|
||||||
\OC_Util::addScript('setup');
|
\OC_Util::addScript('setup');
|
||||||
\OC_Template::printGuestPage('', 'installation', $parameters);
|
\OC_Template::printGuestPage('', 'installation', $parameters);
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,6 @@ class OC {
|
||||||
// render error page
|
// render error page
|
||||||
$template = new OC_Template('', 'update.user', 'guest');
|
$template = new OC_Template('', 'update.user', 'guest');
|
||||||
OC_Util::addScript('maintenance-check');
|
OC_Util::addScript('maintenance-check');
|
||||||
OC_Util::addStyle('guest');
|
|
||||||
$template->printPage();
|
$template->printPage();
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -355,8 +354,6 @@ class OC {
|
||||||
header('Status: 503 Service Temporarily Unavailable');
|
header('Status: 503 Service Temporarily Unavailable');
|
||||||
header('Retry-After: 120');
|
header('Retry-After: 120');
|
||||||
|
|
||||||
OC_Util::addStyle('guest');
|
|
||||||
|
|
||||||
// render error page
|
// render error page
|
||||||
$template = new OC_Template('', 'update.use-cli', 'guest');
|
$template = new OC_Template('', 'update.use-cli', 'guest');
|
||||||
$template->assign('productName', 'nextcloud'); // for now
|
$template->assign('productName', 'nextcloud'); // for now
|
||||||
|
@ -378,7 +375,6 @@ class OC {
|
||||||
$systemConfig->setValue('theme', '');
|
$systemConfig->setValue('theme', '');
|
||||||
OC_Util::addScript('config'); // needed for web root
|
OC_Util::addScript('config'); // needed for web root
|
||||||
OC_Util::addScript('update');
|
OC_Util::addScript('update');
|
||||||
OC_Util::addStyle('guest');
|
|
||||||
|
|
||||||
/** @var \OC\App\AppManager $appManager */
|
/** @var \OC\App\AppManager $appManager */
|
||||||
$appManager = \OC::$server->getAppManager();
|
$appManager = \OC::$server->getAppManager();
|
||||||
|
|
|
@ -164,11 +164,15 @@ class TemplateLayout extends \OC_Template {
|
||||||
// Do not load scss for update, errors, installation or login page
|
// Do not load scss for update, errors, installation or login page
|
||||||
if(\OC::$server->getSystemConfig()->getValue('installed', false)
|
if(\OC::$server->getSystemConfig()->getValue('installed', false)
|
||||||
&& !\OCP\Util::needUpgrade()
|
&& !\OCP\Util::needUpgrade()
|
||||||
&& strpos(\OC::$server->getRequest()->getRequestUri(), \OC::$server->getURLGenerator()->linkToRoute('core.login.tryLogin')) !== 0) {
|
&& !preg_match('/^\/login/', \OC::$server->getRequest()->getPathInfo())) {
|
||||||
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
|
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles);
|
||||||
} else {
|
} else {
|
||||||
|
// If we ignore the scss compiler,
|
||||||
|
// we need to load the guest css fallback
|
||||||
|
\OC_Util::addStyle('guest');
|
||||||
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles, false);
|
$cssFiles = self::findStylesheetFiles(\OC_Util::$styles, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assign('cssfiles', array());
|
$this->assign('cssfiles', array());
|
||||||
$this->assign('printcssfiles', []);
|
$this->assign('printcssfiles', []);
|
||||||
$this->assign('versionHash', self::$versionHash);
|
$this->assign('versionHash', self::$versionHash);
|
||||||
|
|
Loading…
Reference in a new issue