feat: disable bulk edit entries with //
This commit is contained in:
@@ -224,13 +224,11 @@ export default defineComponent({
|
||||
|
||||
watch(bulkHeaders, () => {
|
||||
try {
|
||||
const transformation = bulkHeaders.value.split("\n").map((item) => {
|
||||
return {
|
||||
key: item.substr(0, item.indexOf(":")).trim(),
|
||||
value: item.substr(item.indexOf(":") + 1).trim(),
|
||||
active: true,
|
||||
}
|
||||
})
|
||||
const transformation = bulkHeaders.value.split("\n").map((item) => ({
|
||||
key: item.substr(0, item.indexOf(":")).trim(),
|
||||
value: item.substr(item.indexOf(":") + 1).trim(),
|
||||
active: !item.trim().startsWith("//"),
|
||||
}))
|
||||
setRESTHeaders(transformation)
|
||||
} catch (e) {
|
||||
$toast.error(t("error.something_went_wrong").toString(), {
|
||||
|
||||
@@ -232,13 +232,11 @@ export default defineComponent({
|
||||
|
||||
watch(bulkParams, () => {
|
||||
try {
|
||||
const transformation = bulkParams.value.split("\n").map((item) => {
|
||||
return {
|
||||
key: item.substr(0, item.indexOf(":")).trim(),
|
||||
value: item.substr(item.indexOf(":") + 1).trim(),
|
||||
active: true,
|
||||
}
|
||||
})
|
||||
const transformation = bulkParams.value.split("\n").map((item) => ({
|
||||
key: item.substr(0, item.indexOf(":")).trim(),
|
||||
value: item.substr(item.indexOf(":") + 1).trim(),
|
||||
active: !item.trim().startsWith("//"),
|
||||
}))
|
||||
setRESTParams(transformation)
|
||||
} catch (e) {
|
||||
$toast.error(t("error.something_went_wrong").toString(), {
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
},
|
||||
"state": {
|
||||
"bulk_mode": "Bulk edit",
|
||||
"bulk_mode_placeholder": "Entries are separated by newline\nKeys and values are separated by :",
|
||||
"bulk_mode_placeholder": "Entries are separated by newline\nKeys and values are separated by :\nPrepend // to any row you want to add but keep disabled",
|
||||
"cleared": "Cleared",
|
||||
"connected": "Connected",
|
||||
"connected_to": "Connected to {name}",
|
||||
|
||||
Reference in New Issue
Block a user