Skip to content

Commit

Permalink
fix(settings): Set initial value of disabled animations (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku authored Apr 18, 2019
1 parent ee6d032 commit f11f2d5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
import {
ChangeDetectionStrategy,
Component,
HostBinding,
Inject,
OnDestroy,
OnInit,
Expand Down Expand Up @@ -78,8 +77,6 @@ const TASK_RUNNER_GHOST_STYLE = style({
]
})
export class WorkspaceComponent implements OnInit, OnDestroy {
@HostBinding('@.disabled') animationsDisabled = false;

readonly activeRouteTitle$: Observable<string> = this.router.events.pipe(
filter(event => event instanceof NavigationEnd),
map(() => {
Expand Down Expand Up @@ -240,8 +237,4 @@ export class WorkspaceComponent implements OnInit, OnDestroy {
this.subscription.unsubscribe();
this.editorSubscription.unsubscribe();
}

toggleAnimations() {
this.animationsDisabled = !this.animationsDisabled;
}
}
2 changes: 2 additions & 0 deletions libs/utils/src/lib/settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].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/[email protected].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"
Expand All @@ -704,10 +704,10 @@
request "2.88.0"
tslib "^1.9.0"

"@nrwl/[email protected].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/[email protected].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"
Expand Down

0 comments on commit f11f2d5

Please sign in to comment.