From 4660d0615edbcc5dc2f9a0ead3e857f3bfa0bb73 Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:40:49 +0100 Subject: [PATCH] Torn out the source of many webview bugs + added empty project name warning Signed-off-by: paulober <44974737+paulober@users.noreply.github.com> --- src/webview/newProjectPanel.mts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/webview/newProjectPanel.mts b/src/webview/newProjectPanel.mts index 109fc9f..350ea2c 100644 --- a/src/webview/newProjectPanel.mts +++ b/src/webview/newProjectPanel.mts @@ -677,6 +677,15 @@ export class NewProjectPanel { return; } + if (data.projectName === undefined || data.projectName === "") { + void window.showWarningMessage("Project name cannot be empty."); + await this._panel.webview.postMessage({ + command: "submitDenied", + }); + + return; + } + // check if projectRoot/projectName folder already exists if ( existsSync(join(this._projectRoot.fsPath, data.projectName)) @@ -1528,7 +1537,6 @@ export class NewProjectPanel {

Basic Settings

-
${ !this._isProjectImport ? `
-
${ !this._isProjectImport