Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

feat(settings): Move "keyboard layout" from VM creation to Settings #1220

Merged
merged 13 commits into from
Sep 24, 2018
Prev Previous commit
Next Next commit
Merge branch 'master' into 861-keyboard
# Conflicts:
#	src/app/reducers/vm/redux/vm-creation.effects.ts
#	src/app/settings/containers/settings/settings.component.ts
HeyRoach committed Sep 24, 2018
commit 279c747d6f596c84159fb58ef08418cd748d744b
17 changes: 8 additions & 9 deletions src/app/reducers/vm/redux/vm-creation.effects.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Injectable } from '@angular/core';
import { MatDialog } from '@angular/material';
import { Action, Store } from '@ngrx/store';
import { Action, select, Store } from '@ngrx/store';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { Observable, of } from 'rxjs';
import { catchError, filter, map, switchMap, tap, withLatestFrom } from 'rxjs/operators';

import { Utils } from '../../../shared/services/utils/utils.service';
import { DialogService, ParametrizedTranslation } from '../../../dialog/dialog-service/dialog.service';
@@ -249,8 +249,7 @@ export class VirtualMachineCreationEffects {
}));

@Effect()
deploying$ = this.actions$
.pipe(
deploying$ = this.actions$.pipe(
ofType(vmActions.VM_DEPLOYMENT_REQUEST),
withLatestFrom(this.store.select(UserTagsSelectors.getKeyboardLayout)),
switchMap(([action, keyboard]: [vmActions.DeploymentRequest, string]) => {
@@ -307,10 +306,10 @@ export class VirtualMachineCreationEffects {
catchError((error) => of(new vmActions.DeploymentRequestError(error))))));
}));

@Effect({dispatch: false})
changeStatusOfDeployment$ = this.actions$
.ofType(vmActions.VM_DEPLOYMENT_CHANGE_STATUS)
.do((action: vmActions.DeploymentChangeStatus) => {
@Effect({ dispatch: false })
changeStatusOfDeployment$ = this.actions$.pipe(
ofType(vmActions.VM_DEPLOYMENT_CHANGE_STATUS),
tap((action: vmActions.DeploymentChangeStatus) => {
this.handleDeploymentMessages(action.payload);
}));

4 changes: 2 additions & 2 deletions src/app/settings/containers/settings/settings.component.ts
Original file line number Diff line number Diff line change
@@ -54,8 +54,8 @@ export class SettingsComponent {
}

public onPasswordChange(password: string) {
this.askToUpdatePassword()
.filter(Boolean)
this.askToUpdatePassword().pipe(
filter(Boolean))
.subscribe(() =>
this.userService
.updatePassword(this.userId, password)
You are viewing a condensed version of this merge commit. You can view the full changes here.