From 4a2f362ed77c2a767f8498a9735ee0fe8a3ffa09 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Fri, 10 Sep 2021 09:10:42 +0200 Subject: [PATCH] Version number update --- src/commands/Dashboard.ts | 2 +- src/helpers/Extension.ts | 6 +++++- src/webview/ExplorerView.ts | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/commands/Dashboard.ts b/src/commands/Dashboard.ts index 791bc5a5..70b6d2c3 100644 --- a/src/commands/Dashboard.ts +++ b/src/commands/Dashboard.ts @@ -378,7 +378,7 @@ export class Dashboard {
- Daily usage + Daily usage diff --git a/src/helpers/Extension.ts b/src/helpers/Extension.ts index 2501aad6..2236dad1 100644 --- a/src/helpers/Extension.ts +++ b/src/helpers/Extension.ts @@ -29,8 +29,12 @@ export class Extension { */ public getVersion(): { usedVersion: string | undefined, installedVersion: string } { const frontMatter = extensions.getExtension(this.isBetaVersion() ? EXTENSION_BETA_ID : EXTENSION_ID)!; - const installedVersion = frontMatter.packageJSON.version; + let installedVersion = frontMatter.packageJSON.version; const usedVersion = this.ctx.globalState.get(EXTENSION_STATE_VERSION); + + if (this.isBetaVersion()) { + installedVersion = `${installedVersion}-beta`; + } if (!usedVersion) { this.setVersion(installedVersion); diff --git a/src/webview/ExplorerView.ts b/src/webview/ExplorerView.ts index 7c670540..29695cc8 100644 --- a/src/webview/ExplorerView.ts +++ b/src/webview/ExplorerView.ts @@ -20,6 +20,7 @@ import { Folders } from '../commands/Folders'; import { Preview } from '../commands/Preview'; import { openFileInEditor } from '../helpers/openFileInEditor'; import { WebviewHelper } from '@estruyf/vscode'; +import { Extension } from '../helpers/Extension'; const FILE_LIMIT = 10; @@ -534,6 +535,8 @@ export class ExplorerView implements WebviewViewProvider, Disposable { const nonce = WebviewHelper.getNonce(); + const version = Extension.getInstance().getVersion(); + return ` @@ -549,7 +552,7 @@ export class ExplorerView implements WebviewViewProvider, Disposable {
- Daily usage + Daily usage