From aef6e066b8010cf7f2233e162a697de49e3b2057 Mon Sep 17 00:00:00 2001 From: cmontella Date: Tue, 22 Nov 2016 15:27:33 -0800 Subject: [PATCH 1/3] Add notice --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From 3fb6def0e54266d5ffadfbbcfee166796858483b Mon Sep 17 00:00:00 2001 From: cmontella Date: Tue, 22 Nov 2016 15:27:42 -0800 Subject: [PATCH 2/3] Format time a little better --- src/ide.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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} ]}); } From 5e06e888b6483c84d45211d16a1383cef9bad11f Mon Sep 17 00:00:00 2001 From: cmontella Date: Tue, 22 Nov 2016 15:27:55 -0800 Subject: [PATCH 3/3] Add a warning banner color --- css/ide.css | 1 + 1 file changed, 1 insertion(+) 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