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 '_vars';
@import '_mixins'; @import '_mixins';
@import '~graphiql/graphiql'; :host /deep/ {
@import '~graphiql/graphiql';
.graphiql-container { .graphiql-container {
& { & {
@include absolute(0, 0, 0, 0); @include absolute(0, 0, 0, 0);
} }
& * { & * {
box-sizing: content-box; box-sizing: content-box;
} }
// sass-lint:disable class-name-format // sass-lint:disable class-name-format
& .editorWrap { & .editorWrap {
overflow: hidden; 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. * 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 { Observable } from 'rxjs';
import * as React from 'react'; import * as React from 'react';
@ -15,17 +15,12 @@ const GraphiQL = require('graphiql');
/* tslint:disable:use-view-encapsulation */ /* tslint:disable:use-view-encapsulation */
import { import { AppsState, GraphQlService } from '@app/shared';
AppsState,
GraphQlService,
LocalStoreService
} from '@app/shared';
@Component({ @Component({
selector: 'sqx-graphql-page', selector: 'sqx-graphql-page',
styleUrls: ['./graphql-page.component.scss'], styleUrls: ['./graphql-page.component.scss'],
templateUrl: './graphql-page.component.html', templateUrl: './graphql-page.component.html'
encapsulation: ViewEncapsulation.None
}) })
export class GraphQLPageComponent implements OnInit { export class GraphQLPageComponent implements OnInit {
@ViewChild('graphiQLContainer') @ViewChild('graphiQLContainer')
@ -33,8 +28,7 @@ export class GraphQLPageComponent implements OnInit {
constructor( constructor(
public readonly appsState: AppsState, public readonly appsState: AppsState,
private readonly graphQlService: GraphQlService, private readonly graphQlService: GraphQlService
private readonly localStoreService: LocalStoreService
) { ) {
} }
@ -43,11 +37,7 @@ export class GraphQLPageComponent implements OnInit {
React.createElement(GraphiQL, { React.createElement(GraphiQL, {
fetcher: (params: any) => { fetcher: (params: any) => {
return this.request(params); return this.request(params);
}, }
onEditQuery: (query: string) => {
this.localStoreService.set('graphiQlQuery', query);
},
query: this.localStoreService.get('graphiQlQuery')
}), }),
this.graphiQLContainer.nativeElement this.graphiQLContainer.nativeElement
); );

Loading…
Cancel
Save