diff --git a/apps/angular-console/src/app/app.component.html b/apps/angular-console/src/app/app.component.html index b1014711c6..c90c036ab8 100644 --- a/apps/angular-console/src/app/app.component.html +++ b/apps/angular-console/src/app/app.component.html @@ -1,4 +1,9 @@ -
+
Send anonymous usage data
@@ -25,8 +25,8 @@

Auto Update Channel

Latest Beta @@ -36,6 +36,18 @@

Auto Update Channel

Features

+
+
+

Disable Animations

+

+ Disable all animations for a snappier feel +

+
+ +

Use detailed status

@@ -44,8 +56,8 @@

Use detailed status

@@ -56,8 +68,8 @@

Use WSL (Windows users only)

@@ -68,8 +80,8 @@

Use NVM (Supports OS X, Linux and WSL)

diff --git a/libs/feature-settings/src/lib/settings/settings.component.ts b/libs/feature-settings/src/lib/settings/settings.component.ts index 75cf25f2b5..b750869ac5 100644 --- a/libs/feature-settings/src/lib/settings/settings.component.ts +++ b/libs/feature-settings/src/lib/settings/settings.component.ts @@ -9,48 +9,12 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; }) export class SettingsComponent { constructor( - private readonly settingsService: Settings, + readonly settings: Settings, @Inject('telemetry') private readonly telemetry: Telemetry ) {} - canCollectionData() { - return this.settingsService.canCollectData(); - } - toggleDataCollection(x: boolean) { - this.settingsService.setCanCollectData(x); + this.settings.setCanCollectData(x); this.telemetry.reportDataCollectionEvent(x); } - - enableDetailedStatus() { - return this.settingsService.enableDetailedStatus(); - } - - toggleDetailedStatus(x: boolean) { - this.settingsService.setEnableDetailedStatus(x); - } - - setChannel(channel: 'latest' | 'beta' | 'alpha') { - this.settingsService.setChannel(channel); - } - - getChannel() { - return this.settingsService.getChannel(); - } - - isWsl() { - return this.settingsService.isWsl(); - } - - useNvm() { - return this.settingsService.useNvm(); - } - - toggleUseNvm(x: boolean) { - this.settingsService.setUseNvm(x); - } - - toggleIsWsl(x: boolean) { - this.settingsService.setIsWsl(x); - } } diff --git a/libs/schema/src/lib/generated/graphql-types.ts b/libs/schema/src/lib/generated/graphql-types.ts index f6cdf1224b..d192c05995 100644 --- a/libs/schema/src/lib/generated/graphql-types.ts +++ b/libs/schema/src/lib/generated/graphql-types.ts @@ -35,6 +35,8 @@ export interface Settings { isConnectUser?: Maybe; + disableAnimations?: Maybe; + showSupportPlugin?: Maybe; installNodeManually?: Maybe; @@ -665,6 +667,12 @@ export namespace SettingsResolvers { isConnectUser?: IsConnectUserResolver, TypeParent, Context>; + disableAnimations?: DisableAnimationsResolver< + Maybe, + TypeParent, + Context + >; + showSupportPlugin?: ShowSupportPluginResolver< Maybe, TypeParent, @@ -714,6 +722,11 @@ export namespace SettingsResolvers { Parent = any, Context = any > = Resolver; + export type DisableAnimationsResolver< + R = Maybe, + Parent = any, + Context = any + > = Resolver; export type ShowSupportPluginResolver< R = Maybe, Parent = any, diff --git a/libs/server/src/assets/schema.graphql b/libs/server/src/assets/schema.graphql index f4355f9791..35e429bc5e 100644 --- a/libs/server/src/assets/schema.graphql +++ b/libs/server/src/assets/schema.graphql @@ -248,6 +248,7 @@ type WorkspaceDefinition { type Settings { canCollectData: Boolean! isConnectUser: Boolean + disableAnimations: Boolean showSupportPlugin: Boolean installNodeManually: Boolean enableDetailedStatus: Boolean diff --git a/libs/utils/src/lib/graphql/settings.graphql b/libs/utils/src/lib/graphql/settings.graphql index 5ddc2caad1..86dfb3e2ec 100644 --- a/libs/utils/src/lib/graphql/settings.graphql +++ b/libs/utils/src/lib/graphql/settings.graphql @@ -6,6 +6,7 @@ query Settings { installNodeManually enableDetailedStatus channel + disableAnimations isConnectUser recent { path diff --git a/libs/utils/src/lib/settings.service.ts b/libs/utils/src/lib/settings.service.ts index 8b2b99ed93..da679d3be4 100644 --- a/libs/utils/src/lib/settings.service.ts +++ b/libs/utils/src/lib/settings.service.ts @@ -26,6 +26,7 @@ export class Settings { enableDetailedStatus: true, isConnectUser: false, channel: 'latest', + disableAnimations: true, isWsl: false, useNvm: false }; @@ -108,6 +109,14 @@ export class Settings { return this.settings.channel; } + setDisableAnimations(disableAnimations: boolean): void { + this.store({ ...this.settings, disableAnimations }); + } + + useDisableAnimations() { + return this.settings.disableAnimations; + } + showConnectPlugin(): boolean { return true; } diff --git a/package.json b/package.json index 69ce54a66d..bde47d60ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-console", - "version": "7.4.3", + "version": "7.4.6", "private": true, "publisher": "nrwl", "author": {