Browse Source

Panel fixes.

pull/271/head
Sebastian Stehle 8 years ago
parent
commit
db509665f6
  1. 44
      src/Squidex/app/features/api/api-area.component.html
  2. 4
      src/Squidex/app/features/api/pages/graphql/graphql-page.component.html
  3. 10
      src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss
  4. 2
      src/Squidex/app/framework/angular/modals/root-view.component.ts
  5. 9
      src/Squidex/app/framework/angular/panel-container.directive.ts
  6. 4
      src/Squidex/app/framework/angular/panel.component.html
  7. 3
      src/Squidex/app/framework/angular/panel.component.ts

44
src/Squidex/app/features/api/api-area.component.html

@ -1,33 +1,25 @@
<sqx-title message="{app} | Settings" parameter1="app" [value1]="appsState.appName"></sqx-title>
<sqx-panel theme="dark" desiredWidth="12rem">
<div class="panel-header">
<div class="panel-title-row">
<h3 class="panel-title">API</h3>
</div>
<ng-container title>
API
</ng-container>
<a class="panel-close" sqxParentLink isLazyLoaded="true">
<i class="icon-close"></i>
</a>
</div>
<div class="panel-main">
<div class="panel-content">
<ul class="nav nav-panel nav-dark flex-column">
<li class="nav-item">
<a class="nav-link" routerLink="graphql" routerLinkActive="active">
GraphQL
<i class="icon-angle-right"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/content/{{appsState.appName}}/docs" target="_blank">
Swagger
</a>
</li>
</ul>
</div>
</div>
<ng-container content>
<ul class="nav nav-panel nav-dark flex-column">
<li class="nav-item">
<a class="nav-link" routerLink="graphql" routerLinkActive="active">
GraphQL
<i class="icon-angle-right"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/content/{{appsState.appName}}/docs" target="_blank">
Swagger
</a>
</li>
</ul>
</ng-container>
</sqx-panel>
<router-outlet></router-outlet>

4
src/Squidex/app/features/api/pages/graphql/graphql-page.component.html

@ -1,5 +1,5 @@
<sqx-title message="{app} | API | GraphQL" parameter1="app" [value1]="appsState.appName"></sqx-title>
<sqx-panel desiredWidth="*">
<div #graphiQLContainer></div>
<sqx-panel desiredWidth="*" isFullSize="true">
<div inner #graphiQLContainer></div>
</sqx-panel>

10
src/Squidex/app/features/api/pages/graphql/graphql-page.component.scss

@ -4,11 +4,13 @@
@import '~graphiql/graphiql';
.graphiql-container {
@include absolute(0, 0, 0, 0);
}
& {
@include absolute(0, 0, 0, 0);
}
.graphiql-container > * {
box-sizing: content-box;
& > * {
box-sizing: content-box;
}
// sass-lint:disable class-name-format
& .editorWrap {

2
src/Squidex/app/framework/angular/modals/root-view.component.ts

@ -10,7 +10,7 @@ import { Component, ViewChild, ViewContainerRef } from '@angular/core';
@Component({
selector: 'sqx-root-view',
styleUrls: ['./root-view.component.scss'],
template: './root-view.component.html'
templateUrl: './root-view.component.html'
})
export class RootViewComponent {
@ViewChild('element', { read: ViewContainerRef })

9
src/Squidex/app/framework/angular/panel-container.directive.ts

@ -5,17 +5,16 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { AfterViewInit, Directive, ElementRef, HostListener, OnDestroy, Renderer } from '@angular/core';
import { AfterViewInit, Directive, ElementRef, HostListener, Renderer } from '@angular/core';
import { PanelComponent } from './panel.component';
@Directive({
selector: '[sqxPanelContainer]'
})
export class PanelContainerDirective implements AfterViewInit, OnDestroy {
export class PanelContainerDirective implements AfterViewInit {
private readonly panels: PanelComponent[] = [];
private containerWidth = 0;
private isInit = false;
constructor(
private readonly element: ElementRef,
@ -28,10 +27,6 @@ export class PanelContainerDirective implements AfterViewInit, OnDestroy {
this.invalidate(true);
}
public ngOnDestroy() {
this.isInit = true;
}
public ngAfterViewInit() {
this.invalidate(true);
}

4
src/Squidex/app/framework/angular/panel.component.html

@ -1,6 +1,8 @@
<div #panel>
<div class="panel panel-{{theme}}" [@slideRight]>
<div class="panel-header">
<ng-content select=[inner] *ngIf="isFullSize"></ng-content>
<div class="panel-header" *ngIf="!isFullSize">
<div class="panel-title-row">
<div class="float-right">
<ng-content select=[menu]></ng-content>

3
src/Squidex/app/framework/angular/panel.component.ts

@ -31,6 +31,9 @@ export class PanelComponent implements AfterViewInit, OnDestroy, OnInit {
@Input()
public isBlank = false;
@Input()
public isFullSize = false;
@Input()
public showScrollbar = false;

Loading…
Cancel
Save