From 24be8e79b6e19894fda3ac2c2f7a29db5bdb8052 Mon Sep 17 00:00:00 2001 From: SuriyaR Date: Thu, 8 Aug 2019 18:50:20 +0530 Subject: [PATCH] Changes --- server.ts | 15 +++++++++++++++ server/i18n/de.json | 5 +++-- server/i18n/en.json | 5 +++-- src/app/shared/services/trans-service.service.ts | 2 +- .../graph-detail/graph-detail.component.html | 2 +- .../home/graph-list/graph-list.component.html | 2 +- .../view/home/graph-list/graph-list.component.ts | 2 +- .../home/latestblocks/latestblocks.component.html | 2 +- 8 files changed, 26 insertions(+), 9 deletions(-) diff --git a/server.ts b/server.ts index dd919c9..902e252 100644 --- a/server.ts +++ b/server.ts @@ -72,6 +72,21 @@ const controllers = [ new BlockchainOutputController() ]; +app.use(function(req, res, next) { + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); + res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With, Accept, Authtoken,cookie_id'); + + // intercept OPTIONS method + if ('OPTIONS' == req.method) { + return res.status(200).end(); + } + else { + next(); + } +} +); + app.use(errorMiddleware); app.use(bodyParser.json({ limit: "50mb" })); app.use(bodyParser.urlencoded({ extended: false })); diff --git a/server/i18n/de.json b/server/i18n/de.json index 5f94735..e8de9f0 100644 --- a/server/i18n/de.json +++ b/server/i18n/de.json @@ -17,7 +17,7 @@ "VIEWALL": "Alle Diagramme anzeigen", "BLOCKCHAIN_HEIGHT": "Blockchain Höhe", "LATEST_BLOCK": "Letzter Block", - "LATEST_BLOCK1": "Neueste Block-Schwierigkeit", + "LATEST_BLOCK1": "Aktuelle Schwierigkeit", "COIN_IN": "Münzen in Existenz", "HEIGHT": "Höhe", "HASH": "Hash", @@ -29,7 +29,8 @@ "INPUT" : "Eingang", "OUTPUTS" : "Ausgänge", "OUTPUT" : "Ausgabe", - "KERNELS" : "Kernel", + "KERNEL" : "Kernel", + "KERNELS" : "Kernels", "EPIC" : "Epic", "EXPLORE" : "Erkunden", "AGO" : "vor", diff --git a/server/i18n/en.json b/server/i18n/en.json index dfa128f..1ddb240 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -16,8 +16,8 @@ "EXPLORE_IT": "Explore", "VIEWALL": "View All Charts", "BLOCKCHAIN_HEIGHT": "Blockchain Height", - "LATEST_BLOCK": "Latest Blocks", - "LATEST_BLOCK1": "Latest Block Difficulty", + "LATEST_BLOCK": "Latest Block", + "LATEST_BLOCK1": "Current Difficulty", "COIN_IN": "Coins in Existence", "HEIGHT": "Height", "HASH": "Hash", @@ -29,6 +29,7 @@ "INPUT" : "Input", "OUTPUTS" : "Outputs", "OUTPUT" : "Output", + "KERNEL" : "Kernel", "KERNELS" : "Kernels", "EPIC" : "Epic", "EXPLORE" : "Explore", diff --git a/src/app/shared/services/trans-service.service.ts b/src/app/shared/services/trans-service.service.ts index 668a957..28de00c 100644 --- a/src/app/shared/services/trans-service.service.ts +++ b/src/app/shared/services/trans-service.service.ts @@ -17,7 +17,7 @@ export class TransServiceService { if (isPlatformBrowser(this.platformId)) { translate.addLangs(["en", "de"]); translate.setDefaultLang("en"); - this.langLabel = { en: "English", de: "German" }; + this.langLabel = { en: "EN", de: "DE" }; // console.log('this.getCookie() ifconf',this.getCookie() != 'undefined' ? 1: 2); // console.log("(this.getCookie() && this.getCookie() != null) ? this.getCookie() : (this.getCurrentLang() && this.getCurrentLang() != null) ? this.getCurrentLang() : 'en'",(this.getCookie() && this.getCookie() != 'undefined') ? this.getCookie() : (this.getCurrentLang() && this.getCurrentLang() != 'undefined') ? this.getCurrentLang() : 'en'); translate.use( diff --git a/src/app/view/graph-view/graph-detail/graph-detail.component.html b/src/app/view/graph-view/graph-detail/graph-detail.component.html index ab6e86e..e22f042 100644 --- a/src/app/view/graph-view/graph-detail/graph-detail.component.html +++ b/src/app/view/graph-view/graph-detail/graph-detail.component.html @@ -124,7 +124,7 @@ {{'home.KERNELS' | translate}} + [ngClass]="{ active: selectedItem8 == item2.id, day15_txt: true }">{{'home.KERNEL' | translate}} {{'home.INPUT' | translate}} {{'home.KERNELS' | translate}} + [ngClass]="{ active: selectedItem8 == item2.id, day15_txt: true }">{{'home.KERNEL' | translate}} {{'home.OUTPUT' | translate}} diff --git a/src/app/view/home/graph-list/graph-list.component.ts b/src/app/view/home/graph-list/graph-list.component.ts index 379e7ae..fd2f1d2 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -260,7 +260,7 @@ export class GraphListComponent implements OnInit { this.tDate, this.tHour, this.tInput, - 'Input', + 'Kernal', ); resolve(); } diff --git a/src/app/view/home/latestblocks/latestblocks.component.html b/src/app/view/home/latestblocks/latestblocks.component.html index ac40fb6..f78a86b 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.html +++ b/src/app/view/home/latestblocks/latestblocks.component.html @@ -20,7 +20,7 @@
-
{{'home.DIFFICULTY' | translate}}
+
{{'home.TARGET_DIFFICULTY' | translate}}