From 61627545a506dc457e47a3004d3e7097cd92c7b8 Mon Sep 17 00:00:00 2001 From: Bert Verhelst Date: Sat, 16 Oct 2021 11:26:32 +0200 Subject: [PATCH] fix(edit-monitor): no need to escape placeholder {} if not translated --- src/languages/nl-NL.js | 4 +--- src/pages/EditMonitor.vue | 10 ++-------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/languages/nl-NL.js b/src/languages/nl-NL.js index 170b4a3c..8af03200 100644 --- a/src/languages/nl-NL.js +++ b/src/languages/nl-NL.js @@ -203,7 +203,5 @@ export default { Headers: "Headers", PushUrl: "Push URL", HeadersInvalidFormat: "The request headers is geen geldige JSON: ", - BodyInvalidFormat: "De request body is geen geldige JSON: ", - BodyPlaceholder: "{\n\t\"id\": 124357,\n\t\"gebruikersnaam\": \"admin\",\n\t\"wachtwoord\": \"mijnAdminWachtwoord\"\n}", - HeadersPlaceholder: "{\n\t\"Authorization\": \"Bearer abc123\",\n\t\"Content-Type\": \"application/json\"\n}", + BodyInvalidFormat: "De request body is geen geldige JSON: " }; diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index b2349021..58a1c7d5 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -335,11 +335,11 @@ export default { }, bodyPlaceholder() { - return this.decodeHtml("{\n\t\"id\": 124357,\n\t\"username\": \"admin\",\n\t\"password\": \"myAdminPassword\"\n}"); + return "{\n\t\"id\": 124357,\n\t\"username\": \"admin\",\n\t\"password\": \"myAdminPassword\"\n}"; }, headersPlaceholder() { - return this.decodeHtml("{\n\t\"Authorization\": \"Bearer abc123\",\n\t\"Content-Type\": \"application/json\"\n}"); + return "{\n\t\"Authorization\": \"Bearer abc123\",\n\t\"Content-Type\": \"application/json\"\n}"; } }, @@ -508,12 +508,6 @@ export default { addedNotification(id) { this.monitor.notificationIDList[id] = true; }, - - decodeHtml(html) { - const txt = document.createElement("textarea"); - txt.innerHTML = html; - return txt.value; - } }, };