mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-06-02 17:34:51 +00:00
[ACA-1748] Logout - reset selection (#599)
This commit is contained in:
parent
df58726938
commit
babf2fb2ad
@ -25,7 +25,7 @@
|
||||
{{ 'APP.SETTINGS.TITLE' | translate }}
|
||||
</button>
|
||||
|
||||
<button mat-menu-item adf-logout>
|
||||
<button mat-menu-item (click)="onLogoutEvent()" adf-logout>
|
||||
{{ 'APP.SIGN_OUT' | translate }}
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
@ -29,6 +29,7 @@ import { Observable } from 'rxjs';
|
||||
import { selectUser, appLanguagePicker } from '../../store/selectors/app.selectors';
|
||||
import { AppStore } from '../../store/states';
|
||||
import { ProfileState } from '@alfresco/adf-extensions';
|
||||
import { SetSelectedNodesAction } from '../../store/actions';
|
||||
|
||||
@Component({
|
||||
selector: 'aca-current-user',
|
||||
@ -40,8 +41,12 @@ export class CurrentUserComponent {
|
||||
profile$: Observable<ProfileState>;
|
||||
languagePicker$: Observable<boolean>;
|
||||
|
||||
constructor(store: Store<AppStore>) {
|
||||
this.profile$ = store.select(selectUser);
|
||||
constructor(private store: Store<AppStore>) {
|
||||
this.profile$ = this.store.select(selectUser);
|
||||
this.languagePicker$ = store.select(appLanguagePicker);
|
||||
}
|
||||
|
||||
onLogoutEvent() {
|
||||
this.store.dispatch(new SetSelectedNodesAction([]));
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ export const INITIAL_APP_STATE: AppState = {
|
||||
languagePicker: false,
|
||||
sharedUrl: '',
|
||||
user: {
|
||||
isAdmin: true, // 5.2.x
|
||||
isAdmin: null,
|
||||
id: null,
|
||||
firstName: '',
|
||||
lastName: ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user