refactor: minoe fixes and improvements
This commit is contained in:
@@ -152,6 +152,7 @@ a {
|
|||||||
[interactive] > div {
|
[interactive] > div {
|
||||||
@apply flex;
|
@apply flex;
|
||||||
@apply flex-1;
|
@apply flex-1;
|
||||||
|
@apply h-full;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tippy-content > div {
|
.tippy-content > div {
|
||||||
@@ -338,23 +339,6 @@ input[type="checkbox"] {
|
|||||||
@apply text-secondaryLight;
|
@apply text-secondaryLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
#response-details-wrapper {
|
|
||||||
@apply relative;
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
@apply m-0;
|
|
||||||
@apply w-full;
|
|
||||||
}
|
|
||||||
|
|
||||||
.covers-response {
|
|
||||||
@apply absolute;
|
|
||||||
@apply inset-0;
|
|
||||||
@apply bg-white;
|
|
||||||
@apply h-full;
|
|
||||||
@apply w-full;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toasted-container {
|
.toasted-container {
|
||||||
.toasted {
|
.toasted {
|
||||||
&.toasted-primary {
|
&.toasted-primary {
|
||||||
|
|||||||
@@ -73,7 +73,6 @@
|
|||||||
v-if="collections.length === 0"
|
v-if="collections.length === 0"
|
||||||
class="flex flex-col text-secondaryLight p-4 items-center justify-center"
|
class="flex flex-col text-secondaryLight p-4 items-center justify-center"
|
||||||
>
|
>
|
||||||
<i class="opacity-75 pb-2 material-icons">create_new_folder</i>
|
|
||||||
<span class="text-center pb-4">
|
<span class="text-center pb-4">
|
||||||
{{ $t("empty.collections") }}
|
{{ $t("empty.collections") }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -80,7 +80,6 @@
|
|||||||
v-if="environments.length === 0"
|
v-if="environments.length === 0"
|
||||||
class="flex flex-col text-secondaryLight p-4 items-center justify-center"
|
class="flex flex-col text-secondaryLight p-4 items-center justify-center"
|
||||||
>
|
>
|
||||||
<i class="opacity-75 pb-2 material-icons">library_add</i>
|
|
||||||
<span class="text-center pb-4">
|
<span class="text-center pb-4">
|
||||||
{{ $t("empty.environments") }}
|
{{ $t("empty.environments") }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
@update-query="updateQuery"
|
@update-query="updateQuery"
|
||||||
/>
|
/>
|
||||||
</AppSection>
|
</AppSection>
|
||||||
@@ -105,6 +106,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
</AppSection>
|
</AppSection>
|
||||||
</SmartTab>
|
</SmartTab>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
|
|||||||
@@ -196,6 +196,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
styles="rounded"
|
styles="border rounded border-dividerLight"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="response-details-wrapper">
|
<div class="relative">
|
||||||
<SmartAceEditor
|
<SmartAceEditor
|
||||||
:value="responseBodyText"
|
:value="responseBodyText"
|
||||||
:lang="'html'"
|
:lang="'html'"
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
<iframe
|
<iframe
|
||||||
ref="previewFrame"
|
ref="previewFrame"
|
||||||
@@ -135,3 +136,15 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.covers-response {
|
||||||
|
@apply absolute;
|
||||||
|
@apply inset-0;
|
||||||
|
@apply bg-primary;
|
||||||
|
@apply h-full;
|
||||||
|
@apply w-full;
|
||||||
|
@apply border;
|
||||||
|
@apply border-dividerLight;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -27,8 +27,11 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="response-details-wrapper">
|
<div class="flex relative">
|
||||||
<img class="max-w-full" :src="imageSource" />
|
<img
|
||||||
|
class="border-b border-dividerLight flex max-w-full flex-1"
|
||||||
|
:src="imageSource"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -46,7 +49,11 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
responseType() {
|
responseType() {
|
||||||
return (this.response.headers["content-type"] || "")
|
return (
|
||||||
|
this.response.headers.find(
|
||||||
|
(h) => h.key.toLowerCase() === "content-type"
|
||||||
|
).value || ""
|
||||||
|
)
|
||||||
.split(";")[0]
|
.split(";")[0]
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="response-details-wrapper">
|
<div class="relative">
|
||||||
<SmartAceEditor
|
<SmartAceEditor
|
||||||
:value="jsonBodyText"
|
:value="jsonBodyText"
|
||||||
:lang="'json'"
|
:lang="'json'"
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +79,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
responseType() {
|
responseType() {
|
||||||
return (this.response.headers["content-type"] || "")
|
return (
|
||||||
|
this.response.headers.find(
|
||||||
|
(h) => h.key.toLowerCase() === "content-type"
|
||||||
|
).value || ""
|
||||||
|
)
|
||||||
.split(";")[0]
|
.split(";")[0]
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="response-details-wrapper">
|
<div class="relative">
|
||||||
<SmartAceEditor
|
<SmartAceEditor
|
||||||
:value="responseBodyText"
|
:value="responseBodyText"
|
||||||
:lang="'plain_text'"
|
:lang="'plain_text'"
|
||||||
@@ -47,6 +47,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,13 +70,18 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
responseType() {
|
responseType() {
|
||||||
return (this.response.headers["content-type"] || "")
|
return (
|
||||||
|
this.response.headers.find(
|
||||||
|
(h) => h.key.toLowerCase() === "content-type"
|
||||||
|
).value || ""
|
||||||
|
)
|
||||||
.split(";")[0]
|
.split(";")[0]
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
downloadResponse() {
|
downloadResponse() {
|
||||||
|
console.log(this.responseType)
|
||||||
const dataToWrite = this.responseBodyText
|
const dataToWrite = this.responseBodyText
|
||||||
const file = new Blob([dataToWrite], { type: this.responseType })
|
const file = new Blob([dataToWrite], { type: this.responseType })
|
||||||
const a = document.createElement("a")
|
const a = document.createElement("a")
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="response-details-wrapper">
|
<div class="relative">
|
||||||
<SmartAceEditor
|
<SmartAceEditor
|
||||||
:value="responseBodyText"
|
:value="responseBodyText"
|
||||||
:lang="'xml'"
|
:lang="'xml'"
|
||||||
@@ -47,6 +47,7 @@
|
|||||||
showPrintMargin: false,
|
showPrintMargin: false,
|
||||||
useWorker: false,
|
useWorker: false,
|
||||||
}"
|
}"
|
||||||
|
styles="border-b border-dividerLight"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +70,11 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
responseType() {
|
responseType() {
|
||||||
return (this.response.headers["content-type"] || "")
|
return (
|
||||||
|
this.response.headers.find(
|
||||||
|
(h) => h.key.toLowerCase() === "content-type"
|
||||||
|
).value || ""
|
||||||
|
)
|
||||||
.split(";")[0]
|
.split(";")[0]
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.autocomplete-wrapper {
|
.autocomplete-wrapper {
|
||||||
|
@apply relative;
|
||||||
@apply contents;
|
@apply contents;
|
||||||
|
|
||||||
input:focus + ul.suggestions,
|
input:focus + ul.suggestions,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="chip">
|
<span class="chip">
|
||||||
<i class="opacity-75 material-icons">attachment</i>
|
<i class="opacity-75 material-icons">attachment</i>
|
||||||
<span class="px-2"><slot></slot></span>
|
<span class="max-w-64 px-2 truncate"><slot></slot></span>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
class="rounded close-button"
|
class="rounded close-button"
|
||||||
icon="close"
|
icon="close"
|
||||||
|
|||||||
@@ -57,10 +57,10 @@
|
|||||||
</span>
|
</span>
|
||||||
<SmartSpinner v-else class="mr-4" />
|
<SmartSpinner v-else class="mr-4" />
|
||||||
<div
|
<div
|
||||||
class="flex-1 inline-flex items-start"
|
class="flex-1 inline-flex truncate items-start"
|
||||||
:class="{ 'flex-col': description }"
|
:class="{ 'flex-col': description }"
|
||||||
>
|
>
|
||||||
<div>
|
<div class="truncate">
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</div>
|
</div>
|
||||||
<p v-if="description" class="my-2 text-left text-secondaryLight">
|
<p v-if="description" class="my-2 text-left text-secondaryLight">
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<AppHeader />
|
<AppHeader />
|
||||||
</Pane>
|
</Pane>
|
||||||
<Pane class="flex flex-1 hide-scrollbar !overflow-auto">
|
<Pane class="flex flex-1 hide-scrollbar !overflow-auto">
|
||||||
<main class="flex flex-1">
|
<main class="flex flex-1 w-full">
|
||||||
<nuxt class="flex flex-1" />
|
<nuxt class="flex flex-1" />
|
||||||
</main>
|
</main>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|||||||
@@ -587,7 +587,10 @@ export const restParams$ = restSessionStore.subject$.pipe(
|
|||||||
)
|
)
|
||||||
|
|
||||||
export const restActiveParamsCount$ = restParams$.pipe(
|
export const restActiveParamsCount$ = restParams$.pipe(
|
||||||
map((params) => params.filter((x) => x.active).length)
|
map(
|
||||||
|
(params) =>
|
||||||
|
params.filter((x) => x.active && (x.key !== "" || x.value !== "")).length
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
export const restMethod$ = restSessionStore.subject$.pipe(
|
export const restMethod$ = restSessionStore.subject$.pipe(
|
||||||
@@ -601,7 +604,10 @@ export const restHeaders$ = restSessionStore.subject$.pipe(
|
|||||||
)
|
)
|
||||||
|
|
||||||
export const restActiveHeadersCount$ = restHeaders$.pipe(
|
export const restActiveHeadersCount$ = restHeaders$.pipe(
|
||||||
map((params) => params.filter((x) => x.active).length)
|
map(
|
||||||
|
(params) =>
|
||||||
|
params.filter((x) => x.active && (x.key !== "" || x.value !== "")).length
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
export const restAuth$ = restRequest$.pipe(pluck("auth"))
|
export const restAuth$ = restRequest$.pipe(pluck("auth"))
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
<div
|
<div
|
||||||
class="
|
class="
|
||||||
bg-primary
|
bg-primary
|
||||||
|
border-t border-b border-dividerLight
|
||||||
flex
|
flex
|
||||||
p-4
|
p-4
|
||||||
bottom-0
|
bottom-0
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<HttpParameters />
|
<HttpParameters />
|
||||||
</SmartTab>
|
</SmartTab>
|
||||||
|
|
||||||
<SmartTab :id="'bodyParams'" :label="$t('body')" info="0">
|
<SmartTab :id="'bodyParams'" :label="$t('body')">
|
||||||
<HttpBody />
|
<HttpBody />
|
||||||
</SmartTab>
|
</SmartTab>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user