Browse Source

More dead code.

pull/353/head
Sebastian Stehle 7 years ago
parent
commit
5dfda1885b
  1. 10
      src/Squidex/app/app.module.ts
  2. 10
      src/Squidex/app/framework/angular/forms/file-drop.directive.ts
  3. 40
      src/Squidex/app/framework/angular/user-report.component.ts
  4. 4
      src/Squidex/app/framework/configurations.ts
  5. 9
      src/Squidex/app/framework/module.ts

10
src/Squidex/app/app.module.ts

@ -23,8 +23,7 @@ import {
DecimalSeparatorConfig, DecimalSeparatorConfig,
SqxFrameworkModule, SqxFrameworkModule,
SqxSharedModule, SqxSharedModule,
TitlesConfig, TitlesConfig
UserReportConfig
} from './shared'; } from './shared';
import { SqxShellModule } from './shell'; import { SqxShellModule } from './shell';
@ -66,10 +65,6 @@ export function configCurrency() {
return new CurrencyConfig('EUR', '€', true); return new CurrencyConfig('EUR', '€', true);
} }
export function configUserReport() {
return new UserReportConfig('221afe63-0ca2-42aa-8efe-188d77964a7f');
}
@NgModule({ @NgModule({
imports: [ imports: [
BrowserModule, BrowserModule,
@ -93,8 +88,7 @@ export function configUserReport() {
{ provide: ApiUrlConfig, useFactory: configApiUrl }, { provide: ApiUrlConfig, useFactory: configApiUrl },
{ provide: CurrencyConfig, useFactory: configCurrency }, { provide: CurrencyConfig, useFactory: configCurrency },
{ provide: DecimalSeparatorConfig, useFactory: configDecimalSeparator }, { provide: DecimalSeparatorConfig, useFactory: configDecimalSeparator },
{ provide: TitlesConfig, useFactory: configTitles }, { provide: TitlesConfig, useFactory: configTitles }
{ provide: UserReportConfig, useFactory: configUserReport }
], ],
entryComponents: [AppComponent] entryComponents: [AppComponent]
}) })

10
src/Squidex/app/framework/angular/forms/file-drop.directive.ts

@ -50,11 +50,13 @@ export class FileDropDirective {
const result: File[] = []; const result: File[] = [];
for (let i = 0; i < event.clipboardData.items.length; i++) { if (event.clipboardData) {
const file = event.clipboardData.items[i].getAsFile(); for (let i = 0; i < event.clipboardData.items.length; i++) {
const file = event.clipboardData.items[i].getAsFile();
if (this.isAllowedFile(file)) { if (this.isAllowedFile(file)) {
result.push(file!); result.push(file!);
}
} }
} }

40
src/Squidex/app/framework/angular/user-report.component.ts

@ -1,40 +0,0 @@
/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { timer } from 'rxjs';
import {
ResourceLoaderService,
ResourceOwner,
UserReportConfig
} from '@app/framework/internal';
@Component({
selector: 'sqx-user-report',
template: ''
})
export class UserReportComponent extends ResourceOwner implements OnInit {
constructor(changeDetector: ChangeDetectorRef,
private readonly config: UserReportConfig,
private readonly resourceLoader: ResourceLoaderService
) {
super();
changeDetector.detach();
}
public ngOnInit() {
window['_urq'] = window['_urq'] || [];
window['_urq'].push(['initSite', this.config.siteId]);
this.own(
timer(4000).subscribe(() => {
this.resourceLoader.loadScript('https://cdn.userreport.com/userreport.js');
}));
}
}

4
src/Squidex/app/framework/configurations.ts

@ -44,8 +44,4 @@ export class DecimalSeparatorConfig {
export class ProductionModeConfig { export class ProductionModeConfig {
constructor(public readonly isProductionMode: boolean) { } constructor(public readonly isProductionMode: boolean) { }
}
export class UserReportConfig {
constructor(public readonly siteId: string) { }
} }

9
src/Squidex/app/framework/module.ts

@ -83,8 +83,7 @@ import {
TitleService, TitleService,
ToggleComponent, ToggleComponent,
TooltipDirective, TooltipDirective,
TransformInputDirective, TransformInputDirective
UserReportComponent
} from './declarations'; } from './declarations';
@NgModule({ @NgModule({
@ -153,8 +152,7 @@ import {
TitleComponent, TitleComponent,
ToggleComponent, ToggleComponent,
TooltipDirective, TooltipDirective,
TransformInputDirective, TransformInputDirective
UserReportComponent
], ],
exports: [ exports: [
AutocompleteComponent, AutocompleteComponent,
@ -218,8 +216,7 @@ import {
TitleComponent, TitleComponent,
ToggleComponent, ToggleComponent,
TooltipDirective, TooltipDirective,
TransformInputDirective, TransformInputDirective
UserReportComponent
] ]
}) })
export class SqxFrameworkModule { export class SqxFrameworkModule {

Loading…
Cancel
Save