MOBILE-4069 user: Fix tablet user menu button

main
Noel De Martin 2022-07-11 16:17:47 +02:00
parent a07c545b11
commit 618c89b9d0
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<core-user-avatar *ngIf="isMainScreen && siteInfo" [user]="siteInfo" class="core-bar-button-image clickable" [linkProfile]="false" <core-user-avatar *ngIf="(alwaysShow || isMainScreen) && siteInfo" [user]="siteInfo" class="core-bar-button-image clickable"
(ariaButtonClick)="openUserMenu($event)" [userTour]="userTour" role="button" tabindex="0" [linkProfile]="false" (ariaButtonClick)="openUserMenu($event)" [userTour]="userTour" role="button" tabindex="0"
[attr.aria-label]="'core.user.useraccount' | translate"> [attr.aria-label]="'core.user.useraccount' | translate">
</core-user-avatar> </core-user-avatar>

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { CoreSiteInfo } from '@classes/site'; import { CoreSiteInfo } from '@classes/site';
import { CoreUserTourDirectiveOptions } from '@directives/user-tour'; import { CoreUserTourDirectiveOptions } from '@directives/user-tour';
import { CoreUserToursAlignment, CoreUserToursSide } from '@features/usertours/services/user-tours'; import { CoreUserToursAlignment, CoreUserToursSide } from '@features/usertours/services/user-tours';
@ -35,6 +35,7 @@ import { CoreMainMenuUserMenuComponent } from '../user-menu/user-menu';
}) })
export class CoreMainMenuUserButtonComponent implements OnInit { export class CoreMainMenuUserButtonComponent implements OnInit {
@Input() alwaysShow = false;
siteInfo?: CoreSiteInfo; siteInfo?: CoreSiteInfo;
isMainScreen = false; isMainScreen = false;
userTour: CoreUserTourDirectiveOptions = { userTour: CoreUserTourDirectiveOptions = {

View File

@ -3,7 +3,7 @@
<ion-tab-bar slot="bottom" class="mainmenu-tabs" [@menuVisibilityAnimation]="visibility"> <ion-tab-bar slot="bottom" class="mainmenu-tabs" [@menuVisibilityAnimation]="visibility">
<ion-spinner *ngIf="!loaded" [attr.aria-label]="'core.loading' | translate"></ion-spinner> <ion-spinner *ngIf="!loaded" [attr.aria-label]="'core.loading' | translate"></ion-spinner>
<core-user-menu-button *ngIf="loaded && tabsPlacement == 'side'"></core-user-menu-button> <core-user-menu-button *ngIf="loaded && tabsPlacement == 'side'" [alwaysShow]="true"></core-user-menu-button>
<ion-tab-button *ngFor="let tab of tabs" (keydown)="tabAction.keyDown($event)" (keyup)="tabAction.keyUp(tab.page, $event)" <ion-tab-button *ngFor="let tab of tabs" (keydown)="tabAction.keyDown($event)" (keyup)="tabAction.keyUp(tab.page, $event)"
[hidden]="!loaded && tab.hide" [tab]="tab.page" [disabled]="tab.hide" layout="label-hide" class="{{tab.class}}" [hidden]="!loaded && tab.hide" [tab]="tab.page" [disabled]="tab.hide" layout="label-hide" class="{{tab.class}}"