Merge branch 'master' into tests

This commit is contained in:
Liyas Thomas
2020-08-18 08:14:28 +05:30
committed by GitHub
60 changed files with 243 additions and 288 deletions

View File

@@ -10,7 +10,7 @@
</p> </p>
<p> <p>
[![Travis Build Status](https://img.shields.io/travis/com/hoppscotch/hoppscotch/master?logo=Travis)](https://travis-ci.com/hoppscotch/hoppscotch) [![GitHub release](https://img.shields.io/github/release/hoppscotch/hoppscotch/all?logo=GitHub)](https://github.com/hoppscotch/hoppscotch/releases/latest) [![Website](https://img.shields.io/website?url=https%3A%2F%2Fhoppscotch.io&logo=postwoman)](https://hoppscotch.io) [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen)](CONTRIBUTING.md) [![Financial Contributors on Open Collective](https://img.shields.io/opencollective/all/hoppscotch?logo=Open-Collective&label=financial+contributors)](https://opencollective.com/hoppscotch) [![Donate on PayPal](https://img.shields.io/badge/support-PayPal-blue?logo=PayPal)](https://www.paypal.me/liyascthomas) [![Chat on Telegram](https://img.shields.io/badge/chat-Telegram-blueviolet?logo=Telegram)](https://t.me/hoppscotch_app) [![Chat on Discord](https://img.shields.io/badge/chat-Discord-violet?logo=discord)](https://discord.gg/GAMWxmR) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fhoppscotch.io%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fhoppscotch.io&text=%F0%9F%91%BD%20hoppscotch%20%E2%80%A2%20API%20request%20builder%20-%20Helps%20you%20create%20your%20requests%20faster%2C%20saving%20you%20precious%20time%20on%20your%20development&original_referer=https%3A%2F%2Ftwitter.com%2Fshare%3Ftext%3D%25F0%259F%2591%25BD%2520hoppscotch%2520%25E2%2580%25A2%2520API%2520request%2520builder%2520-%2520Helps%2520you%2520create%2520your%2520requests%2520faster%2C%2520saving%2520you%2520precious%2520time%2520on%2520your%2520development%26url%3Dhttps%3A%2F%2Fhoppscotch.io%26hashtags%3Dhoppscotch%26via%3Dliyasthomas&via=liyasthomas&hashtags=hoppscotch) [![Travis Build Status](https://img.shields.io/travis/com/hoppscotch/hoppscotch/master?logo=Travis)](https://travis-ci.com/hoppscotch/hoppscotch) [![GitHub release](https://img.shields.io/github/release/hoppscotch/hoppscotch/all?logo=GitHub)](https://github.com/hoppscotch/hoppscotch/releases/latest) [![Website](https://img.shields.io/website?url=https%3A%2F%2Fhoppscotch.io&logo=postwoman)](https://hoppscotch.io) [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen)](CONTRIBUTING.md) [![Financial Contributors on Open Collective](https://img.shields.io/opencollective/all/hoppscotch?logo=Open-Collective&label=financial+contributors)](https://opencollective.com/hoppscotch) [![Donate on PayPal](https://img.shields.io/badge/support-PayPal-blue?logo=PayPal)](https://www.paypal.me/liyascthomas) [![Chat on Telegram](https://img.shields.io/badge/chat-Telegram-blueviolet?logo=Telegram)](https://t.me/hoppscotch) [![Chat on Discord](https://img.shields.io/badge/chat-Discord-violet?logo=discord)](https://discord.gg/GAMWxmR) [![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fhoppscotch.io%2F)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fhoppscotch.io&text=%F0%9F%91%BD%20hoppscotch%20%E2%80%A2%20API%20request%20builder%20-%20Helps%20you%20create%20your%20requests%20faster%2C%20saving%20you%20precious%20time%20on%20your%20development&original_referer=https%3A%2F%2Ftwitter.com%2Fshare%3Ftext%3D%25F0%259F%2591%25BD%2520hoppscotch%2520%25E2%2580%25A2%2520API%2520request%2520builder%2520-%2520Helps%2520you%2520create%2520your%2520requests%2520faster%2C%2520saving%2520you%2520precious%2520time%2520on%2520your%2520development%26url%3Dhttps%3A%2F%2Fhoppscotch.io%26hashtags%3Dhoppscotch%26via%3Dliyasthomas&via=liyasthomas&hashtags=hoppscotch)
</p> </p>
<p> <p>

View File

@@ -383,12 +383,16 @@ section:target {
input[type="file"], input[type="file"],
input[type="radio"], input[type="radio"],
.hide-on-large-screen,
#installPWA, #installPWA,
.hidden { .hidden {
display: none; display: none;
} }
.show-on-large-screen {
display: flex;
flex: 1;
}
.method, .method,
kbd, kbd,
select, select,
@@ -574,15 +578,6 @@ ol li {
} }
} }
.show-on-small-screen {
display: flex;
}
.show-on-large-screen {
display: flex;
flex: 1;
}
.info-response { .info-response {
color: #ffeb3b; color: #ffeb3b;
} }
@@ -726,11 +721,6 @@ section {
display: none; display: none;
} }
.hide-on-large-screen,
.show-on-small-screen {
display: inline-flex;
}
.sticky-inner { .sticky-inner {
position: relative; position: relative;
width: 100%; width: 100%;

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("new_collection") }}</h3> <h3 class="title">{{ $t("new_collection") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -44,14 +44,15 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("new_folder") }}</h3> <h3 class="title">{{ $t("new_folder") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -44,16 +44,17 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
collection: Object, collection: Object,
collectionIndex: Number, collectionIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -4,7 +4,7 @@
<button class="icon" @click="toggleShowChildren"> <button class="icon" @click="toggleShowChildren">
<i class="material-icons" v-show="!showChildren">arrow_right</i> <i class="material-icons" v-show="!showChildren">arrow_right</i>
<i class="material-icons" v-show="showChildren">arrow_drop_down</i> <i class="material-icons" v-show="showChildren">arrow_drop_down</i>
<i class="material-icons">folder</i> <folderIcon class="material-icons" />
<span>{{ collection.name }}</span> <span>{{ collection.name }}</span>
</button> </button>
<div> <div>
@@ -35,7 +35,7 @@
</div> </div>
<div> <div>
<button class="icon" @click="removeCollection" v-close-popover> <button class="icon" @click="removeCollection" v-close-popover>
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
<span>{{ $t("delete") }}</span> <span>{{ $t("delete") }}</span>
</button> </button>
</div> </div>
@@ -98,12 +98,11 @@ ul li {
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import folderIcon from "~/static/icons/folder-24px.svg?inline"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: { components: { folderIcon, deleteIcon },
folder: () => import("./folder"),
request: () => import("./request"),
},
props: { props: {
collectionIndex: Number, collectionIndex: Number,
collection: Object, collection: Object,
@@ -127,7 +126,7 @@ export default {
this.showChildren = !this.showChildren this.showChildren = !this.showChildren
}, },
removeCollection() { removeCollection() {
if (!confirm( this.$t("are_you_sure_remove_collection") )) return if (!confirm(this.$t("are_you_sure_remove_collection"))) return
this.$store.commit("postwoman/removeCollection", { this.$store.commit("postwoman/removeCollection", {
collectionIndex: this.collectionIndex, collectionIndex: this.collectionIndex,
}) })

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("edit_collection") }}</h3> <h3 class="title">{{ $t("edit_collection") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -44,16 +44,17 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
editingCollection: Object, editingCollection: Object,
editingCollectionIndex: Number, editingCollectionIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("edit_folder") }}</h3> <h3 class="title">{{ $t("edit_folder") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -39,8 +39,12 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
collection: Object, collection: Object,
@@ -48,9 +52,6 @@ export default {
folder: Object, folder: Object,
folderIndex: Number, folderIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("edit_request") }}</h3> <h3 class="title">{{ $t("edit_request") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -70,8 +70,12 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
collectionIndex: Number, collectionIndex: Number,
@@ -79,9 +83,6 @@ export default {
request: Object, request: Object,
requestIndex: Number, requestIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
requestUpdateData: { requestUpdateData: {

View File

@@ -22,7 +22,7 @@
</div> </div>
<div> <div>
<button class="icon" @click="removeFolder" v-close-popover> <button class="icon" @click="removeFolder" v-close-popover>
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
<span>{{ $t("delete") }}</span> <span>{{ $t("delete") }}</span>
</button> </button>
</div> </div>
@@ -72,17 +72,16 @@ ul li {
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: { deleteIcon },
props: { props: {
folder: Object, folder: Object,
collectionIndex: Number, collectionIndex: Number,
folderIndex: Number, folderIndex: Number,
doc: Boolean, doc: Boolean,
}, },
components: {
request: () => import("./request"),
},
data() { data() {
return { return {
showChildren: false, showChildren: false,
@@ -103,7 +102,7 @@ export default {
this.$store.commit("postwoman/selectRequest", { request }) this.$store.commit("postwoman/selectRequest", { request })
}, },
removeFolder() { removeFolder() {
if (!confirm( this.$t("are_you_sure_remove_folder"))) return if (!confirm(this.$t("are_you_sure_remove_folder"))) return
this.$store.commit("postwoman/removeFolder", { this.$store.commit("postwoman/removeFolder", {
collectionIndex: this.collectionIndex, collectionIndex: this.collectionIndex,
folderIndex: this.folderIndex, folderIndex: this.folderIndex,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3> <h3 class="title">{{ $t("import_export") }} {{ $t("collections") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -77,8 +77,12 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
data() { data() {
return { return {
fb, fb,
@@ -87,9 +91,6 @@ export default {
props: { props: {
show: Boolean, show: Boolean,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
computed: { computed: {
collectionJson() { collectionJson() {
return JSON.stringify(this.$store.state.postwoman.collections, null, 2) return JSON.stringify(this.$store.state.postwoman.collections, null, 2)

View File

@@ -5,20 +5,20 @@ TODO:
<template> <template>
<pw-section class="yellow" :label="$t('collections')" ref="collections"> <pw-section class="yellow" :label="$t('collections')" ref="collections">
<addCollection :show="showModalAdd" @hide-modal="displayModalAdd(false)" /> <add-collection :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
<editCollection <edit-collection
:show="showModalEdit" :show="showModalEdit"
:editingCollection="editingCollection" :editingCollection="editingCollection"
:editingCollectionIndex="editingCollectionIndex" :editingCollectionIndex="editingCollectionIndex"
@hide-modal="displayModalEdit(false)" @hide-modal="displayModalEdit(false)"
/> />
<addFolder <add-folder
:show="showModalAddFolder" :show="showModalAddFolder"
:collection="editingCollection" :collection="editingCollection"
:collectionIndex="editingCollectionIndex" :collectionIndex="editingCollectionIndex"
@hide-modal="displayModalAddFolder(false)" @hide-modal="displayModalAddFolder(false)"
/> />
<editFolder <edit-folder
:show="showModalEditFolder" :show="showModalEditFolder"
:collection="editingCollection" :collection="editingCollection"
:collectionIndex="editingCollectionIndex" :collectionIndex="editingCollectionIndex"
@@ -26,7 +26,7 @@ TODO:
:folderIndex="editingFolderIndex" :folderIndex="editingFolderIndex"
@hide-modal="displayModalEditFolder(false)" @hide-modal="displayModalEditFolder(false)"
/> />
<editRequest <edit-request
:show="showModalEditRequest" :show="showModalEditRequest"
:collectionIndex="editingCollectionIndex" :collectionIndex="editingCollectionIndex"
:folderIndex="editingFolderIndex" :folderIndex="editingFolderIndex"
@@ -34,7 +34,7 @@ TODO:
:requestIndex="editingRequestIndex" :requestIndex="editingRequestIndex"
@hide-modal="displayModalEditRequest(false)" @hide-modal="displayModalEditRequest(false)"
/> />
<importExportCollections <import-export-collections
:show="showModalImportExport" :show="showModalImportExport"
@hide-modal="displayModalImportExport(false)" @hide-modal="displayModalImportExport(false)"
/> />
@@ -95,20 +95,9 @@ ul {
</style> </style>
<script> <script>
import collection from "./collection"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
export default { export default {
components: {
collection,
"pw-section": () => import("../layout/section"),
addCollection: () => import("./addCollection"),
addFolder: () => import("./addFolder"),
editCollection: () => import("./editCollection"),
editFolder: () => import("./editFolder"),
editRequest: () => import("./editRequest"),
importExportCollections: () => import("./importExportCollections"),
},
props: { props: {
doc: Boolean, doc: Boolean,
}, },

View File

@@ -23,7 +23,7 @@
</div> </div>
<div> <div>
<button class="icon" @click="removeRequest" v-close-popover> <button class="icon" @click="removeRequest" v-close-popover>
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
<span>{{ $t("delete") }}</span> <span>{{ $t("delete") }}</span>
</button> </button>
</div> </div>
@@ -47,8 +47,10 @@ ul li {
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: { deleteIcon },
props: { props: {
request: Object, request: Object,
collectionIndex: Number, collectionIndex: Number,
@@ -68,7 +70,7 @@ export default {
this.$store.commit("postwoman/selectRequest", { request: this.request }) this.$store.commit("postwoman/selectRequest", { request: this.request })
}, },
removeRequest() { removeRequest() {
if (!confirm( this.$t("are_you_sure_remove_request"))) return if (!confirm(this.$t("are_you_sure_remove_request"))) return
this.$store.commit("postwoman/removeRequest", { this.$store.commit("postwoman/removeRequest", {
collectionIndex: this.collectionIndex, collectionIndex: this.collectionIndex,
folderIndex: this.folderIndex, folderIndex: this.folderIndex,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("save_request_as") }}</h3> <h3 class="title">{{ $t("save_request_as") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -79,15 +79,16 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
editingRequest: Object, editingRequest: Object,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
defaultRequestName: "My Request", defaultRequestName: "My Request",

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("new_environment") }}</h3> <h3 class="title">{{ $t("new_environment") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -44,14 +44,15 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
props: { props: {
show: Boolean, show: Boolean,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("edit_environment") }}</h3> <h3 class="title">{{ $t("edit_environment") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -75,7 +75,7 @@
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
id="variable" id="variable"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</li> </li>
</div> </div>
@@ -107,16 +107,19 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: {
closeIcon,
deleteIcon,
},
props: { props: {
show: Boolean, show: Boolean,
editingEnvironment: Object, editingEnvironment: Object,
editingEnvironmentIndex: Number, editingEnvironmentIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -23,7 +23,7 @@
</div> </div>
<div> <div>
<button class="icon" @click="removeEnvironment" v-close-popover> <button class="icon" @click="removeEnvironment" v-close-popover>
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
<span>{{ $t("delete") }}</span> <span>{{ $t("delete") }}</span>
</button> </button>
</div> </div>
@@ -47,8 +47,10 @@ ul li {
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: { deleteIcon },
props: { props: {
environment: Object, environment: Object,
environmentIndex: Number, environmentIndex: Number,

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3> <h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3>
<div> <div>
<button class="icon" @click="hideModal"> <button class="icon" @click="hideModal">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -77,8 +77,12 @@
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: {
closeIcon,
},
data() { data() {
return { return {
fb, fb,
@@ -87,9 +91,6 @@ export default {
props: { props: {
show: Boolean, show: Boolean,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
computed: { computed: {
environmentJson() { environmentJson() {
return JSON.stringify(this.$store.state.postwoman.environments, null, 2) return JSON.stringify(this.$store.state.postwoman.environments, null, 2)

View File

@@ -1,13 +1,13 @@
<template> <template>
<pw-section class="green" icon="history" :label="$t('environments')" ref="environments"> <pw-section class="green" icon="history" :label="$t('environments')" ref="environments">
<addEnvironment :show="showModalAdd" @hide-modal="displayModalAdd(false)" /> <add-environment :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
<editEnvironment <edit-environment
:show="showModalEdit" :show="showModalEdit"
:editingEnvironment="editingEnvironment" :editingEnvironment="editingEnvironment"
:editingEnvironmentIndex="editingEnvironmentIndex" :editingEnvironmentIndex="editingEnvironmentIndex"
@hide-modal="displayModalEdit(false)" @hide-modal="displayModalEdit(false)"
/> />
<importExportEnvironment <import-export-environment
:show="showModalImportExport" :show="showModalImportExport"
@hide-modal="displayModalImportExport(false)" @hide-modal="displayModalImportExport(false)"
/> />
@@ -54,17 +54,9 @@ ul {
</style> </style>
<script> <script>
import environment from "./environment"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
export default { export default {
components: {
environment,
"pw-section": () => import("../layout/section"),
addEnvironment: () => import("./addEnvironment"),
editEnvironment: () => import("./editEnvironment"),
importExportEnvironment: () => import("./importExportEnvironment"),
},
data() { data() {
return { return {
showModalImportExport: false, showModalImportExport: false,

View File

@@ -8,7 +8,7 @@
</label> </label>
</li> </li>
<button class="icon" @click="deleteFeed(feed)"> <button class="icon" @click="deleteFeed(feed)">
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</div> </div>
<div class="show-on-large-screen"> <div class="show-on-large-screen">
@@ -50,8 +50,10 @@ ol {
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: { deleteIcon },
data() { data() {
return { return {
fb, fb,

View File

@@ -30,7 +30,7 @@
value="Save" value="Save"
@click="formPost" @click="formPost"
> >
<i class="material-icons">add</i> <addIcon class="material-icons" />
<span>Add</span> <span>Add</span>
</button> </button>
</div> </div>
@@ -47,8 +47,10 @@ ol {
<script> <script>
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import addIcon from "~/static/icons/add-24px.svg?inline"
export default { export default {
components: { addIcon },
data() { data() {
return { return {
message: null, message: null,

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<button class="icon" @click="logout" v-close-popover> <button class="icon" @click="logout" v-close-popover>
<i class="material-icons">exit_to_app</i> <exitToAppIcon class="material-icons" />
<span>{{ $t("logout") }}</span> <span>{{ $t("logout") }}</span>
</button> </button>
</div> </div>
@@ -10,8 +10,10 @@
<script> <script>
import firebase from "firebase/app" import firebase from "firebase/app"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import exitToAppIcon from "~/static/icons/exit_to_app-24px.svg?inline"
export default { export default {
components: { exitToAppIcon },
data() { data() {
return { return {
fb, fb,

View File

@@ -11,13 +11,7 @@
<style scoped lang="scss"></style> <style scoped lang="scss"></style>
<script> <script>
import typelink from "./typelink"
export default { export default {
components: {
typelink: typelink,
},
props: { props: {
gqlArg: Object, gqlArg: Object,
}, },

View File

@@ -50,13 +50,7 @@
</style> </style>
<script> <script>
import typelink from "./typelink"
export default { export default {
components: {
typelink: typelink,
},
props: { props: {
gqlField: Object, gqlField: Object,
jumpTypeCallback: Function, jumpTypeCallback: Function,

View File

@@ -8,7 +8,7 @@
<div v-if="gqlType.getFields"> <div v-if="gqlType.getFields">
<h5>{{ $t("fields") }}</h5> <h5>{{ $t("fields") }}</h5>
<div v-for="field in gqlType.getFields()" :key="field.name"> <div v-for="field in gqlType.getFields()" :key="field.name">
<gql-field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" /> <field :gqlField="field" :jumpTypeCallback="jumpTypeCallback" />
</div> </div>
</div> </div>
</div> </div>
@@ -32,10 +32,6 @@
<script> <script>
export default { export default {
components: {
"gql-field": () => import("./field"),
},
props: { props: {
gqlType: {}, gqlType: {},
jumpTypeCallback: Function, jumpTypeCallback: Function,

View File

@@ -70,7 +70,7 @@
:aria-label="$t('delete')" :aria-label="$t('delete')"
v-close-popover v-close-popover
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
<span>{{ $t("delete") }}</span> <span>{{ $t("delete") }}</span>
</button> </button>
</div> </div>
@@ -238,7 +238,7 @@
@click="disableHistoryClearing" @click="disableHistoryClearing"
v-tooltip="$t('no')" v-tooltip="$t('no')"
> >
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -308,13 +308,16 @@ ol {
<script> <script>
import { findStatusGroup } from "~/pages/index" import { findStatusGroup } from "~/pages/index"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
const updateOnLocalStorage = (propertyName, property) => const updateOnLocalStorage = (propertyName, property) =>
window.localStorage.setItem(propertyName, JSON.stringify(property)) window.localStorage.setItem(propertyName, JSON.stringify(property))
export default { export default {
components: { components: {
"pw-section": () => import("../layout/section"), closeIcon,
deleteIcon,
}, },
data() { data() {
return { return {

View File

@@ -3,7 +3,8 @@
<div class="flex-wrap"> <div class="flex-wrap">
<span class="slide-in"> <span class="slide-in">
<nuxt-link :to="localePath('index')"> <nuxt-link :to="localePath('index')">
<h1 class="logo">Hoppscotch</h1> <h1 class="logo hide-on-small-screen">Hoppscotch</h1>
<h1 class="logo show-on-small-screen">Hs</h1>
</nuxt-link> </nuxt-link>
</span> </span>
<span> <span>
@@ -122,7 +123,7 @@
<h3 class="title">{{ $t("extensions") }}</h3> <h3 class="title">{{ $t("extensions") }}</h3>
<div> <div>
<button class="icon" @click="showExtensions = false"> <button class="icon" @click="showExtensions = false">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -182,7 +183,7 @@
<h3 class="title">{{ $t("shortcuts") }}</h3> <h3 class="title">{{ $t("shortcuts") }}</h3>
<div> <div>
<button class="icon" @click="showShortcuts = false"> <button class="icon" @click="showShortcuts = false">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -217,7 +218,7 @@
<h3 class="title">{{ $t("support_us") }}</h3> <h3 class="title">{{ $t("support_us") }}</h3>
<div> <div>
<button class="icon" @click="showSupport = false"> <button class="icon" @click="showSupport = false">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -233,6 +234,8 @@
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
$responsiveWidth: 768px;
@keyframes slideIn { @keyframes slideIn {
0% { 0% {
opacity: 0; opacity: 0;
@@ -257,6 +260,16 @@
color: var(--ac-color); color: var(--ac-color);
} }
} }
.show-on-small-screen {
display: none;
}
@media (max-width: $responsiveWidth) {
.show-on-small-screen {
display: inline-flex;
}
}
</style> </style>
<script> <script>
@@ -269,15 +282,12 @@ import {
import { getPlatformSpecialKey } from "~/helpers/platformutils" import { getPlatformSpecialKey } from "~/helpers/platformutils"
import firebase from "firebase/app" import firebase from "firebase/app"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default { export default {
components: { components: {
modal: () => import("../ui/modal"), closeIcon,
login: () => import("../firebase/login"),
logout: () => import("../firebase/logout"),
contributors: () => import("./contributors"),
}, },
data() { data() {
return { return {
// Once the PWA code is initialized, this holds a method // Once the PWA code is initialized, this holds a method

View File

@@ -64,7 +64,7 @@
<ul> <ul>
<li> <li>
<a href="#request" v-tooltip.right="$t('request')"> <a href="#request" v-tooltip.right="$t('request')">
<i class="material-icons">cloud_upload</i> <cloudUploadIcon class="material-icons" />
</a> </a>
</li> </li>
<li> <li>
@@ -85,7 +85,7 @@
<ul> <ul>
<li> <li>
<a href="#request" v-tooltip.right="$t('request')"> <a href="#request" v-tooltip.right="$t('request')">
<i class="material-icons">cloud_upload</i> <cloudUploadIcon class="material-icons" />
</a> </a>
</li> </li>
<li> <li>
@@ -111,7 +111,7 @@
</li> </li>
<li> <li>
<a href="#query" v-tooltip.right="$t('query')"> <a href="#query" v-tooltip.right="$t('query')">
<i class="material-icons">cloud_upload</i> <cloudUploadIcon class="material-icons" />
</a> </a>
</li> </li>
<li> <li>
@@ -127,7 +127,7 @@
<ul> <ul>
<li> <li>
<a href="#import" v-tooltip.right="$t('import')"> <a href="#import" v-tooltip.right="$t('import')">
<i class="material-icons">folder</i> <folderIcon class="material-icons" />
</a> </a>
</li> </li>
<li> <li>
@@ -306,11 +306,14 @@ nav.secondary-nav {
</style> </style>
<script> <script>
import cloudUploadIcon from "~/static/icons/cloud_upload-24px.svg?inline"
import folderIcon from "~/static/icons/folder-24px.svg?inline"
export default { export default {
components: { components: {
logo: () => import("./logo"), cloudUploadIcon,
folderIcon,
}, },
methods: { methods: {
linkActive(path) { linkActive(path) {
return { return {
@@ -319,14 +322,12 @@ export default {
} }
}, },
}, },
mounted() { mounted() {
window.addEventListener("scroll", (event) => { window.addEventListener("scroll", (event) => {
let mainNavLinks = document.querySelectorAll("nav ul li a") let mainNavLinks = document.querySelectorAll("nav ul li a")
let fromTop = window.scrollY let fromTop = window.scrollY
mainNavLinks.forEach(({ hash, classList }) => { mainNavLinks.forEach(({ hash, classList }) => {
let section = document.querySelector(hash) let section = document.querySelector(hash)
if ( if (
section && section &&
section.offsetTop <= fromTop && section.offsetTop <= fromTop &&
@@ -339,11 +340,10 @@ export default {
}) })
}) })
}, },
// watch: {
watch: { // $route() {
$route() { // // this.$toast.clear();
// this.$toast.clear(); // },
}, // },
},
} }
</script> </script>

View File

@@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<Editor <ace-editor
:value="responseBodyText" :value="responseBodyText"
:lang="'html'" :lang="'html'"
:options="{ :options="{
@@ -74,13 +74,9 @@
</ul> </ul>
</template> </template>
<script> <script>
import AceEditor from "../../ui/ace-editor"
import TextContentRendererMixin from "./mixins/TextContentRendererMixin" import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
export default { export default {
components: {
Editor: AceEditor,
},
mixins: [TextContentRendererMixin], mixins: [TextContentRendererMixin],
props: { props: {
response: {}, response: {},

View File

@@ -41,7 +41,7 @@
<p class="info"><i class="material-icons">error_outline</i> Invalid JSON</p> <p class="info"><i class="material-icons">error_outline</i> Invalid JSON</p>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<Editor <ace-editor
:value="jsonBodyText" :value="jsonBodyText"
:lang="'json'" :lang="'json'"
:options="{ :options="{
@@ -60,14 +60,10 @@
</template> </template>
<script> <script>
import AceEditor from "../../ui/ace-editor"
import { isJSONContentType } from "~/helpers/utils/contenttypes" import { isJSONContentType } from "~/helpers/utils/contenttypes"
import TextContentRendererMixin from "./mixins/TextContentRendererMixin" import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
export default { export default {
components: {
Editor: AceEditor,
},
mixins: [TextContentRendererMixin], mixins: [TextContentRendererMixin],
props: { props: {
response: {}, response: {},

View File

@@ -38,7 +38,7 @@
</div> </div>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<Editor <ace-editor
:value="responseBodyText" :value="responseBodyText"
:lang="'plain_text'" :lang="'plain_text'"
:options="{ :options="{
@@ -56,14 +56,10 @@
</ul> </ul>
</template> </template>
<script> <script>
import AceEditor from "../../ui/ace-editor"
import { isJSONContentType } from "~/helpers/utils/contenttypes" import { isJSONContentType } from "~/helpers/utils/contenttypes"
import TextContentRendererMixin from "./mixins/TextContentRendererMixin" import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
export default { export default {
components: {
Editor: AceEditor,
},
mixins: [TextContentRendererMixin], mixins: [TextContentRendererMixin],
props: { props: {
response: {}, response: {},

View File

@@ -38,7 +38,7 @@
</div> </div>
</div> </div>
<div id="response-details-wrapper"> <div id="response-details-wrapper">
<Editor <ace-editor
:value="responseBodyText" :value="responseBodyText"
:lang="'xml'" :lang="'xml'"
:options="{ :options="{
@@ -56,13 +56,9 @@
</ul> </ul>
</template> </template>
<script> <script>
import AceEditor from "../../ui/ace-editor"
import TextContentRendererMixin from "./mixins/TextContentRendererMixin" import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
export default { export default {
components: {
Editor: AceEditor,
},
mixins: [TextContentRendererMixin], mixins: [TextContentRendererMixin],
props: { props: {
response: {}, response: {},

View File

@@ -26,9 +26,6 @@ import { getSuitableLenses, getLensRenderers } from "~/helpers/lenses/lenses"
export default { export default {
components: { components: {
tabs: () => import("../ui/tabs"),
tab: () => import("../ui/tab"),
headers: () => import("./headers"),
// Lens Renderers // Lens Renderers
...getLensRenderers(), ...getLensRenderers(),
}, },

View File

@@ -23,7 +23,7 @@
<pw-section class="blue" :label="$t('communication')"> <pw-section class="blue" :label="$t('communication')">
<ul> <ul>
<li> <li>
<realtime-log :title="$t('log')" :log="this.log" /> <log :title="$t('log')" :log="this.log" />
</li> </li>
</ul> </ul>
<ul> <ul>
@@ -73,10 +73,6 @@ import Paho from "paho-mqtt"
import { wsValid } from "~/helpers/utils/valid" import { wsValid } from "~/helpers/utils/valid"
export default { export default {
components: {
"pw-section": () => import("~/components/layout/section"),
realtimeLog: () => import("./log"),
},
data: function () { data: function () {
return { return {
url: "wss://test.mosquitto.org:8081", url: "wss://test.mosquitto.org:8081",

View File

@@ -32,7 +32,7 @@
<pw-section class="purple" :label="$t('communication')" id="response" ref="response"> <pw-section class="purple" :label="$t('communication')" id="response" ref="response">
<ul> <ul>
<li> <li>
<realtime-log :title="$t('log')" :log="communication.log" /> <log :title="$t('log')" :log="communication.log" />
</li> </li>
</ul> </ul>
<ul> <ul>
@@ -81,10 +81,6 @@ import io from "socket.io-client"
import wildcard from "socketio-wildcard" import wildcard from "socketio-wildcard"
export default { export default {
components: {
"pw-section": () => import("~/components/layout/section"),
realtimeLog: () => import("./log"),
},
data() { data() {
return { return {
url: "ws://", url: "ws://",

View File

@@ -31,7 +31,7 @@
<pw-section class="purple" :label="$t('communication')" id="response" ref="response"> <pw-section class="purple" :label="$t('communication')" id="response" ref="response">
<ul> <ul>
<li> <li>
<realtime-log :title="$t('events')" :log="events.log" /> <log :title="$t('events')" :log="events.log" />
<div id="result"></div> <div id="result"></div>
</li> </li>
</ul> </ul>
@@ -43,10 +43,6 @@
import { httpValid } from "~/helpers/utils/valid" import { httpValid } from "~/helpers/utils/valid"
export default { export default {
components: {
"pw-section": () => import("../layout/section"),
realtimeLog: () => import("./log"),
},
data() { data() {
return { return {
connectionSSEState: false, connectionSSEState: false,

View File

@@ -32,7 +32,7 @@
<pw-section class="purple" :label="$t('communication')" id="response" ref="response"> <pw-section class="purple" :label="$t('communication')" id="response" ref="response">
<ul> <ul>
<li> <li>
<realtime-log :title="$t('log')" :log="communication.log" /> <log :title="$t('log')" :log="communication.log" />
</li> </li>
</ul> </ul>
<ul> <ul>
@@ -69,10 +69,6 @@
import { wsValid } from "~/helpers/utils/valid" import { wsValid } from "~/helpers/utils/valid"
export default { export default {
components: {
"pw-section": () => import("../layout/section"),
realtimeLog: () => import("./log"),
},
data() { data() {
return { return {
connectionState: false, connectionState: false,

View File

@@ -15,12 +15,6 @@
<script> <script>
export default { export default {
components: {
sidenav: () => import("~/components/layout/sidenav"),
"pw-header": () => import("~/components/layout/header"),
"pw-footer": () => import("~/components/layout/footer"),
},
beforeMount() { beforeMount() {
// Load theme settings // Load theme settings
;(() => { ;(() => {

View File

@@ -20,6 +20,7 @@ export const options = {
} }
export default { export default {
mode: "spa", mode: "spa",
target: "static",
/* /*
** Headers of the page ** Headers of the page
*/ */
@@ -132,6 +133,8 @@ export default {
"@nuxtjs/google-analytics", "@nuxtjs/google-analytics",
// Doc: https://github.com/nuxt-community/gtm-module // Doc: https://github.com/nuxt-community/gtm-module
"@nuxtjs/gtm", "@nuxtjs/gtm",
// Doc: https://github.com/nuxt-community/svg-module
"@nuxtjs/svg",
], ],
/* /*
** Nuxt.js modules ** Nuxt.js modules

42
package-lock.json generated
View File

@@ -13654,6 +13654,29 @@
"unpipe": "1.0.0" "unpipe": "1.0.0"
} }
}, },
"raw-loader": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.1.tgz",
"integrity": "sha512-baolhQBSi3iNh1cglJjA0mYzga+wePk7vdEX//1dTFd+v4TsQlQE0jitJSNF1OIP82rdYulH7otaVmdlDaJ64A==",
"dev": true,
"requires": {
"loader-utils": "^2.0.0",
"schema-utils": "^2.6.5"
},
"dependencies": {
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
},
"rc9": { "rc9": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/rc9/-/rc9-1.0.0.tgz", "resolved": "https://registry.npmjs.org/rc9/-/rc9-1.0.0.tgz",
@@ -15342,6 +15365,15 @@
"resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz",
"integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=" "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q="
}, },
"svg-to-vue": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/svg-to-vue/-/svg-to-vue-0.7.0.tgz",
"integrity": "sha512-Tg2nMmf3BQorYCAjxbtTkYyWPVSeox5AZUFvfy4MoWK/5tuQlnA/h3LAlTjV3sEvOC5FtUNovRSj3p784l4KOA==",
"dev": true,
"requires": {
"svgo": "^1.3.2"
}
},
"svgo": { "svgo": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz",
@@ -16365,6 +16397,16 @@
} }
} }
}, },
"vue-svg-loader": {
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/vue-svg-loader/-/vue-svg-loader-0.16.0.tgz",
"integrity": "sha512-2RtFXlTCYWm8YAEO2qAOZ2SuIF2NvLutB5muc3KDYoZq5ZeCHf8ggzSan3ksbbca7CJ/Aw57ZnDF4B7W/AkGtw==",
"dev": true,
"requires": {
"loader-utils": "^1.2.3",
"svg-to-vue": "^0.7.0"
}
},
"vue-template-compiler": { "vue-template-compiler": {
"version": "2.6.11", "version": "2.6.11",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz", "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz",

View File

@@ -56,6 +56,7 @@
"@vue/test-utils": "^1.0.4", "@vue/test-utils": "^1.0.4",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.3.0", "babel-jest": "^26.3.0",
"@nuxtjs/svg": "^0.1.11",
"eslint": "^7.7.0", "eslint": "^7.7.0",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"husky": "^4.2.5", "husky": "^4.2.5",

View File

@@ -19,7 +19,7 @@
@click="$refs.collectionUpload.click()" @click="$refs.collectionUpload.click()"
v-tooltip="$t('json')" v-tooltip="$t('json')"
> >
<i class="material-icons">folder</i> <folderIcon class="material-icons" />
<span>{{ $t("import_collections") }}</span> <span>{{ $t("import_collections") }}</span>
</button> </button>
</label> </label>
@@ -43,7 +43,7 @@
</ul> </ul>
<ul> <ul>
<li> <li>
<Editor <ace-editor
v-model="collectionJSON" v-model="collectionJSON"
:lang="'json'" :lang="'json'"
:lint="false" :lint="false"
@@ -75,7 +75,7 @@
<div> <div>
<span class="collection" v-for="(collection, index) in this.items" :key="index"> <span class="collection" v-for="(collection, index) in this.items" :key="index">
<h2> <h2>
<i class="material-icons">folder</i> <folderIcon class="material-icons" />
{{ collection.name || $t("none") }} {{ collection.name || $t("none") }}
</h2> </h2>
<span class="folder" v-for="(folder, index) in collection.folders" :key="index"> <span class="folder" v-for="(folder, index) in collection.folders" :key="index">
@@ -326,14 +326,10 @@
</style> </style>
<script> <script>
import AceEditor from "~/components/ui/ace-editor" import folderIcon from "~/static/icons/folder-24px.svg?inline"
export default { export default {
components: { components: { folderIcon },
"pw-section": () => import("~/components/layout/section"),
Editor: AceEditor,
collections: () => import("~/components/collections"),
},
data() { data() {
return { return {
collectionJSON: "[]", collectionJSON: "[]",

View File

@@ -77,7 +77,7 @@
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
id="header" id="header"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</li> </li>
</div> </div>
@@ -126,7 +126,7 @@
</button> </button>
</div> </div>
</div> </div>
<Editor <ace-editor
v-if="schema" v-if="schema"
:value="schema" :value="schema"
:lang="'graphqlschema'" :lang="'graphqlschema'"
@@ -179,7 +179,7 @@
</button> </button>
</div> </div>
</div> </div>
<QueryEditor <queryeditor
ref="queryEditor" ref="queryEditor"
v-model="gqlQueryString" v-model="gqlQueryString"
:onRunGQLQuery="runQuery" :onRunGQLQuery="runQuery"
@@ -195,7 +195,7 @@
</pw-section> </pw-section>
<pw-section class="yellow" label="Variables" ref="variables"> <pw-section class="yellow" label="Variables" ref="variables">
<Editor <ace-editor
v-model="variableString" v-model="variableString"
:lang="'json'" :lang="'json'"
:options="{ :options="{
@@ -233,7 +233,7 @@
</button> </button>
</div> </div>
</div> </div>
<Editor <ace-editor
v-if="response" v-if="response"
:value="response" :value="response"
:lang="'json'" :lang="'json'"
@@ -272,13 +272,13 @@
:selected="true" :selected="true"
> >
<div v-for="field in queryFields" :key="field.name"> <div v-for="field in queryFields" :key="field.name">
<gql-field :gqlField="field" :jumpTypeCallback="handleJumpToType" /> <field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </tab>
<tab v-if="mutationFields.length > 0" :id="'mutations'" :label="$t('mutations')"> <tab v-if="mutationFields.length > 0" :id="'mutations'" :label="$t('mutations')">
<div v-for="field in mutationFields" :key="field.name"> <div v-for="field in mutationFields" :key="field.name">
<gql-field :gqlField="field" :jumpTypeCallback="handleJumpToType" /> <field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </tab>
@@ -288,13 +288,13 @@
:label="$t('subscriptions')" :label="$t('subscriptions')"
> >
<div v-for="field in subscriptionFields" :key="field.name"> <div v-for="field in subscriptionFields" :key="field.name">
<gql-field :gqlField="field" :jumpTypeCallback="handleJumpToType" /> <field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </tab>
<tab v-if="gqlTypes.length > 0" :id="'types'" :label="$t('types')" ref="typesTab"> <tab v-if="gqlTypes.length > 0" :id="'types'" :label="$t('types')" ref="typesTab">
<div v-for="type in gqlTypes" :key="type.name" :id="`type_${type.name}`"> <div v-for="type in gqlTypes" :key="type.name" :id="`type_${type.name}`">
<gql-type :gqlType="type" :jumpTypeCallback="handleJumpToType" /> <type :gqlType="type" :jumpTypeCallback="handleJumpToType" />
</div> </div>
</tab> </tab>
</div> </div>
@@ -332,22 +332,12 @@
import axios from "axios" import axios from "axios"
import * as gql from "graphql" import * as gql from "graphql"
import { commonHeaders } from "~/helpers/headers" import { commonHeaders } from "~/helpers/headers"
import AceEditor from "~/components/ui/ace-editor"
import QueryEditor from "~/components/graphql/queryeditor"
import { getPlatformSpecialKey } from "~/helpers/platformutils" import { getPlatformSpecialKey } from "~/helpers/platformutils"
import { sendNetworkRequest } from "~/helpers/network" import { sendNetworkRequest } from "~/helpers/network"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default { export default {
components: { components: { deleteIcon },
"pw-section": () => import("~/components/layout/section"),
"gql-field": () => import("~/components/graphql/field"),
"gql-type": () => import("~/components/graphql/type"),
autocomplete: () => import("~/components/ui/autocomplete"),
Editor: AceEditor,
QueryEditor: QueryEditor,
tabs: () => import("~/components/ui/tabs"),
tab: () => import("~/components/ui/tab"),
},
data() { data() {
return { return {
commonHeaders, commonHeaders,

View File

@@ -148,7 +148,7 @@
@keyup.enter="isValidURL ? sendRequest() : null" @keyup.enter="isValidURL ? sendRequest() : null"
id="url" id="url"
name="url" name="url"
type="url" type="text"
v-model="uri" v-model="uri"
spellcheck="false" spellcheck="false"
@input="pathInputHandler" @input="pathInputHandler"
@@ -317,7 +317,7 @@
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
id="delParam" id="delParam"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</li> </li>
</div> </div>
@@ -346,7 +346,7 @@
</button> </button>
</div> </div>
</div> </div>
<Editor <ace-editor
v-model="rawParams" v-model="rawParams"
:lang="rawInputEditorLang" :lang="rawInputEditorLang"
:options="{ :options="{
@@ -500,7 +500,7 @@
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
id="param" id="param"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</li> </li>
</div> </div>
@@ -629,7 +629,7 @@
@click="showTokenRequest = false" @click="showTokenRequest = false"
v-tooltip.bottom="$t('close')" v-tooltip.bottom="$t('close')"
> >
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -782,7 +782,7 @@
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
id="header" id="header"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</li> </li>
</div> </div>
@@ -821,7 +821,7 @@
</a> </a>
</div> </div>
</div> </div>
<JSEditor <js-editor
v-model="preRequestScript" v-model="preRequestScript"
:options="{ :options="{
maxLines: '16', maxLines: '16',
@@ -866,7 +866,7 @@
</a> </a>
</div> </div>
</div> </div>
<JSEditor <js-editor
v-model="testScript" v-model="testScript"
:options="{ :options="{
maxLines: '16', maxLines: '16',
@@ -931,7 +931,7 @@
</li> </li>
</ul> </ul>
<div v-if="response.body && response.body !== $t('loading')"> <div v-if="response.body && response.body !== $t('loading')">
<response-renderer :response="response" /> <response-body-renderer :response="response" />
</div> </div>
</pw-section> </pw-section>
</div> </div>
@@ -955,7 +955,7 @@
<pw-section class="pink" :label="$t('notes')" ref="sync"> <pw-section class="pink" :label="$t('notes')" ref="sync">
<div v-if="fb.currentUser"> <div v-if="fb.currentUser">
<inputform /> <inputform />
<notes /> <feeds />
</div> </div>
<div v-else> <div v-else>
<ul> <ul>
@@ -979,7 +979,7 @@
:editing-request="editRequest" :editing-request="editRequest"
/> />
<pw-modal v-if="showModal" @close="showModal = false"> <modal v-if="showModal" @close="showModal = false">
<div slot="header"> <div slot="header">
<ul> <ul>
<li> <li>
@@ -987,7 +987,7 @@
<h3 class="title">{{ $t("import_curl") }}</h3> <h3 class="title">{{ $t("import_curl") }}</h3>
<div> <div>
<button class="icon" @click="showModal = false"> <button class="icon" @click="showModal = false">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -1019,9 +1019,9 @@
</span> </span>
</div> </div>
</div> </div>
</pw-modal> </modal>
<pw-modal v-if="!isHidden" @close="isHidden = true"> <modal v-if="!isHidden" @close="isHidden = true">
<div slot="header"> <div slot="header">
<ul> <ul>
<li> <li>
@@ -1029,7 +1029,7 @@
<h3 class="title">{{ $t("generate_code") }}</h3> <h3 class="title">{{ $t("generate_code") }}</h3>
<div> <div>
<button class="icon" @click="isHidden = true"> <button class="icon" @click="isHidden = true">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -1076,9 +1076,9 @@
</ul> </ul>
</div> </div>
<div slot="footer"></div> <div slot="footer"></div>
</pw-modal> </modal>
<pw-modal v-if="showTokenList" @close="showTokenList = false"> <modal v-if="showTokenList" @close="showTokenList = false">
<div slot="header"> <div slot="header">
<ul> <ul>
<li> <li>
@@ -1086,7 +1086,7 @@
<h3 class="title">{{ $t("manage_token") }}</h3> <h3 class="title">{{ $t("manage_token") }}</h3>
<div> <div>
<button class="icon" @click="showTokenList = false"> <button class="icon" @click="showTokenList = false">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -1142,7 +1142,7 @@
@click="removeOAuthToken(index)" @click="removeOAuthToken(index)"
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</li> </li>
</div> </div>
@@ -1152,9 +1152,9 @@
</p> </p>
</div> </div>
<div slot="footer"></div> <div slot="footer"></div>
</pw-modal> </modal>
<pw-modal v-if="showTokenRequestList" @close="showTokenRequestList = false"> <modal v-if="showTokenRequestList" @close="showTokenRequestList = false">
<div slot="header"> <div slot="header">
<ul> <ul>
<li> <li>
@@ -1162,7 +1162,7 @@
<h3 class="title">{{ $t("manage_token_req") }}</h3> <h3 class="title">{{ $t("manage_token_req") }}</h3>
<div> <div>
<button class="icon" @click="showTokenRequestList = false"> <button class="icon" @click="showTokenRequestList = false">
<i class="material-icons">close</i> <closeIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -1189,7 +1189,7 @@
@click="removeOAuthTokenReq" @click="removeOAuthTokenReq"
v-tooltip.bottom="$t('delete')" v-tooltip.bottom="$t('delete')"
> >
<i class="material-icons">delete</i> <deleteIcon class="material-icons" />
</button> </button>
</div> </div>
</div> </div>
@@ -1237,13 +1237,12 @@
</span> </span>
</div> </div>
</div> </div>
</pw-modal> </modal>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import section from "~/components/layout/section"
import url from "url" import url from "url"
import querystring from "querystring" import querystring from "querystring"
import { commonHeaders } from "~/helpers/headers" import { commonHeaders } from "~/helpers/headers"
@@ -1251,8 +1250,6 @@ import parseCurlCommand from "~/assets/js/curlparser.js"
import getEnvironmentVariablesFromScript from "~/helpers/preRequest" import getEnvironmentVariablesFromScript from "~/helpers/preRequest"
import runTestScriptWithVariables from "~/helpers/postwomanTesting" import runTestScriptWithVariables from "~/helpers/postwomanTesting"
import parseTemplateString from "~/helpers/templating" import parseTemplateString from "~/helpers/templating"
import AceEditor from "~/components/ui/ace-editor"
import JSEditor from "~/components/ui/js-editor"
import { tokenRequest, oauthRedirect } from "~/assets/js/oauth" import { tokenRequest, oauthRedirect } from "~/assets/js/oauth"
import { cancelRunningRequest, sendNetworkRequest } from "~/helpers/network" import { cancelRunningRequest, sendNetworkRequest } from "~/helpers/network"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
@@ -1261,6 +1258,8 @@ import { hasPathParams, addPathParamsToVariables, getQueryParams } from "~/helpe
import { parseUrlAndPath } from "~/helpers/utils/uri.js" import { parseUrlAndPath } from "~/helpers/utils/uri.js"
import { httpValid } from "~/helpers/utils/valid" import { httpValid } from "~/helpers/utils/valid"
import { knownContentTypes, isJSONContentType } from "~/helpers/utils/contenttypes" import { knownContentTypes, isJSONContentType } from "~/helpers/utils/contenttypes"
import closeIcon from "~/static/icons/close-24px.svg?inline"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
const statusCategories = [ const statusCategories = [
{ {
@@ -1311,24 +1310,11 @@ const parseHeaders = (xhr) => {
} }
export const findStatusGroup = (responseStatus) => export const findStatusGroup = (responseStatus) =>
statusCategories.find(({ statusCodeRegex }) => statusCodeRegex.test(responseStatus)) statusCategories.find(({ statusCodeRegex }) => statusCodeRegex.test(responseStatus))
export default { export default {
components: { components: {
"pw-section": section, closeIcon,
"pw-toggle": () => import("~/components/ui/toggle"), deleteIcon,
"pw-modal": () => import("~/components/ui/modal"),
autocomplete: () => import("~/components/ui/autocomplete"),
history: () => import("~/components/layout/history"),
collections: () => import("~/components/collections"),
saveRequestAs: () => import("~/components/collections/saveRequestAs"),
Editor: AceEditor,
JSEditor: JSEditor,
environments: () => import("~/components/environments"),
inputform: () => import("~/components/firebase/inputform"),
notes: () => import("~/components/firebase/feeds"),
login: () => import("~/components/firebase/login"),
tabs: () => import("~/components/ui/tabs"),
tab: () => import("~/components/ui/tab"),
"response-renderer": () => import("~/components/lenses/ResponseBodyRenderer"),
}, },
data() { data() {
return { return {

View File

@@ -24,15 +24,6 @@
<script> <script>
export default { export default {
components: {
"pw-section": () => import("~/components/layout/section"),
tabs: () => import("~/components/ui/tabs"),
tab: () => import("~/components/ui/tab"),
websocket: () => import("~/components/realtime/websocket"),
sse: () => import("~/components/realtime/sse"),
socketio: () => import("~/components/realtime/socketio"),
mqtt: () => import("~/components/realtime/mqtt"),
},
head() { head() {
return { return {
title: `Realtime • ${this.$store.state.name}`, title: `Realtime • ${this.$store.state.name}`,

View File

@@ -220,13 +220,6 @@ import { fb } from "~/helpers/fb"
import { hasExtensionInstalled } from "../helpers/strategies/ExtensionStrategy" import { hasExtensionInstalled } from "../helpers/strategies/ExtensionStrategy"
export default { export default {
components: {
"pw-section": () => import("~/components/layout/section"),
"pw-toggle": () => import("~/components/ui/toggle"),
swatch: () => import("~/components/settings/swatch"),
login: () => import("~/components/firebase/login"),
logout: () => import("~/components/firebase/logout"),
},
data() { data() {
return { return {
// NOTE:: You need to first set the CSS for your theme in /assets/css/themes.scss // NOTE:: You need to first set the CSS for your theme in /assets/css/themes.scss

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>

After

Width:  |  Height:  |  Size: 173 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>

After

Width:  |  Height:  |  Size: 239 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></svg>

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg>

After

Width:  |  Height:  |  Size: 215 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>

After

Width:  |  Height:  |  Size: 302 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB