mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
various bug fixes (#1010)
* various bug fixes * use 'remove favorite' label where appropriate * fix toggle favorite component labels * e2e type check and fixes * favorite library label * support toggle favorite component selectors * update tests * update e2e tests * update e2e * e2e update * update e2e
This commit is contained in:
@@ -14,9 +14,11 @@
|
||||
{{ 'APP.LANGUAGE' | translate }}
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="onLogoutEvent()" adf-logout>
|
||||
{{ 'APP.SIGN_OUT' | translate }}
|
||||
</button>
|
||||
<ng-container *ngIf="showLogout">
|
||||
<button mat-menu-item (click)="onLogoutEvent()" adf-logout>
|
||||
{{ 'APP.SIGN_OUT' | translate }}
|
||||
</button>
|
||||
</ng-container>
|
||||
</mat-menu>
|
||||
|
||||
<mat-menu #langMenu="matMenu">
|
||||
|
@@ -33,6 +33,7 @@ import {
|
||||
import { AppStore } from '../../store/states';
|
||||
import { ProfileState } from '@alfresco/adf-extensions';
|
||||
import { SetSelectedNodesAction } from '../../store/actions';
|
||||
import { AppService } from '../../services/app.service';
|
||||
|
||||
@Component({
|
||||
selector: 'aca-current-user',
|
||||
@@ -44,7 +45,11 @@ export class CurrentUserComponent {
|
||||
profile$: Observable<ProfileState>;
|
||||
languagePicker$: Observable<boolean>;
|
||||
|
||||
constructor(private store: Store<AppStore>) {
|
||||
get showLogout(): boolean {
|
||||
return !this.appService.withCredentials;
|
||||
}
|
||||
|
||||
constructor(private store: Store<AppStore>, private appService: AppService) {
|
||||
this.profile$ = this.store.select(selectUser);
|
||||
this.languagePicker$ = store.select(appLanguagePicker);
|
||||
}
|
||||
|
@@ -44,12 +44,16 @@ import { Router } from '@angular/router';
|
||||
[attr.title]="
|
||||
favoriteLibrary.isFavorite()
|
||||
? ('APP.ACTIONS.REMOVE_FAVORITE' | translate)
|
||||
: ('APP.ACTIONS.ADD_FAVORITE' | translate)
|
||||
: ('APP.ACTIONS.FAVORITE' | translate)
|
||||
"
|
||||
>
|
||||
<mat-icon *ngIf="favoriteLibrary.isFavorite()">star</mat-icon>
|
||||
<mat-icon *ngIf="!favoriteLibrary.isFavorite()">star_border</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
|
||||
<span>{{
|
||||
(favoriteLibrary.isFavorite()
|
||||
? 'APP.ACTIONS.REMOVE_FAVORITE'
|
||||
: 'APP.ACTIONS.FAVORITE') | translate
|
||||
}}</span>
|
||||
</button>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
@@ -42,7 +42,11 @@ import { ReloadDocumentListAction } from '../../../store/actions';
|
||||
>
|
||||
<mat-icon *ngIf="favorites.hasFavorites()">star</mat-icon>
|
||||
<mat-icon *ngIf="!favorites.hasFavorites()">star_border</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
|
||||
<span>{{
|
||||
(favorites.hasFavorites()
|
||||
? 'APP.ACTIONS.REMOVE_FAVORITE'
|
||||
: 'APP.ACTIONS.FAVORITE') | translate
|
||||
}}</span>
|
||||
</button>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
Reference in New Issue
Block a user