From cbaa1c1280bf2a954f4f49d8e2621b6447879f4c Mon Sep 17 00:00:00 2001 From: Raptazure Date: Thu, 13 Feb 2020 11:33:04 +0800 Subject: [PATCH] v0.1.3 --- README.md | 5 +++++ changelog.md | 10 +++++++--- package.json | 2 +- src/dailyTarot.ts | 15 +++++++-------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 235854b..73f191f 100644 --- a/README.md +++ b/README.md @@ -51,5 +51,10 @@ - Content of the status bar cannot be overwritten now. - Auto close: Ask multiple questions. We will close previous panels for you. +### 0.1.3 + +- Fix bug: `Daily Crad` status bar cannot be influenced by function `Ask a Question` now. +- When `Daily Card` status bar is already there and function `Draw a Card` is called again, show the name of previous card instead of drawing a new card. + **Enjoy!** diff --git a/changelog.md b/changelog.md index 8680c1a..af00626 100644 --- a/changelog.md +++ b/changelog.md @@ -1,10 +1,14 @@ ## Change Log -### 0.1.0: 05 Feb 2020 +### 0.1.0 - Initial release - Status bar and input box support - Choices: `Ask a Question` and `Draw a Card` -### 0.1.2: 13 Feb 2020 +### 0.1.2 - Content of the status bar cannot be overwritten now. -- Auto close: Ask multiple questions. We will close previous panels for you. \ No newline at end of file +- Auto close: Ask multiple questions. We will close previous panels for you. + +### 0.1.3 +- Fix bug: `Daily Crad` status bar cannot be influenced by function `Ask a Question` now. +- When `Daily Card` status bar is already there and function `Draw a Card` is called again, show the name of previous card instead of drawing a new card. \ No newline at end of file diff --git a/package.json b/package.json index 84fb355..1fb44dc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "daily-tarot", "displayName": "Daily Tarot", "description": "Get your daily tarot reading - Prisma Visions", - "version": "0.1.2", + "version": "0.1.3", "publisher": "raptazure", "icon": "images/icon.jpg", "engines": { diff --git a/src/dailyTarot.ts b/src/dailyTarot.ts index c6fc2ff..ba683e9 100644 --- a/src/dailyTarot.ts +++ b/src/dailyTarot.ts @@ -7,19 +7,18 @@ let statusBar: vscode.StatusBarItem | undefined; export function dailyTarot(context: vscode.ExtensionContext) { if (statusBar === undefined) { DrawCards.show(context); - } - - const index = String(DrawCards.selector); - vscode.window.showInformationMessage(`${tarotDict[index]}`); + const index = String(DrawCards.selector); + vscode.window.showInformationMessage(`${tarotDict[index]}`); - if (statusBar !== undefined) { - statusBar.text = "🔮Daily Card: " + tarotDict[index]; - } else { statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100); statusBar.text = "🔮Daily Card: " + tarotDict[index]; statusBar.show(); + } else { + vscode.window.showInformationMessage(statusBar.text); + } - // single click + // single click + if (statusBar !== undefined) { statusBar.command = 'tarot.ask'; } }