1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-15 20:35:23 +03:00

chore: remove custom string formatting

String template literals are in built way to handle these cases now
This commit is contained in:
Tomas Chmelevskij 2020-11-12 22:01:01 +01:00
parent 71586c914a
commit 2938c4338d
3 changed files with 36 additions and 37 deletions

View file

@ -262,12 +262,7 @@ GuiControl.prototype.log = function (message) {
const seconds = (d.getSeconds() < 10) ? `0${d.getSeconds()}` : d.getSeconds();
const time = `${hours}:${minutes}:${seconds}`;
const formattedDate = "{0}-{1}-{2} {3}".format(
year,
month,
date,
`@ ${time}`
);
const formattedDate = `${year}-${month}-${date} @${time}`;
$('div.wrapper', commandLog).append(`<p>${formattedDate} -- ${message}</p>`);
commandLog.scrollTop($('div.wrapper', commandLog).height());
};