diff --git a/css/ide.css b/css/ide.css index 24d6555df..354cf50a0 100644 --- a/css/ide.css +++ b/css/ide.css @@ -89,6 +89,7 @@ body { justify-content: stretch; } .main-pane .notices > .notice > .time { margin-right: 10px; } .main-pane .notices > .notice.error { background: rgb(255, 216, 222); } +.main-pane .notices > .notice.warning { background: rgb(255, 247, 217); } /****************************************************************************\ * Editor diff --git a/src/client.ts b/src/client.ts index 7b9c0d0a3..8b9c99e95 100644 --- a/src/client.ts +++ b/src/client.ts @@ -219,7 +219,7 @@ export class EveClient { } onClose() { - + ide.injectNotice("warning", "The editor has lost connection to the Eve server. All changes will be made locally."); } onMessage(event) { diff --git a/src/ide.ts b/src/ide.ts index 66b439644..03a3782a9 100644 --- a/src/ide.ts +++ b/src/ide.ts @@ -2018,9 +2018,10 @@ export class IDE { let items = []; for(let notice of this.notices) { let time = new Date(notice.time); - + let formattedMinutes = time.getMinutes() >= 10 ? time.getMinutes() : `0${time.getMinutes()}`; + let formattedSeconds = time.getSeconds() >= 10 ? time.getMinutes() : `0${time.getSeconds()}`; items.push({c: `notice ${notice.type} flex-row`, children: [ - {c: "time", text: `${time.getHours()}:${time.getMinutes()}:${time.getSeconds()}`}, + {c: "time", text: `${time.getHours()}:${formattedMinutes}:${formattedSeconds}`}, {c: "message", text: notice.message} ]}); }