mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
pack with ngtools
This commit is contained in:
@@ -109,7 +109,7 @@ export default class MainBackground {
|
||||
private sidebarAction: any;
|
||||
private buildingContextMenu: boolean;
|
||||
private menuOptionsLoaded: any[] = [];
|
||||
private syncTimeout: number;
|
||||
private syncTimeout: any;
|
||||
private isSafari: boolean;
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -23,7 +23,7 @@ import { AutofillService } from '../services/abstractions/autofill.service';
|
||||
|
||||
export default class RuntimeBackground {
|
||||
private runtime: any;
|
||||
private autofillTimeout: number;
|
||||
private autofillTimeout: any;
|
||||
private pageDetailsToAutoFill: any[] = [];
|
||||
private isSafari: boolean;
|
||||
private onInstalledReason: string = null;
|
||||
|
||||
1
src/globals.d.ts
vendored
1
src/globals.d.ts
vendored
@@ -1,4 +1,3 @@
|
||||
declare function require(s: string): any;
|
||||
declare function escape(s: string): string;
|
||||
declare function unescape(s: string): string;
|
||||
declare var opr: any;
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
"webRequest",
|
||||
"webRequestBlocking"
|
||||
],
|
||||
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
|
||||
"commands": {
|
||||
"autofill_login": {
|
||||
"suggested_key": {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './environment.component.html';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@@ -13,7 +11,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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './home.component.html';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@@ -10,7 +8,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
template: template,
|
||||
templateUrl: 'home.component.html',
|
||||
})
|
||||
export class HomeComponent {
|
||||
constructor(private router: Router, i18nService: I18nService,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './login.component.html';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@@ -14,7 +12,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 {
|
||||
constructor(authService: AuthService, router: Router,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './two-factor.component.html';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { Router } from '@angular/router';
|
||||
@@ -22,7 +20,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 {
|
||||
showNewWindowMessage = false;
|
||||
|
||||
1
src/popup2/app.d.ts
vendored
1
src/popup2/app.d.ts
vendored
@@ -1 +0,0 @@
|
||||
declare module '*.html';
|
||||
@@ -1,4 +1,3 @@
|
||||
import * as template from './action-buttons.component.html';
|
||||
import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
@@ -22,7 +21,7 @@ import { PopupUtilsService } from '../services/popup-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-action-buttons',
|
||||
template: template,
|
||||
templateUrl: 'action-buttons.component.html',
|
||||
})
|
||||
export class ActionButtonsComponent {
|
||||
@Output() onView = new EventEmitter<CipherView>();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import * as template from './ciphers-list.component.html';
|
||||
import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
@@ -22,7 +21,7 @@ import { PopupUtilsService } from '../services/popup-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-ciphers-list',
|
||||
template: template,
|
||||
templateUrl: 'ciphers-list.component.html',
|
||||
})
|
||||
export class CiphersListComponent {
|
||||
@Output() onSelected = new EventEmitter<CipherView>();
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './pop-out.component.html';
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
import { Angulartics2 } from 'angulartics2';
|
||||
@@ -12,7 +10,7 @@ import { PopupUtilsService } from '../services/popup-utils.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pop-out',
|
||||
template: template,
|
||||
templateUrl: 'pop-out.component.html',
|
||||
})
|
||||
export class PopOutComponent {
|
||||
constructor(private analytics: Angulartics2, private platformUtilsService: PlatformUtilsService,
|
||||
|
||||
@@ -49,15 +49,15 @@ function getBgService<T>(service: string) {
|
||||
};
|
||||
}
|
||||
|
||||
const stateService = new StateService();
|
||||
const messagingService = new BrowserMessagingService(getBgService<PlatformUtilsService>('platformUtilsService')());
|
||||
const authService = new AuthService(getBgService<CryptoService>('cryptoService')(),
|
||||
export const stateService = new StateService();
|
||||
export const messagingService = new BrowserMessagingService(getBgService<PlatformUtilsService>('platformUtilsService')());
|
||||
export const authService = new AuthService(getBgService<CryptoService>('cryptoService')(),
|
||||
getBgService<ApiService>('apiService')(), getBgService<UserService>('userService')(),
|
||||
getBgService<TokenService>('tokenService')(), getBgService<AppIdService>('appIdService')(),
|
||||
getBgService<I18nService>('i18n2Service')(), getBgService<PlatformUtilsService>('platformUtilsService')(),
|
||||
getBgService<ConstantsService>('constantsService')(), messagingService);
|
||||
|
||||
function initFactory(i18nService: I18nService, storageService: StorageService): Function {
|
||||
export function initFactory(i18nService: I18nService, storageService: StorageService): Function {
|
||||
return async () => {
|
||||
const htmlEl = window.document.documentElement;
|
||||
if (i18nService != null) {
|
||||
|
||||
27
src/popup2/tabs.component.html
Normal file
27
src/popup2/tabs.component.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="tab-page">
|
||||
<router-outlet></router-outlet>
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="current" title="{{'currentTab' | i18n}}">
|
||||
<i class="fa fa-folder fa-2x"></i>{{'tab' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="vault" title="{{'myVault' | i18n}}">
|
||||
<i class="fa fa-lock fa-2x"></i>{{'myVault' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="tools" title="{{'tools' | i18n}}">
|
||||
<i class="fa fa-wrench fa-2x"></i>{{'tools' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="settings" title="{{'settings' | i18n}}">
|
||||
<i class="fa fa-cogs fa-2x"></i>{{'settings' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -12,33 +12,6 @@ import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tabs',
|
||||
template: `
|
||||
<div class="tab-page">
|
||||
<router-outlet></router-outlet>
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="current" title="{{'currentTab' | i18n}}">
|
||||
<i class="fa fa-folder fa-2x"></i>{{'tab' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="vault" title="{{'myVault' | i18n}}">
|
||||
<i class="fa fa-lock fa-2x"></i>{{'myVault' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="tools" title="{{'tools' | i18n}}">
|
||||
<i class="fa fa-wrench fa-2x"></i>{{'tools' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
<li routerLinkActive="active">
|
||||
<a routerLink="settings" title="{{'settings' | i18n}}">
|
||||
<i class="fa fa-cogs fa-2x"></i>{{'settings' | i18n}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>`,
|
||||
templateUrl: 'tabs.component.html',
|
||||
})
|
||||
export class TabsComponent { }
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './add-edit.component.html';
|
||||
|
||||
import { Location } from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
@@ -23,7 +21,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 OnInit {
|
||||
constructor(cipherService: CipherService, folderService: FolderService,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './ciphers.component.html';
|
||||
|
||||
import { Location } from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
@@ -18,7 +16,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 implements OnInit {
|
||||
constructor(cipherService: CipherService, private route: ActivatedRoute,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './groupings.component.html';
|
||||
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
@@ -20,7 +18,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 implements OnInit {
|
||||
ciphers: CipherView[];
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import * as template from './view.component.html';
|
||||
|
||||
import { Location } from '@angular/common';
|
||||
import {
|
||||
Component,
|
||||
@@ -25,7 +23,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 OnInit {
|
||||
constructor(cipherService: CipherService, totpService: TotpService,
|
||||
|
||||
Reference in New Issue
Block a user