Browse Source

UI fixes.

pull/285/head
Sebastian 8 years ago
parent
commit
d5b520888f
  1. 24
      src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss
  2. 20
      src/Squidex/app/features/api/pages/graphql/graphql-page.component.ts

24
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;
}
}
}

20
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
);

Loading…
Cancel
Save