feat: disable bulk edit entries with //
This commit is contained in:
@@ -224,13 +224,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(bulkHeaders, () => {
|
watch(bulkHeaders, () => {
|
||||||
try {
|
try {
|
||||||
const transformation = bulkHeaders.value.split("\n").map((item) => {
|
const transformation = bulkHeaders.value.split("\n").map((item) => ({
|
||||||
return {
|
key: item.substr(0, item.indexOf(":")).trim(),
|
||||||
key: item.substr(0, item.indexOf(":")).trim(),
|
value: item.substr(item.indexOf(":") + 1).trim(),
|
||||||
value: item.substr(item.indexOf(":") + 1).trim(),
|
active: !item.trim().startsWith("//"),
|
||||||
active: true,
|
}))
|
||||||
}
|
|
||||||
})
|
|
||||||
setRESTHeaders(transformation)
|
setRESTHeaders(transformation)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$toast.error(t("error.something_went_wrong").toString(), {
|
$toast.error(t("error.something_went_wrong").toString(), {
|
||||||
|
|||||||
@@ -232,13 +232,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
watch(bulkParams, () => {
|
watch(bulkParams, () => {
|
||||||
try {
|
try {
|
||||||
const transformation = bulkParams.value.split("\n").map((item) => {
|
const transformation = bulkParams.value.split("\n").map((item) => ({
|
||||||
return {
|
key: item.substr(0, item.indexOf(":")).trim(),
|
||||||
key: item.substr(0, item.indexOf(":")).trim(),
|
value: item.substr(item.indexOf(":") + 1).trim(),
|
||||||
value: item.substr(item.indexOf(":") + 1).trim(),
|
active: !item.trim().startsWith("//"),
|
||||||
active: true,
|
}))
|
||||||
}
|
|
||||||
})
|
|
||||||
setRESTParams(transformation)
|
setRESTParams(transformation)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$toast.error(t("error.something_went_wrong").toString(), {
|
$toast.error(t("error.something_went_wrong").toString(), {
|
||||||
|
|||||||
@@ -404,7 +404,7 @@
|
|||||||
},
|
},
|
||||||
"state": {
|
"state": {
|
||||||
"bulk_mode": "Bulk edit",
|
"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",
|
"cleared": "Cleared",
|
||||||
"connected": "Connected",
|
"connected": "Connected",
|
||||||
"connected_to": "Connected to {name}",
|
"connected_to": "Connected to {name}",
|
||||||
|
|||||||
Reference in New Issue
Block a user