From f4e445a58b9ac958e0c260cb93a8b10e2f52170a Mon Sep 17 00:00:00 2001 From: Yukino Song Date: Wed, 22 Jan 2025 19:10:23 +0800 Subject: [PATCH] Trim input for app name --- src_assets/common/assets/web/apps.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src_assets/common/assets/web/apps.html b/src_assets/common/assets/web/apps.html index 3db9177c..476f4a3d 100644 --- a/src_assets/common/assets/web/apps.html +++ b/src_assets/common/assets/web/apps.html @@ -563,7 +563,7 @@ }).filter(item => item)); } - searchCovers(this.editForm["name"].toString()) + searchCovers(this.editForm["name"].toString().trim()) .then(list => this.coverCandidates = list) .finally(() => this.coverSearching = false); }, @@ -595,7 +595,8 @@ .finally(() => this.coverFinderBusy = false); }, save() { - this.editForm["image-path"] = this.editForm["image-path"].toString().replace(/"/g, ''); + this.editForm.name = this.editForm.name.trim(); + this.editForm["image-path"] = this.editForm["image-path"].toString().trim().replace(/"/g, ''); delete this.editForm["launching"]; delete this.editForm["id"]; fetch("./api/apps", {