feat: move ULS button back to personal menu

This commit is contained in:
alistair3149 2021-03-11 21:09:24 -05:00
parent 1a72f99dd5
commit 4fb5005bd0
2 changed files with 37 additions and 26 deletions

View file

@ -53,16 +53,13 @@ final class Header extends Partial {
);
$user = $this->skin->getUser();
// Move the Echo badges and ULS out of default list
// Move the Echo badges out of default list
if ( isset( $personalTools['notifications-alert'] ) ) {
unset( $personalTools['notifications-alert'] );
}
if ( isset( $personalTools['notifications-notice'] ) ) {
unset( $personalTools['notifications-notice'] );
}
if ( isset( $personalTools['uls'] ) ) {
unset( $personalTools['uls'] );
}
if ( $user->isLoggedIn() ) {
$personalTools = $this->addUserInfoToMenu( $personalTools, $user );
@ -79,7 +76,7 @@ final class Header extends Partial {
}
/**
* Echo notification badges and ULS button
* Echo notification badges button
*
* @return array
*/
@ -88,7 +85,7 @@ final class Header extends Partial {
$this->skin->buildPersonalUrlsPublic()
);
// Create the Echo badges and ULS
// Create the Echo badges
$extraTools = [];
if ( isset( $personalTools['notifications-alert'] ) ) {
$extraTools['notifications-alert'] = $personalTools['notifications-alert'];
@ -96,9 +93,6 @@ final class Header extends Partial {
if ( isset( $personalTools['notifications-notice'] ) ) {
$extraTools['notifications-notice'] = $personalTools['notifications-notice'];
}
if ( isset( $personalTools['uls'] ) ) {
$extraTools['uls'] = $personalTools['uls'];
}
$html = $this->skin->getMenuData( 'personal-extra', $extraTools );

View file

@ -4,29 +4,46 @@
*/
@import '../../../resources/variables.less';
@import '../../../resources/mixins.less';
.skin-citizen {
// Styles for ULS icon
#pt-uls a.uls-trigger,
#pt-uls a.uls-trigger:before {
display: block;
width: var( --width-button-base );
height: var( --height-header );
padding: 0 !important;
background-position: center;
background-size: @icon-box-size;
color: transparent; // Hide text
opacity: 0.6; // Replicate color of other icons
transition: @transition-opacity-quick;
#pt-uls a.uls-trigger {
flex-direction: row-reverse;
padding-top: 10px !important; // override
&:before {
.resource-loader-list-icon;
display: block;
padding: 0;
margin-left: @icon-padding;
background-size: contain;
opacity: var( --opacity-icon-base );
transition: @transition-opacity-quick;
}
&:hover {
&:before {
opacity: var( --opacity-icon-base--hover );
}
}
&:hover,
&:focus,
&:active {
opacity: 0.8;
&:before {
opacity: var( --opacity-icon-base--active );
}
}
&:after {
content: none !important;
}
}
}
.skin-citizen-dark {
#pt-uls a.uls-trigger {
&:before {
filter: invert( 1 );
}
}
}