Auto import components

This commit is contained in:
Liyas Thomas
2020-08-17 18:29:14 +05:30
parent e68ad7331f
commit e86a17980b
40 changed files with 45 additions and 227 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

@@ -49,9 +49,6 @@ export default {
props: { props: {
show: Boolean, show: Boolean,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -51,9 +51,6 @@ export default {
collection: Object, collection: Object,
collectionIndex: Number, collectionIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -100,10 +100,6 @@ ul li {
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
export default { export default {
components: {
folder: () => import("./folder"),
request: () => import("./request"),
},
props: { props: {
collectionIndex: Number, collectionIndex: Number,
collection: Object, collection: Object,
@@ -127,11 +123,11 @@ 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,
}) })
this.$toast.error(this.$t("deleted"), { this.$toast.error(this.$t("deleted"), {
icon: "delete", icon: "delete",
}) })
this.syncCollections() this.syncCollections()

View File

@@ -51,9 +51,6 @@ export default {
editingCollection: Object, editingCollection: Object,
editingCollectionIndex: Number, editingCollectionIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -48,9 +48,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

@@ -79,9 +79,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

@@ -80,9 +80,6 @@ export default {
folderIndex: Number, folderIndex: Number,
doc: Boolean, doc: Boolean,
}, },
components: {
request: () => import("./request"),
},
data() { data() {
return { return {
showChildren: false, showChildren: false,
@@ -103,13 +100,13 @@ 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,
}) })
this.syncCollections() this.syncCollections()
this.$toast.error(this.$t("deleted"), { this.$toast.error(this.$t("deleted"), {
icon: "delete", icon: "delete",
}) })
}, },

View File

@@ -87,9 +87,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

@@ -85,9 +85,6 @@ export default {
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

@@ -49,9 +49,6 @@ export default {
props: { props: {
show: Boolean, show: Boolean,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -114,9 +114,6 @@ export default {
editingEnvironment: Object, editingEnvironment: Object,
editingEnvironmentIndex: Number, editingEnvironmentIndex: Number,
}, },
components: {
modal: () => import("~/components/ui/modal"),
},
data() { data() {
return { return {
name: undefined, name: undefined,

View File

@@ -87,9 +87,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

@@ -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

@@ -313,9 +313,6 @@ const updateOnLocalStorage = (propertyName, property) =>
window.localStorage.setItem(propertyName, JSON.stringify(property)) window.localStorage.setItem(propertyName, JSON.stringify(property))
export default { export default {
components: {
"pw-section": () => import("../layout/section"),
},
data() { data() {
return { return {
history: history:

View File

@@ -271,13 +271,6 @@ import firebase from "firebase/app"
import { fb } from "~/helpers/fb" import { fb } from "~/helpers/fb"
export default { export default {
components: {
modal: () => import("../ui/modal"),
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

@@ -307,10 +307,6 @@ nav.secondary-nav {
<script> <script>
export default { export default {
components: {
logo: () => import("./logo"),
},
methods: { methods: {
linkActive(path) { linkActive(path) {
return { return {

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
*/ */

View File

@@ -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"
@@ -326,14 +326,7 @@
</style> </style>
<script> <script>
import AceEditor from "~/components/ui/ace-editor"
export default { export default {
components: {
"pw-section": () => import("~/components/layout/section"),
Editor: AceEditor,
collections: () => import("~/components/collections"),
},
data() { data() {
return { return {
collectionJSON: "[]", collectionJSON: "[]",

View File

@@ -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,10 @@
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"
export default { export default {
components: {
"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

@@ -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="{
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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"
@@ -1312,24 +1309,6 @@ 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: {
"pw-section": section,
"pw-toggle": () => import("~/components/ui/toggle"),
"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 {
showModal: false, showModal: false,

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