after angular 6
This commit is contained in:
parent
e64f2a45cb
commit
c23210be58
18 changed files with 7910 additions and 87 deletions
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"project": {
|
||||
"name": "nault"
|
||||
},
|
||||
"apps": [
|
||||
{
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"pow.wasm"
|
||||
],
|
||||
"index": "index.html",
|
||||
"main": "main.ts",
|
||||
"polyfills": "polyfills.ts",
|
||||
"test": "test.ts",
|
||||
"tsconfig": "tsconfig.app.json",
|
||||
"testTsconfig": "tsconfig.spec.json",
|
||||
"prefix": "app",
|
||||
"styles": [
|
||||
"styles.css"
|
||||
],
|
||||
"scripts": [],
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
"dev": "environments/environment.ts",
|
||||
"prod": "environments/environment.prod.ts",
|
||||
"desktop": "environments/environment.desktop.ts"
|
||||
}
|
||||
}
|
||||
],
|
||||
"e2e": {
|
||||
"protractor": {
|
||||
"config": "./protractor.conf.js"
|
||||
}
|
||||
},
|
||||
"lint": [
|
||||
{
|
||||
"project": "src/tsconfig.app.json",
|
||||
"exclude": "**/node_modules/**"
|
||||
},
|
||||
{
|
||||
"project": "src/tsconfig.spec.json",
|
||||
"exclude": "**/node_modules/**"
|
||||
},
|
||||
{
|
||||
"project": "e2e/tsconfig.e2e.json",
|
||||
"exclude": "**/node_modules/**"
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"karma": {
|
||||
"config": "./karma.conf.js"
|
||||
}
|
||||
},
|
||||
"defaults": {
|
||||
"styleExt": "css",
|
||||
"component": {}
|
||||
}
|
||||
}
|
||||
152
angular.json
Normal file
152
angular.json
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"nault": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/pow.wasm"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"desktop": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.desktop.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "nault:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "nault:build:production"
|
||||
},
|
||||
"desktop": {
|
||||
"browserTarget": "nault:build:desktop"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "nault:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"karmaConfig": "./karma.conf.js",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"scripts": [],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"assets": [
|
||||
"src/assets",
|
||||
"src/pow.wasm"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nault-e2e": {
|
||||
"root": "e2e",
|
||||
"sourceRoot": "e2e",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "./protractor.conf.js",
|
||||
"devServerTarget": "nault:serve"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "nault",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "app",
|
||||
"styleext": "css"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"prefix": "app"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,24 +4,22 @@
|
|||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular/cli'],
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular/cli/plugins/karma')
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client:{
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
reports: [ 'html', 'lcovonly' ],
|
||||
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
angularCli: {
|
||||
environment: 'dev'
|
||||
},
|
||||
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
|
|
|
|||
7735
package-lock.json
generated
7735
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -62,6 +62,7 @@
|
|||
"rxjs-compat": "^6.0.0-rc.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.8.0",
|
||||
"@angular/cli": "^6.2.9",
|
||||
"@angular/compiler-cli": "^6.1.10",
|
||||
"@angular/language-service": "^6.1.10",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {UtilService} from "../../services/util.service";
|
|||
import * as QRCode from 'qrcode';
|
||||
import BigNumber from "bignumber.js";
|
||||
import {RepresentativeService} from "../../services/representative.service";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-account-details',
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {Subject} from "rxjs/Subject";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {Observable} from "rxjs/Observable";
|
||||
import {timer} from "rxjs/observable/timer";
|
||||
import {Subject, BehaviorSubject, Observable, timer} from "rxjs";
|
||||
import {debounce} from "rxjs/operators";
|
||||
import {
|
||||
AppSettingsService,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import BigNumber from "bignumber.js";
|
|||
import {WebsocketService} from "../../services/websocket.service";
|
||||
import {NodeService} from "../../services/node.service";
|
||||
import {UtilService} from "../../services/util.service";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
import {RepresentativeService} from "../../services/representative.service";
|
||||
|
||||
@Component({
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
import {map} from 'rxjs/operators';
|
||||
import {AfterViewInit, Component, OnInit} from '@angular/core';
|
||||
import {AddressBookService} from "../../services/address-book.service";
|
||||
import {WalletService} from "../../services/wallet.service";
|
||||
|
|
@ -7,6 +9,7 @@ import {ApiService} from "../../services/api.service";
|
|||
import {Router} from "@angular/router";
|
||||
import {RepresentativeService} from "../../services/representative.service";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-manage-representatives',
|
||||
templateUrl: './manage-representatives.component.html',
|
||||
|
|
@ -17,12 +20,12 @@ export class ManageRepresentativesComponent implements OnInit, AfterViewInit {
|
|||
activePanel = 0;
|
||||
|
||||
// Set the online status of each representative
|
||||
representatives$ = this.repService.representatives$.map(reps => {
|
||||
representatives$ = this.repService.representatives$.pipe(map(reps => {
|
||||
return reps.map(rep => {
|
||||
rep.online = this.onlineReps.indexOf(rep.id) !== -1;
|
||||
return rep;
|
||||
})
|
||||
});
|
||||
}));
|
||||
|
||||
newRepAccount = '';
|
||||
newRepName = '';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {HttpClient} from "@angular/common/http";
|
|||
import {ActivatedRoute} from "@angular/router";
|
||||
|
||||
import BigNumber from "bignumber.js";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
|
||||
import {
|
||||
ApiService,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import BigNumber from "bignumber.js";
|
||||
import {AddressBookService} from "../../services/address-book.service";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
import {WalletService} from "../../services/wallet.service";
|
||||
import {NotificationService} from "../../services/notification.service";
|
||||
import {ApiService} from "../../services/api.service";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import Nano from "hw-app-nano";
|
||||
import TransportU2F from "@ledgerhq/hw-transport-u2f";
|
||||
import {Subject} from "rxjs/Subject";
|
||||
import {Subject} from "rxjs";
|
||||
import {ApiService} from "./api.service";
|
||||
import {NotificationService} from "./notification.service";
|
||||
import { environment } from "../../environments/environment";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
|
||||
@Injectable()
|
||||
export class ModalService {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {NotificationService} from "./notification.service";
|
|||
import {AppSettingsService} from "./app-settings.service";
|
||||
import {WalletService} from "./wallet.service";
|
||||
import {LedgerService} from "./ledger.service";
|
||||
import {Observable} from "rxjs/Observable";
|
||||
import {Observable} from "rxjs";
|
||||
const nacl = window['nacl'];
|
||||
|
||||
const STATE_BLOCK_PREAMBLE = '0000000000000000000000000000000000000000000000000000000000000006';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BehaviorSubject} from "rxjs/BehaviorSubject";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
|
||||
@Injectable()
|
||||
export class PriceService {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
]
|
||||
},
|
||||
"files": [
|
||||
"test.ts"
|
||||
"test.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
"lib": [
|
||||
"es2017",
|
||||
"dom"
|
||||
]
|
||||
],
|
||||
"module": "es2015",
|
||||
"baseUrl": "./"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
"forin": true,
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs",
|
||||
"rxjs/Rx"
|
||||
],
|
||||
"import-spacing": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue