chore: minor fixes and improvements

This commit is contained in:
liyasthomas
2021-11-14 20:15:24 +05:30
parent f228f37bb8
commit d383b48916
6 changed files with 46 additions and 2 deletions

View File

@@ -391,6 +391,19 @@ const copyVariablesIcon = ref("copy")
const showSaveRequestModal = ref(false)
watch(
headers,
() => {
if (
(headers.value[headers.value.length - 1]?.key !== "" ||
headers.value[headers.value.length - 1]?.value !== "") &&
headers.value.length
)
addRequestHeader()
},
{ deep: true }
)
const editBulkHeadersLine = (
index: number,
item?: {

View File

@@ -223,6 +223,19 @@ watch(bulkHeaders, () => {
const headers$ = useReadonlyStream(restHeaders$, [])
watch(
headers$,
(newValue) => {
if (
(newValue[newValue.length - 1]?.key !== "" ||
newValue[newValue.length - 1]?.value !== "") &&
newValue.length
)
addHeader()
},
{ deep: true }
)
onBeforeUpdate(() => editBulkHeadersLine(-1, null))
const editBulkHeadersLine = (index: number, item?: HoppRESTParam) => {

View File

@@ -217,6 +217,19 @@ useCodemirror(bulkEditor, bulkParams, {
const params$ = useReadonlyStream(restParams$, [])
watch(
params$,
(newValue) => {
if (
(newValue[newValue.length - 1]?.key !== "" ||
newValue[newValue.length - 1]?.value !== "") &&
newValue.length
)
addParam()
},
{ deep: true }
)
onBeforeUpdate(() => editBulkParamsLine(-1, null))
const editBulkParamsLine = (index: number, item?: HoppRESTParam) => {

View File

@@ -174,9 +174,14 @@ export default defineComponent({
icon: "download_for_offline",
duration: 0,
action: [
{
text: `${this.$t("action.dismiss")}`,
onClick: (_, toastObject) => {
toastObject.goAway(0)
},
},
{
text: `${this.$t("app.reload")}`,
class: "!ml-auto",
onClick: (_, toastObject) => {
toastObject.goAway(0)
window.location.reload()

View File

@@ -339,7 +339,7 @@
"experiments_notice": "This is a collection of experiments we're working on that might turn out to be useful, fun, both, or neither. They're not final and may not be stable, so if something overly weird happens, don't panic. Just turn the dang thing off. Jokes aside, ",
"extension_ver_not_reported": "Not Reported",
"extension_version": "Extension Version",
"extensions": "Browser extensions",
"extensions": "Browser extension",
"extensions_use_toggle": "Use the browser extension to send requests (if present)",
"font_size": "Font size",
"font_size_large": "Large",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 709 KiB