Browse Source

Imports organized

pull/1/head
Sebastian 10 years ago
parent
commit
61ff429d35
  1. 40
      src/Squidex/Config/Web/WebUsages.cs
  2. 1
      src/Squidex/Config/Web/WebpackUsage.cs
  3. 21
      src/Squidex/Startup.cs
  4. 1
      src/Squidex/app/features/settings/pages/contributors/contributors-page.component.ts
  5. 1
      src/Squidex/app/framework/angular/autocomplete.component.ts
  6. 1
      src/Squidex/app/framework/angular/http-utils.ts
  7. 1
      src/Squidex/app/framework/declarations.ts
  8. 1
      src/Squidex/app/framework/services/clipboard.service.ts
  9. 1
      src/Squidex/app/framework/services/drag.service.ts
  10. 1
      src/Squidex/app/framework/services/notification.service.ts
  11. 1
      src/Squidex/app/framework/services/panel.service.ts
  12. 4
      src/Squidex/app/shared/components/app-form.component.ts
  13. 1
      src/Squidex/app/shared/declarations.ts
  14. 1
      src/Squidex/app/shared/guards/app-must-exist.guard.spec.ts
  15. 1
      src/Squidex/app/shared/guards/must-be-authenticated.guard.spec.ts
  16. 1
      src/Squidex/app/shared/guards/must-be-not-authenticated.guard.spec.ts
  17. 10
      src/Squidex/app/shared/services/app-clients.service.ts
  18. 6
      src/Squidex/app/shared/services/app-contributors.service.ts
  19. 6
      src/Squidex/app/shared/services/app-languages.service.ts
  20. 4
      src/Squidex/app/shared/services/apps-store.service.ts
  21. 10
      src/Squidex/app/shared/services/apps.service.ts
  22. 3
      src/Squidex/app/shared/services/auth.service.ts
  23. 6
      src/Squidex/app/shared/services/languages.service.ts
  24. 12
      src/Squidex/app/shared/services/schemas.service.ts
  25. 1
      src/Squidex/app/shared/services/users-provider.service.ts
  26. 2
      src/Squidex/app/shared/services/users.service.ts

40
src/Squidex/Config/Web/WebUsages.cs

@ -0,0 +1,40 @@
// ==========================================================================
// WebUsages.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
// All rights reserved.
// ==========================================================================
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Net.Http.Headers;
// ReSharper disable InvertIf
namespace Squidex.Config.Web
{
public static class WebUsages
{
public static void UseMyCachedStaticFiles(this IApplicationBuilder app)
{
app.UseStaticFiles(new StaticFileOptions
{
OnPrepareResponse = context =>
{
var response = context.Context.Response;
if (!string.Equals(response.ContentType, "text/html", StringComparison.OrdinalIgnoreCase))
{
var headers = response.GetTypedHeaders();
headers.CacheControl = new CacheControlHeaderValue
{
MaxAge = TimeSpan.FromDays(60)
};
}
}
});
}
}
}

1
src/Squidex/Config/Web/WebpackUsage.cs

@ -14,7 +14,6 @@ namespace Squidex.Config.Web
{
public static class WebpackExtensions
{
public static IApplicationBuilder UseWebpackBuilder(this IApplicationBuilder app)
{
app.ApplicationServices.GetRequiredService<WebpackRunner>().Execute();

21
src/Squidex/Startup.cs

@ -17,7 +17,6 @@ using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
using Squidex.Config;
using Squidex.Config.Domain;
using Squidex.Config.EventStore;
@ -26,8 +25,6 @@ using Squidex.Config.Swagger;
using Squidex.Config.Web;
using Squidex.Pipeline;
using Squidex.Store.MongoDb;
// ReSharper disable InvertIf
// ReSharper disable ConvertClosureToMethodGroup
// ReSharper disable AccessToModifiedClosure
@ -178,23 +175,7 @@ namespace Squidex
});
}
app.UseStaticFiles(new StaticFileOptions
{
OnPrepareResponse = context =>
{
var response = context.Context.Response;
if (!string.Equals(response.ContentType, "text/html", StringComparison.OrdinalIgnoreCase))
{
var headers = response.GetTypedHeaders();
headers.CacheControl = new CacheControlHeaderValue
{
MaxAge = TimeSpan.FromDays(60)
};
}
}
});
app.UseMyCachedStaticFiles();
}
private static bool IsIdentityRequest(HttpContext context)

1
src/Squidex/app/features/settings/pages/contributors/contributors-page.component.ts

@ -6,7 +6,6 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import {

1
src/Squidex/app/framework/angular/autocomplete.component.ts

@ -7,7 +7,6 @@
import * as Ng2 from '@angular/core';
import * as Ng2Forms from '@angular/forms';
import { Observable, Subscription } from 'rxjs';
export interface AutocompleteSource {

1
src/Squidex/app/shared/services/common.ts → src/Squidex/app/framework/angular/http-utils.ts

@ -6,7 +6,6 @@
*/
import * as Ng2Http from '@angular/http';
import { Observable } from 'rxjs';
export class EntityCreatedDto {

1
src/Squidex/app/framework/declarations.ts

@ -16,6 +16,7 @@ export * from './angular/date-time.pipes';
export * from './angular/drag-model.directive';
export * from './angular/focus-on-change.directive';
export * from './angular/focus-on-init.directive';
export * from './angular/http-utils';
export * from './angular/image-drop.directive';
export * from './angular/modal-view.directive';
export * from './angular/money.pipe';

1
src/Squidex/app/framework/services/clipboard.service.ts

@ -6,7 +6,6 @@
*/
import * as Ng2 from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
export const ClipboardServiceFactory = () => {

1
src/Squidex/app/framework/services/drag.service.ts

@ -6,7 +6,6 @@
*/
import * as Ng2 from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { Vec2 } from './../utils/vec2';

1
src/Squidex/app/framework/services/notification.service.ts

@ -6,7 +6,6 @@
*/
import * as Ng2 from '@angular/core';
import { Observable, Subject } from 'rxjs';
export const NotificationServiceFactory = () => {

1
src/Squidex/app/framework/services/panel.service.ts

@ -6,7 +6,6 @@
*/
import * as Ng2 from '@angular/core';
import { Observable, Subject } from 'rxjs';
export const PanelServiceFactory = () => {

4
src/Squidex/app/shared/components/app-form.component.ts

@ -8,11 +8,11 @@
import * as Ng2 from '@angular/core';
import * as Ng2Forms from '@angular/forms';
import { fadeAnimation } from 'framework';
import { AppsStoreService } from './../services/apps-store.service';
import { AppDto, CreateAppDto } from './../services/apps.service';
import { fadeAnimation } from 'framework';
const FALLBACK_NAME = 'my-app';
@Ng2.Component({

1
src/Squidex/app/shared/declarations.ts

@ -18,7 +18,6 @@ export * from './services/app-languages.service';
export * from './services/apps-store.service';
export * from './services/apps.service';
export * from './services/auth.service';
export * from './services/common';
export * from './services/languages.service';
export * from './services/users-provider.service';
export * from './services/users.service';

1
src/Squidex/app/shared/guards/app-must-exist.guard.spec.ts

@ -8,6 +8,7 @@
import * as TypeMoq from 'typemoq';
import { AppsStoreService } from 'shared';
import { AppMustExistGuard } from './app-must-exist.guard';
import { RouterMockup } from './router-mockup';

1
src/Squidex/app/shared/guards/must-be-authenticated.guard.spec.ts

@ -8,6 +8,7 @@
import * as TypeMoq from 'typemoq';
import { AuthService } from 'shared';
import { MustBeAuthenticatedGuard } from './must-be-authenticated.guard';
import { RouterMockup } from './router-mockup';

1
src/Squidex/app/shared/guards/must-be-not-authenticated.guard.spec.ts

@ -8,6 +8,7 @@
import * as TypeMoq from 'typemoq';
import { AuthService } from 'shared';
import { MustBeNotAuthenticatedGuard } from './must-be-not-authenticated.guard';
import { RouterMockup } from './router-mockup';

10
src/Squidex/app/shared/services/app-clients.service.ts

@ -7,13 +7,15 @@
import * as Ng2 from '@angular/core';
import * as Ng2Http from '@angular/http';
import { Observable } from 'rxjs';
import { ApiUrlConfig, DateTime } from 'framework';
import { AuthService } from './auth.service';
import {
ApiUrlConfig,
DateTime,
handleError
} from 'framework';
import { handleError } from './common';
import { AuthService } from './auth.service';
export class AppClientDto {
constructor(

6
src/Squidex/app/shared/services/app-contributors.service.ts

@ -6,13 +6,11 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig } from 'framework';
import { AuthService } from './auth.service';
import { ApiUrlConfig, handleError } from 'framework';
import { handleError } from './common';
import { AuthService } from './auth.service';
export class AppContributorDto {
constructor(

6
src/Squidex/app/shared/services/app-languages.service.ts

@ -6,13 +6,11 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig } from 'framework';
import { AuthService } from './auth.service';
import { ApiUrlConfig, handleError } from 'framework';
import { handleError } from './common';
import { AuthService } from './auth.service';
export class AppLanguageDto {
constructor(

4
src/Squidex/app/shared/services/apps-store.service.ts

@ -13,14 +13,14 @@ import {
Subject
} from 'rxjs';
import { DateTime } from 'framework';
import {
AppDto,
AppsService,
CreateAppDto
} from './apps.service';
import { DateTime } from 'framework';
import { AuthService } from './auth.service';
@Ng2.Injectable()

10
src/Squidex/app/shared/services/apps.service.ts

@ -8,10 +8,14 @@
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig, DateTime } from 'framework';
import { AuthService } from './auth.service';
import {
ApiUrlConfig,
DateTime,
EntityCreatedDto,
handleError
} from 'framework';
import { EntityCreatedDto, handleError } from './common';
import { AuthService } from './auth.service';
export class AppDto {
constructor(

3
src/Squidex/app/shared/services/auth.service.ts

@ -8,6 +8,7 @@
import * as Ng2 from '@angular/core';
import * as Ng2Http from '@angular/http';
import * as Ng2Router from '@angular/router';
import { Observable, Subject } from 'rxjs';
import {
Log,
@ -15,8 +16,6 @@ import {
UserManager
} from 'oidc-client';
import { Observable, Subject } from 'rxjs';
import { ApiUrlConfig } from 'framework';
export class Profile {

6
src/Squidex/app/shared/services/languages.service.ts

@ -6,13 +6,11 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig } from 'framework';
import { AuthService } from './auth.service';
import { ApiUrlConfig, handleError } from 'framework';
import { handleError } from './common';
import { AuthService } from './auth.service';
export class LanguageDto {
constructor(

12
src/Squidex/app/shared/services/schemas.service.ts

@ -6,13 +6,15 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig, DateTime } from 'framework';
import { AuthService } from './auth.service';
import {
ApiUrlConfig,
DateTime,
handleError
} from 'framework';
import { handleError } from './common';
import { AuthService } from './auth.service';
export class SchemaDto {
constructor(
@ -50,7 +52,7 @@ export abstract class FieldPropertiesDto {
public readonly label: string,
public readonly hints: string,
public readonly placeholder: string,
public readonly isRequired: boolean,
public readonly isRequired: boolean
) {
}
}

1
src/Squidex/app/shared/services/users-provider.service.ts

@ -6,7 +6,6 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { UserDto, UsersService } from './users.service';

2
src/Squidex/app/shared/services/users.service.ts

@ -6,10 +6,10 @@
*/
import * as Ng2 from '@angular/core';
import { Observable } from 'rxjs';
import { ApiUrlConfig } from 'framework';
import { AuthService } from './auth.service';
export class UserDto {

Loading…
Cancel
Save