Skip to content

Commit

Permalink
Merge pull request louislam#719 from bertyhell/bugfix/edit-monitor
Browse files Browse the repository at this point in the history
fix(edit-monitor): no need to escape placeholder {} if not translated
  • Loading branch information
louislam authored Oct 16, 2021
2 parents 9a60f69 + 6162754 commit dec175d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions src/languages/nl-NL.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: "
};
10 changes: 2 additions & 8 deletions src/pages/EditMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
}
},
Expand Down Expand Up @@ -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;
}
},
};
</script>
Expand Down

0 comments on commit dec175d

Please sign in to comment.