Skip to content

Commit 71d5b36

Browse files
committed
chore: update version to 1.8.2; modify prompt behavior to show Magento project confirmation only when a project is loaded
1 parent 8177b47 commit 71d5b36

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
66

77
## [Unreleased]
88

9+
## [1.8.2] - 2025-01-20
10+
11+
### Changed
12+
13+
- Show "Is this a Magento Project?" only if a project or workspace has been loaded.
14+
15+
916
## [1.8.1] - 2024-12-26
1017

1118
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento-log-viewer",
33
"displayName": "Magento Log Viewer",
44
"description": "A Visual Studio Code extension to view and manage Magento log files.",
5-
"version": "1.8.1",
5+
"version": "1.8.2",
66
"publisher": "MathiasElle",
77
"icon": "resources/logo.png",
88
"repository": {

src/helpers.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ import { LogViewerProvider, ReportViewerProvider, LogItem } from './logViewer';
55

66
// Prompts the user to confirm if the current project is a Magento project.
77
export function promptMagentoProjectSelection(config: vscode.WorkspaceConfiguration, context: vscode.ExtensionContext): void {
8-
vscode.window.showInformationMessage('Is this a Magento project?', 'Yes', 'No').then(selection => {
9-
if (selection === 'Yes') {
10-
selectMagentoRootFolder(config, context);
11-
} else {
12-
updateConfig(config, 'magentoLogViewer.isMagentoProject', selection);
13-
}
14-
});
8+
if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) {
9+
vscode.window.showInformationMessage('Is this a Magento project?', 'Yes', 'No').then(selection => {
10+
if (selection === 'Yes') {
11+
selectMagentoRootFolder(config, context);
12+
} else {
13+
updateConfig(config, 'magentoLogViewer.isMagentoProject', selection);
14+
}
15+
});
16+
}
1517
}
1618

1719
// Prompts the user to select the Magento root folder and updates the configuration.

0 commit comments

Comments
 (0)