From 0df334aa2ae537c264c6ff6076f4753771178a19 Mon Sep 17 00:00:00 2001 From: Bryan Gin-ge Chen Date: Sat, 29 Feb 2020 16:19:37 -0500 Subject: [PATCH] infoview: delete "Updating" label, make title reflect DisplayMode --- media/infoview.css | 4 ++-- src/infoview.ts | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/media/infoview.css b/media/infoview.css index e8edc83..4b3b45e 100644 --- a/media/infoview.css +++ b/media/infoview.css @@ -43,7 +43,7 @@ div#filter { display: block; position: absolute; top : 0px; - right: 90px; + right: 30px; width: auto; padding: 3px 0px 1px 0px; z-index: 2; @@ -217,4 +217,4 @@ select { .vscode-light .goal-goals { color: #367cb6; } .vscode-light .goal-vdash { color: #367cb6; } .vscode-light .goal-case { color: #1f7a1f; } -.vscode-light .goal-hyp { color: #cc7a00; } \ No newline at end of file +.vscode-light .goal-hyp { color: #cc7a00; } diff --git a/src/infoview.ts b/src/infoview.ts index 02f9d57..1d58a65 100644 --- a/src/infoview.ts +++ b/src/infoview.ts @@ -161,7 +161,8 @@ export class InfoProvider implements Disposable { if (this.webviewPanel) { this.webviewPanel.reveal(column, true); } else { - this.webviewPanel = window.createWebviewPanel('lean', 'Lean Messages', + this.webviewPanel = window.createWebviewPanel('lean', + this.displayMode === DisplayMode.OnlyState ? 'Lean Goal' : 'Lean Messages', {viewColumn: column, preserveFocus: true}, { enableFindWidget: true, @@ -207,6 +208,9 @@ export class InfoProvider implements Disposable { private setMode(mode: DisplayMode) { if (this.displayMode === mode && !this.stopped) { return; } this.displayMode = mode; + if (this.webviewPanel) { + this.webviewPanel.title = this.displayMode === DisplayMode.OnlyState ? 'Lean Goal' : 'Lean Messages'; + } this.stopped = false; this.updatePosition(true); } @@ -430,10 +434,10 @@ export class InfoProvider implements Disposable {
${this.curGoalState ? this.renderFilter() : ''}
- Stopped - - Updating - + + + +
${this.renderGoal()}
${this.renderMessages()}
@@ -445,7 +449,7 @@ export class InfoProvider implements Disposable { const filterIndex = workspace.getConfiguration('lean').get('infoViewFilterIndex', -1); return reFilters.length > 0 ? `
- ${reFilters.map((obj, i) => `