1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

convert to ngtools/webpack for aot compilation

This commit is contained in:
Kyle Spearrin
2018-04-06 12:25:22 -04:00
parent 86226990ee
commit e27b2a7a53
28 changed files with 185 additions and 69 deletions

View File

@@ -1,5 +1,3 @@
import * as template from './environment.component.html';
import { Component } from '@angular/core';
import { ToasterService } from 'angular2-toaster';
@@ -12,7 +10,7 @@ import { EnvironmentComponent as BaseEnvironmentComponent } from 'jslib/angular/
@Component({
selector: 'app-environment',
template: template,
templateUrl: 'environment.component.html',
})
export class EnvironmentComponent extends BaseEnvironmentComponent {
constructor(analytics: Angulartics2, toasterService: ToasterService,

View File

@@ -1,5 +1,3 @@
import * as template from './hint.component.html';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@@ -13,7 +11,7 @@ import { HintComponent as BaseHintComponent } from 'jslib/angular/components/hin
@Component({
selector: 'app-hint',
template: template,
templateUrl: 'hint.component.html',
})
export class HintComponent extends BaseHintComponent {
constructor(router: Router, analytics: Angulartics2,

View File

@@ -1,5 +1,3 @@
import * as template from './lock.component.html';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@@ -16,7 +14,7 @@ import { LockComponent as BaseLockComponent } from 'jslib/angular/components/loc
@Component({
selector: 'app-lock',
template: template,
templateUrl: 'lock.component.html',
})
export class LockComponent extends BaseLockComponent {
constructor(router: Router, analytics: Angulartics2,

View File

@@ -1,5 +1,3 @@
import * as template from './login.component.html';
import {
Component,
ComponentFactoryResolver,
@@ -22,7 +20,7 @@ import { LoginComponent as BaseLoginComponent } from 'jslib/angular/components/l
@Component({
selector: 'app-login',
template: template,
templateUrl: 'login.component.html',
})
export class LoginComponent extends BaseLoginComponent {
@ViewChild('environment', { read: ViewContainerRef }) environmentModal: ViewContainerRef;

View File

@@ -1,5 +1,3 @@
import * as template from './premium.component.html';
import {
Component,
OnInit,
@@ -15,7 +13,7 @@ import { TokenService } from 'jslib/abstractions/token.service';
@Component({
selector: 'app-premium',
template: template,
templateUrl: 'premium.component.html',
})
export class PremiumComponent implements OnInit {
isPremium: boolean = false;

View File

@@ -1,5 +1,3 @@
import * as template from './register.component.html';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@@ -15,7 +13,7 @@ import { RegisterComponent as BaseRegisterComponent } from 'jslib/angular/compon
@Component({
selector: 'app-register',
template: template,
templateUrl: 'register.component.html',
})
export class RegisterComponent extends BaseRegisterComponent {
constructor(authService: AuthService, router: Router,

View File

@@ -1,5 +1,3 @@
import * as template from './settings.component.html';
import {
Component,
OnInit,
@@ -19,7 +17,7 @@ import { ConstantsService } from 'jslib/services/constants.service';
@Component({
selector: 'app-settings',
template: template,
templateUrl: 'settings.component.html',
})
export class SettingsComponent implements OnInit {
lockOptions: any[];

View File

@@ -1,5 +1,3 @@
import * as template from './two-factor-options.component.html';
import { Component, } from '@angular/core';
import { Router } from '@angular/router';
@@ -16,7 +14,7 @@ import {
@Component({
selector: 'app-two-factor-options',
template: template,
templateUrl: 'two-factor-options.component.html',
})
export class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {
constructor(authService: AuthService, router: Router,

View File

@@ -1,5 +1,3 @@
import * as template from './two-factor.component.html';
import {
Component,
ComponentFactoryResolver,
@@ -29,7 +27,7 @@ import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib/angular/comp
@Component({
selector: 'app-two-factor',
template: template,
templateUrl: 'two-factor.component.html',
})
export class TwoFactorComponent extends BaseTwoFactorComponent {
@ViewChild('twoFactorOptions', { read: ViewContainerRef }) twoFactorOptionsModal: ViewContainerRef;

1
src/app/app.d.ts vendored
View File

@@ -1 +0,0 @@
declare module '*.html';

View File

@@ -1,5 +1,3 @@
import * as template from './modal.component.html';
import {
Component,
ComponentFactoryResolver,

View File

@@ -109,7 +109,7 @@ environmentService.setUrlsFromStorage().then(() => {
return syncService.fullSync(true);
});
function initFactory(): Function {
export function initFactory(): Function {
return async () => {
await i18nService.init();
await authService.init();

View File

@@ -1,5 +1,3 @@
import * as template from './add-edit.component.html';
import {
Component,
OnChanges,
@@ -18,7 +16,7 @@ import { AddEditComponent as BaseAddEditComponent } from 'jslib/angular/componen
@Component({
selector: 'app-vault-add-edit',
template: template,
templateUrl: 'add-edit.component.html',
})
export class AddEditComponent extends BaseAddEditComponent implements OnChanges {
constructor(cipherService: CipherService, folderService: FolderService,

View File

@@ -1,5 +1,3 @@
import * as template from './attachments.component.html';
import { Component } from '@angular/core';
import { ToasterService } from 'angular2-toaster';
@@ -15,7 +13,7 @@ import { AttachmentsComponent as BaseAttachmentsComponent } from 'jslib/angular/
@Component({
selector: 'app-vault-attachments',
template: template,
templateUrl: 'attachments.component.html',
})
export class AttachmentsComponent extends BaseAttachmentsComponent {
constructor(cipherService: CipherService, analytics: Angulartics2,

View File

@@ -1,5 +1,3 @@
import * as template from './ciphers.component.html';
import { Component } from '@angular/core';
import { CipherService } from 'jslib/abstractions/cipher.service';
@@ -8,7 +6,7 @@ import { CiphersComponent as BaseCiphersComponent } from 'jslib/angular/componen
@Component({
selector: 'app-vault-ciphers',
template: template,
templateUrl: 'ciphers.component.html',
})
export class CiphersComponent extends BaseCiphersComponent {
constructor(cipherService: CipherService) {

View File

@@ -1,5 +1,3 @@
import * as template from './folder-add-edit.component.html';
import {
Component,
EventEmitter,
@@ -19,7 +17,7 @@ import { FolderView } from 'jslib/models/view/folderView';
@Component({
selector: 'app-folder-add-edit',
template: template,
templateUrl: 'folder-add-edit.component.html',
})
export class FolderAddEditComponent implements OnInit {
@Input() folderId: string;

View File

@@ -1,5 +1,3 @@
import * as template from './groupings.component.html';
import { Component } from '@angular/core';
import { CollectionService } from 'jslib/abstractions/collection.service';
@@ -9,7 +7,7 @@ import { GroupingsComponent as BaseGroupingsComponent } from 'jslib/angular/comp
@Component({
selector: 'app-vault-groupings',
template: template,
templateUrl: 'groupings.component.html',
})
export class GroupingsComponent extends BaseGroupingsComponent {
constructor(collectionService: CollectionService, folderService: FolderService) {

View File

@@ -1,5 +1,3 @@
import * as template from './password-generator-history.component.html';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
@@ -15,7 +13,7 @@ import {
@Component({
selector: 'app-password-generator-history',
template: template,
templateUrl: 'password-generator-history.component.html',
})
export class PasswordGeneratorHistoryComponent extends BasePasswordGeneratorHistoryComponent {
constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2,

View File

@@ -6,7 +6,7 @@
<div class="box">
<div class="box-content condensed">
<a class="box-content-row" href="#" appStopClick appBlurClick
(click)="regenerate(true)">
(click)="regenerate()">
<i class="fa fa-fw fa-refresh"></i> {{'regeneratePassword' | i18n}}
</a>
<a class="box-content-row" href="#" appStopClick appBlurClick

View File

@@ -1,5 +1,3 @@
import * as template from './password-generator.component.html';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
@@ -19,7 +17,7 @@ import {
@Component({
selector: 'app-password-generator',
template: template,
templateUrl: 'password-generator.component.html',
})
export class PasswordGeneratorComponent extends BasePasswordGeneratorComponent {
constructor(passwordGenerationService: PasswordGenerationService, analytics: Angulartics2,

View File

@@ -13,7 +13,7 @@
(onCipherClicked)="viewCipher($event)"
(onCipherRightClicked)="viewCipherMenu($event)"
(onAddCipher)="addCipher($event)"
(onAddCipherOptions)="addCipherOptions($event)">
(onAddCipherOptions)="addCipherOptions()">
</app-vault-ciphers>
<app-vault-view id="details"
*ngIf="cipherId && action === 'view'"

View File

@@ -1,5 +1,3 @@
import * as template from './vault.component.html';
import { remote } from 'electron';
import { Location } from '@angular/common';
@@ -48,7 +46,7 @@ const BroadcasterSubscriptionId = 'VaultComponent';
@Component({
selector: 'app-vault',
template: template,
templateUrl: 'vault.component.html',
})
export class VaultComponent implements OnInit, OnDestroy {
@ViewChild(AddEditComponent) addEditComponent: AddEditComponent;

View File

@@ -1,5 +1,3 @@
import * as template from './view.component.html';
import {
Component,
OnChanges,
@@ -20,7 +18,7 @@ import { ViewComponent as BaseViewComponent } from 'jslib/angular/components/vie
@Component({
selector: 'app-vault-view',
template: template,
templateUrl: 'view.component.html',
})
export class ViewComponent extends BaseViewComponent implements OnChanges {
constructor(cipherService: CipherService, totpService: TotpService,