Skip to content

Commit

Permalink
Merge pull request #16 from jalibu/fix/header
Browse files Browse the repository at this point in the history
Fixed Header
  • Loading branch information
jalibu authored May 5, 2021
2 parents 0756f7b + 777a1a6 commit 2872eaf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion @types/Module/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ declare module Module {
getTranslations: Function;
getTemplate: Function;
getTemplateData: Function;
getHeader: Function;
start: Function;
scheduleUpdate: Function;
loadData: Function;
socketNotificationReceived: Function;
getHeader?: Function;
}
): void;
}
Expand Down
2 changes: 1 addition & 1 deletion MMM-Jast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Config } from "../models/Config";

Module.register("MMM-Jast", {
defaults: {
header: null,
locale: config.locale || "en-GB",
updateIntervalInSeconds: 600,
useGrouping: false,
Expand Down Expand Up @@ -55,10 +54,6 @@ Module.register("MMM-Jast", {
};
},

getHeader() {
return this.config.header;
},

start() {
// Override defaults
this.nunjucksEnvironment().loaders[0].async = false;
Expand Down Expand Up @@ -88,7 +83,7 @@ Module.register("MMM-Jast", {
if (notificationIdentifier === "STOCKS_RESULT") {
this.stocks = payload;
this.updateDom();
console.log("Stock results", this.stocks);
console.debug("Stocks", this.stocks);
}
}
});
4 changes: 2 additions & 2 deletions src/client/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default class JastUtils {
const existingCurrency = depot.find(
(growth) => growth.currency === stock.price.currency
)
console.log("add", currentStockValue, lastStockValue, stock.meta.name)

if (existingCurrency) {
existingCurrency.value = existingCurrency.value + currentStockValue
existingCurrency.oldValue = existingCurrency.oldValue + lastStockValue
Expand All @@ -151,7 +151,7 @@ export default class JastUtils {
}
}

console.log("depot", depot)
console.debug("Depot", depot)
return depot
}
}

0 comments on commit 2872eaf

Please sign in to comment.