merge with main conflicts solved

main
elena 2023-04-03 08:45:40 +00:00
commit 28430d8fe2
1 changed files with 48 additions and 8 deletions

View File

@ -21,6 +21,8 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
*/
$api_url = "https://" . preg_replace('/^nextcloud\./', 'api.', $_SERVER['HTTP_HOST']);
$profile_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/account";
$showsettings = in_array($_['user_uid'], ['admin', 'ddadmin']) ? true : false;
// Remove user menu Settings item for non-administrator users
if(!array_key_exists('core_apps', $_["settingsnavigation"])){
@ -72,6 +74,26 @@ $getUserAvatar = static function (int $size) use ($_): string {
.newFileMenu > ul:nth-child(1) > li:nth-child(3) {
order: 1;
}
#header .header-right>div>.menu:after {
display:none;
}
.ddicon {
position: relative;
left: 8px;
top: 9px;
}
.ddiconcontainer {
margin-right: 16px;
width: 36px;
height: 36px;
background-color: #f0f0f0;
position: relative;
border-radius: 5px;
left: -7px;
}
#expanddiv {
padding: .5rem .7rem;
}
</style>
</head>
<?php array_push($_['enabledThemes'], "light");?>
@ -137,15 +159,33 @@ $getUserAvatar = static function (int $size) use ($_): string {
</div>
<nav class="settings-menu" id="expanddiv" style="display:none;">
<ul>
<?php foreach ($_['settingsnavigation'] as $entry):?>
<li data-id="<?php p($entry['id']); ?>">
<a href="<?php print_unescaped($entry['href'] !== '' ? $entry['href'] : '#'); ?>"
<?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
<?php p($entry['name']) ?>
<li>
<a target="_blank" href="<?php p($profile_url)?>">
<div class="ddiconcontainer">
<i class="icon fa fa-user fa-fw ddicon"></i>
</div>
<?php p($_['user_displayname']); ?>
</a>
</li>
<?php endforeach; ?>
</li>
<?php foreach ($_['settingsnavigation'] as $entry):?>
<?php if ($showsettings) { ?>
<li data-id="<?php p($entry['id']); ?>">
<a href="<?php print_unescaped($entry['href']); ?>"
<?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
<?php p($entry['name']) ?>
</a>
</li>
<?php } else if ($entry['id'] == 'logout') { ?>
<li data-id="<?php p($entry['id']); ?>">
<a href="<?php print_unescaped($entry['href']); ?>">
<div class="ddiconcontainer">
<i class="icon fa fa-sign-out fa-fw ddicon" aria-hidden="true"></i> </div>
<?php p($entry['name']) ?>
</a>
</li>
<?php } ?>
<?php endforeach; ?>
</ul>
</nav>
</div>