jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/349114 )
Change subject: Reveal login/logout buttons when non-js editing is available ...................................................................... Reveal login/logout buttons when non-js editing is available Bug: T125174 Change-Id: If8094372ae01ba7c58eb1bd9a8b20ad9df50a85f --- M includes/skins/SkinMinerva.php M resources/mobile.mainMenu/mainmenu.less M resources/mobile.special.mobilemenu.styles/mobilemenu.less 3 files changed, 15 insertions(+), 22 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index c7b851a..690aa8e 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -645,6 +645,7 @@ */ protected function insertLogInOutMenuItem( MenuBuilder $menu ) { $query = []; + $canEdit = $this->getMFConfig()->get( 'MFAllowNonJavaScriptEditing' ); if ( !$this->getRequest()->wasPosted() ) { $returntoquery = $this->getRequest()->getValues(); unset( $returntoquery['title'] ); @@ -665,7 +666,7 @@ $url = SpecialPage::getTitleFor( 'Userlogout' )->getLocalURL( $query ); $username = $user->getName(); - $menu->insert( 'auth' ) + $menu->insert( 'auth', $isJSOnly = !$canEdit ) ->addComponent( $username, Title::newFromText( $username, NS_USER )->getLocalUrl(), @@ -687,7 +688,7 @@ unset( $returntoquery['campaign'] ); $query[ 'returntoquery' ] = wfArrayToCgi( $returntoquery ); $url = $this->getLoginUrl( $query ); - $menu->insert( 'auth', $isJSOnly = true ) + $menu->insert( 'auth', $isJSOnly = !$canEdit ) ->addComponent( $this->msg( 'mobile-frontend-main-menu-login' )->escaped(), $url, diff --git a/resources/mobile.mainMenu/mainmenu.less b/resources/mobile.mainMenu/mainmenu.less index 75f0e88..d225405 100644 --- a/resources/mobile.mainMenu/mainmenu.less +++ b/resources/mobile.mainMenu/mainmenu.less @@ -56,21 +56,19 @@ float: left; min-height: 100%; - .client-js & { - .secondary-action { - border: 0; - position: absolute; - right: 0; - top: 0; - bottom: 0; - padding-right: 0; - border-left: 1px solid @grayMediumLight; - } + .secondary-action { + border: 0; + position: absolute; + right: 0; + top: 0; + bottom: 0; + padding-right: 0; + border-left: 1px solid @grayMediumLight; + } - .primary-action { - // 1px for the logout icon border-left - margin-right: @iconSize + @iconGutterWidth * 2; - } + .primary-action { + // 1px for the logout icon border-left + margin-right: @iconSize + @iconGutterWidth * 2; } ul { diff --git a/resources/mobile.special.mobilemenu.styles/mobilemenu.less b/resources/mobile.special.mobilemenu.styles/mobilemenu.less index 7582bc5..9b7d346 100644 --- a/resources/mobile.special.mobilemenu.styles/mobilemenu.less +++ b/resources/mobile.special.mobilemenu.styles/mobilemenu.less @@ -16,9 +16,3 @@ display: none; } } - -.client-nojs { - nav .secondary-action { - display: none; - } -} -- To view, visit https://gerrit.wikimedia.org/r/349114 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8094372ae01ba7c58eb1bd9a8b20ad9df50a85f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits