From d5b520888f02be67bf201788454c9ecd88dff9bd Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 10 May 2018 17:03:38 +0200 Subject: [PATCH] UI fixes. --- .../pages/graphql/graphql-page.component.scss | 24 ++++++++++--------- .../pages/graphql/graphql-page.component.ts | 20 ++++------------ 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss b/src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss index d96fc408f..41707fac7 100644 --- a/src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss +++ b/src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss @@ -1,19 +1,21 @@ @import '_vars'; @import '_mixins'; -@import '~graphiql/graphiql'; +:host /deep/ { + @import '~graphiql/graphiql'; -.graphiql-container { - & { - @include absolute(0, 0, 0, 0); - } + .graphiql-container { + & { + @include absolute(0, 0, 0, 0); + } - & * { - box-sizing: content-box; - } + & * { + box-sizing: content-box; + } - // sass-lint:disable class-name-format - & .editorWrap { - overflow: hidden; + // sass-lint:disable class-name-format + & .editorWrap { + overflow: hidden; + } } } \ No newline at end of file diff --git a/src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts b/src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts index 7f4a9d50f..e6ad3c4d1 100644 --- a/src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts +++ b/src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts @@ -5,7 +5,7 @@ * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. */ -import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { Observable } from 'rxjs'; import * as React from 'react'; @@ -15,17 +15,12 @@ const GraphiQL = require('graphiql'); /* tslint:disable:use-view-encapsulation */ -import { - AppsState, - GraphQlService, - LocalStoreService -} from '@app/shared'; +import { AppsState, GraphQlService } from '@app/shared'; @Component({ selector: 'sqx-graphql-page', styleUrls: ['./graphql-page.component.scss'], - templateUrl: './graphql-page.component.html', - encapsulation: ViewEncapsulation.None + templateUrl: './graphql-page.component.html' }) export class GraphQLPageComponent implements OnInit { @ViewChild('graphiQLContainer') @@ -33,8 +28,7 @@ export class GraphQLPageComponent implements OnInit { constructor( public readonly appsState: AppsState, - private readonly graphQlService: GraphQlService, - private readonly localStoreService: LocalStoreService + private readonly graphQlService: GraphQlService ) { } @@ -43,11 +37,7 @@ export class GraphQLPageComponent implements OnInit { React.createElement(GraphiQL, { fetcher: (params: any) => { return this.request(params); - }, - onEditQuery: (query: string) => { - this.localStoreService.set('graphiQlQuery', query); - }, - query: this.localStoreService.get('graphiQlQuery') + } }), this.graphiQLContainer.nativeElement );