diff options
Diffstat (limited to 'core/templates/layout.user.php')
-rw-r--r-- | core/templates/layout.user.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index f590918301b..47cced308bc 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -11,7 +11,7 @@ */ $getUserAvatar = static function (int $size) use ($_): string { - return \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [ + return \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('core.avatar.getAvatar', [ 'userId' => $_['user_uid'], 'size' => $size, 'v' => $_['userAvatarVersion'] @@ -24,12 +24,15 @@ $getUserAvatar = static function (int $size) use ($_): string { <meta charset="utf-8"> <title> <?php - p(!empty($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'].' - ' : ''); -p(!empty($_['application']) ? $_['application'].' - ' : ''); + p(!empty($_['pageTitle']) && (empty($_['application']) || $_['pageTitle'] !== $_['application']) ? $_['pageTitle'] . ' - ' : ''); +p(!empty($_['application']) ? $_['application'] . ' - ' : ''); p($theme->getTitle()); ?> </title> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="csp-nonce" nonce="<?php p($_['cspNonce']); /* Do not pass into "content" to prevent exfiltration */ ?>"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0<?php if (isset($_['viewport_maximum_scale'])) { + p(', maximum-scale=' . $_['viewport_maximum_scale']); + } ?>"> <?php if ($theme->getiTunesAppId() !== '') { ?> <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>"> @@ -48,14 +51,11 @@ p($theme->getTitle()); <?php emit_script_loading_tags($_); ?> <?php print_unescaped($_['headers']); ?> </head> - <body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) { + <body dir="<?php p($_['direction']); ?>" id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) { p("data-theme-$themeId "); }?> data-themes=<?php p(join(',', $_['enabledThemes'])) ?>> - <?php include 'layout.noscript.warning.php'; ?> - - <?php foreach ($_['initialStates'] as $app => $initialState) { ?> - <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>"> - <?php }?> + <?php include 'layout.noscript.warning.php'; ?> + <?php include 'layout.initial-state.php'; ?> <div id="skip-actions"> <?php if ($_['id-app-content'] !== null) { ?><a href="<?php p($_['id-app-content']); ?>" class="button primary skip-navigation skip-content"><?php p($l->t('Skip to main content')); ?></a><?php } ?> @@ -63,17 +63,17 @@ p($theme->getTitle()); </div> <header id="header"> - <div class="header-left"> + <div class="header-start"> <a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>" aria-label="<?php p($l->t('Go to %s', [$_['logoUrl'] ?: $_['defaultAppName']])); ?>" id="nextcloud"> <div class="logo logo-icon"></div> </a> - <nav id="header-left__appmenu"></nav> + <nav id="header-start__appmenu"></nav> </div> - <div class="header-right"> + <div class="header-end"> <div id="unified-search"></div> <div id="notifications"></div> <div id="contactsmenu"></div> @@ -81,15 +81,15 @@ p($theme->getTitle()); </div> </header> - <main id="content" class="app-<?php p($_['appid']) ?>"> + <div id="content" class="app-<?php p($_['appid']) ?>"> <h1 class="hidden-visually" id="page-heading-level-1"> <?php p((!empty($_['application']) && !empty($_['pageTitle']) && $_['application'] != $_['pageTitle']) - ? $_['application'].': '.$_['pageTitle'] + ? $_['application'] . ': ' . $_['pageTitle'] : (!empty($_['pageTitle']) ? $_['pageTitle'] : $theme->getName()) ); ?> </h1> <?php print_unescaped($_['content']); ?> - </main> + </div> <div id="profiler-toolbar"></div> </body> </html> |