From f11f2d53798f224624723a8ea80f965b58a5a440 Mon Sep 17 00:00:00 2001 From: mrmeku Date: Thu, 18 Apr 2019 14:35:00 -0600 Subject: [PATCH] fix(settings): Set initial value of disabled animations (#657) --- .../src/lib/workspace/workspace.component.ts | 7 ------- libs/utils/src/lib/settings.service.ts | 2 ++ package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/libs/feature-workspaces/src/lib/workspace/workspace.component.ts b/libs/feature-workspaces/src/lib/workspace/workspace.component.ts index 1c4aa2c3e1..1014683155 100644 --- a/libs/feature-workspaces/src/lib/workspace/workspace.component.ts +++ b/libs/feature-workspaces/src/lib/workspace/workspace.component.ts @@ -15,7 +15,6 @@ import { import { ChangeDetectionStrategy, Component, - HostBinding, Inject, OnDestroy, OnInit, @@ -78,8 +77,6 @@ const TASK_RUNNER_GHOST_STYLE = style({ ] }) export class WorkspaceComponent implements OnInit, OnDestroy { - @HostBinding('@.disabled') animationsDisabled = false; - readonly activeRouteTitle$: Observable = this.router.events.pipe( filter(event => event instanceof NavigationEnd), map(() => { @@ -240,8 +237,4 @@ export class WorkspaceComponent implements OnInit, OnDestroy { this.subscription.unsubscribe(); this.editorSubscription.unsubscribe(); } - - toggleAnimations() { - this.animationsDisabled = !this.animationsDisabled; - } } diff --git a/libs/utils/src/lib/settings.service.ts b/libs/utils/src/lib/settings.service.ts index 3911884d64..65e9c81da9 100644 --- a/libs/utils/src/lib/settings.service.ts +++ b/libs/utils/src/lib/settings.service.ts @@ -174,12 +174,14 @@ export class Settings { first(), tap(r => { this.settings = (r.data as any).settings; + this.disabledAnimationsSubject.next(this.settings.disableAnimations); }) ); } private store(v: SettingsModels.Settings) { this.settings = v; + this.disabledAnimationsSubject.next(this.settings.disableAnimations); this.updateSettingsGQL .mutate({ data: JSON.stringify({ ...v }) diff --git a/package.json b/package.json index 0e72c280cb..9ed9b1b551 100644 --- a/package.json +++ b/package.json @@ -107,8 +107,8 @@ "@nestjs/common": "5.7.0", "@nestjs/core": "5.7.0", "@nestjs/graphql": "5.5.1", - "@nrwl/angular-console-enterprise-electron": "0.1.207", - "@nrwl/angular-console-enterprise-frontend": "0.1.207", + "@nrwl/angular-console-enterprise-electron": "0.1.306", + "@nrwl/angular-console-enterprise-frontend": "0.1.306", "@nrwl/builders": "7.7.2", "@nrwl/schematics": "7.7.2", "@schematics/angular": "7.3.1", diff --git a/yarn.lock b/yarn.lock index 4ccd867abe..b695734f3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,10 +690,10 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@nrwl/angular-console-enterprise-electron@0.1.207": - version "0.1.207" - resolved "https://registry.yarnpkg.com/@nrwl/angular-console-enterprise-electron/-/angular-console-enterprise-electron-0.1.207.tgz#b3bd3960313d66c355a90bc556856545d7fd5901" - integrity sha512-y8t4wBhyesUTkjZ3ZMNy1Fc2lzhNXYv8fOhH6xgivGuabOtEQbuqFzYMy655eOWjrbjhf6YSzSPk1ax6e8RgFg== +"@nrwl/angular-console-enterprise-electron@0.1.306": + version "0.1.306" + resolved "https://registry.yarnpkg.com/@nrwl/angular-console-enterprise-electron/-/angular-console-enterprise-electron-0.1.306.tgz#e04b266699e72936cdba83b960ae54065e94b5a2" + integrity sha512-IALLK8CB2GgzXjOCDgsV3LeZbLsXWKgSKMxJgR1H9MRGMFnSRUr3km+7+gy176FEODLmpSetVDzhFYMPL4ycBg== dependencies: apollo-cache-inmemory "1.3.10" apollo-client "^2.3.5" @@ -704,10 +704,10 @@ request "2.88.0" tslib "^1.9.0" -"@nrwl/angular-console-enterprise-frontend@0.1.207": - version "0.1.207" - resolved "https://registry.yarnpkg.com/@nrwl/angular-console-enterprise-frontend/-/angular-console-enterprise-frontend-0.1.207.tgz#75744876ee4b1df9b29c143f475304c097c1dd39" - integrity sha512-CC127sfj0dYh/fRJWcRDTpFHGQ2LYldFIlvILAN0ClcJKMwrALUosWTlKCxxLeMQ8fHz9Yj0BKfs5bf/cSqQow== +"@nrwl/angular-console-enterprise-frontend@0.1.306": + version "0.1.306" + resolved "https://registry.yarnpkg.com/@nrwl/angular-console-enterprise-frontend/-/angular-console-enterprise-frontend-0.1.306.tgz#89481b6371f70d65bafda7f0aef015270e8f03e0" + integrity sha512-7y6JDpD3EJA8D1n3poMySBid1uy4A2vXl8HOhyqFNW9WNqJVjeiuI7SJoo6ae2EY1nMe61MX2xtNgTPrK5rvKQ== dependencies: d3-ease "^1.0.5" d3-format "^1.3.2"