From 2e4a78dd2476ec480c39451b7478deb164d7d112 Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Mon, 4 Dec 2023 13:51:35 +0100 Subject: [PATCH] Filter for appropriate file extension in file upload dialog. In case of an upload error, the error message will be shown received from target. --- .../web/IconTextLampPlugin.html | 16 ++++++++++---- lib/IconTextPlugin/web/IconTextPlugin.html | 16 ++++++++++---- lib/ThreeIconPlugin/web/ThreeIconPlugin.html | 22 ++++++++++++++----- 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/lib/IconTextLampPlugin/web/IconTextLampPlugin.html b/lib/IconTextLampPlugin/web/IconTextLampPlugin.html index 58a95383..c640a855 100644 --- a/lib/IconTextLampPlugin/web/IconTextLampPlugin.html +++ b/lib/IconTextLampPlugin/web/IconTextLampPlugin.html @@ -106,7 +106,7 @@

Icon

- +
@@ -119,7 +119,7 @@

Sprite sheet

- +
@@ -271,7 +271,11 @@

Lamp

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); }); @@ -294,7 +298,11 @@

Lamp

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); }); diff --git a/lib/IconTextPlugin/web/IconTextPlugin.html b/lib/IconTextPlugin/web/IconTextPlugin.html index a51835eb..0ee19c02 100644 --- a/lib/IconTextPlugin/web/IconTextPlugin.html +++ b/lib/IconTextPlugin/web/IconTextPlugin.html @@ -90,7 +90,7 @@

Icon

- +
@@ -103,7 +103,7 @@

Sprite sheet

- +
@@ -228,7 +228,11 @@

Text

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); }); @@ -251,7 +255,11 @@

Text

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); }); diff --git a/lib/ThreeIconPlugin/web/ThreeIconPlugin.html b/lib/ThreeIconPlugin/web/ThreeIconPlugin.html index 4c7044ca..727529ff 100644 --- a/lib/ThreeIconPlugin/web/ThreeIconPlugin.html +++ b/lib/ThreeIconPlugin/web/ThreeIconPlugin.html @@ -97,7 +97,7 @@

Icon

- +
@@ -118,7 +118,7 @@

Sprite sheet

- +
@@ -316,7 +316,11 @@

Animation configuration

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); }); @@ -339,7 +343,11 @@

Animation configuration

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); }); @@ -378,7 +386,11 @@

Animation configuration

updateForms(); alert("Ok."); }).catch(function(rsp) { - alert("Failed."); + if (("undefined" !== typeof rsp.error) && ("string" === typeof rsp.error.msg)) { + alert("Error: " + rsp.error.msg); + } else { + alert("Failed."); + } }).finally(function() { enableUI(); });