Auto import components
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<Editor
|
||||
<ace-editor
|
||||
v-model="collectionJSON"
|
||||
:lang="'json'"
|
||||
:lint="false"
|
||||
@@ -326,14 +326,7 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import AceEditor from "~/components/ui/ace-editor"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
"pw-section": () => import("~/components/layout/section"),
|
||||
Editor: AceEditor,
|
||||
collections: () => import("~/components/collections"),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
collectionJSON: "[]",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<Editor
|
||||
<ace-editor
|
||||
v-if="schema"
|
||||
:value="schema"
|
||||
:lang="'graphqlschema'"
|
||||
@@ -179,7 +179,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<QueryEditor
|
||||
<queryeditor
|
||||
ref="queryEditor"
|
||||
v-model="gqlQueryString"
|
||||
:onRunGQLQuery="runQuery"
|
||||
@@ -195,7 +195,7 @@
|
||||
</pw-section>
|
||||
|
||||
<pw-section class="yellow" label="Variables" ref="variables">
|
||||
<Editor
|
||||
<ace-editor
|
||||
v-model="variableString"
|
||||
:lang="'json'"
|
||||
:options="{
|
||||
@@ -233,7 +233,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<Editor
|
||||
<ace-editor
|
||||
v-if="response"
|
||||
:value="response"
|
||||
:lang="'json'"
|
||||
@@ -272,13 +272,13 @@
|
||||
:selected="true"
|
||||
>
|
||||
<div v-for="field in queryFields" :key="field.name">
|
||||
<gql-field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
|
||||
<field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
<tab v-if="mutationFields.length > 0" :id="'mutations'" :label="$t('mutations')">
|
||||
<div v-for="field in mutationFields" :key="field.name">
|
||||
<gql-field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
|
||||
<field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
@@ -288,13 +288,13 @@
|
||||
:label="$t('subscriptions')"
|
||||
>
|
||||
<div v-for="field in subscriptionFields" :key="field.name">
|
||||
<gql-field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
|
||||
<field :gqlField="field" :jumpTypeCallback="handleJumpToType" />
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
<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}`">
|
||||
<gql-type :gqlType="type" :jumpTypeCallback="handleJumpToType" />
|
||||
<type :gqlType="type" :jumpTypeCallback="handleJumpToType" />
|
||||
</div>
|
||||
</tab>
|
||||
</div>
|
||||
@@ -332,22 +332,10 @@
|
||||
import axios from "axios"
|
||||
import * as gql from "graphql"
|
||||
import { commonHeaders } from "~/helpers/headers"
|
||||
import AceEditor from "~/components/ui/ace-editor"
|
||||
import QueryEditor from "~/components/graphql/queryeditor"
|
||||
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
||||
import { sendNetworkRequest } from "~/helpers/network"
|
||||
|
||||
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() {
|
||||
return {
|
||||
commonHeaders,
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<Editor
|
||||
<ace-editor
|
||||
v-model="rawParams"
|
||||
:lang="rawInputEditorLang"
|
||||
:options="{
|
||||
@@ -821,7 +821,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<JSEditor
|
||||
<js-editor
|
||||
v-model="preRequestScript"
|
||||
:options="{
|
||||
maxLines: '16',
|
||||
@@ -866,7 +866,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<JSEditor
|
||||
<js-editor
|
||||
v-model="testScript"
|
||||
:options="{
|
||||
maxLines: '16',
|
||||
@@ -931,7 +931,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="response.body && response.body !== $t('loading')">
|
||||
<response-renderer :response="response" />
|
||||
<response-body-renderer :response="response" />
|
||||
</div>
|
||||
</pw-section>
|
||||
</div>
|
||||
@@ -979,7 +979,7 @@
|
||||
:editing-request="editRequest"
|
||||
/>
|
||||
|
||||
<pw-modal v-if="showModal" @close="showModal = false">
|
||||
<modal v-if="showModal" @close="showModal = false">
|
||||
<div slot="header">
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1019,9 +1019,9 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</pw-modal>
|
||||
</modal>
|
||||
|
||||
<pw-modal v-if="!isHidden" @close="isHidden = true">
|
||||
<modal v-if="!isHidden" @close="isHidden = true">
|
||||
<div slot="header">
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1076,9 +1076,9 @@
|
||||
</ul>
|
||||
</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">
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1152,9 +1152,9 @@
|
||||
</p>
|
||||
</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">
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1237,13 +1237,12 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</pw-modal>
|
||||
</modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import section from "~/components/layout/section"
|
||||
import url from "url"
|
||||
import querystring from "querystring"
|
||||
import { commonHeaders } from "~/helpers/headers"
|
||||
@@ -1251,8 +1250,6 @@ import parseCurlCommand from "~/assets/js/curlparser.js"
|
||||
import getEnvironmentVariablesFromScript from "~/helpers/preRequest"
|
||||
import runTestScriptWithVariables from "~/helpers/postwomanTesting"
|
||||
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 { cancelRunningRequest, sendNetworkRequest } from "~/helpers/network"
|
||||
import { fb } from "~/helpers/fb"
|
||||
@@ -1312,24 +1309,6 @@ const parseHeaders = (xhr) => {
|
||||
export const findStatusGroup = (responseStatus) =>
|
||||
statusCategories.find(({ statusCodeRegex }) => statusCodeRegex.test(responseStatus))
|
||||
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() {
|
||||
return {
|
||||
showModal: false,
|
||||
|
||||
@@ -24,15 +24,6 @@
|
||||
|
||||
<script>
|
||||
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() {
|
||||
return {
|
||||
title: `Realtime • ${this.$store.state.name}`,
|
||||
|
||||
@@ -220,13 +220,6 @@ import { fb } from "~/helpers/fb"
|
||||
import { hasExtensionInstalled } from "../helpers/strategies/ExtensionStrategy"
|
||||
|
||||
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() {
|
||||
return {
|
||||
// NOTE:: You need to first set the CSS for your theme in /assets/css/themes.scss
|
||||
|
||||
Reference in New Issue
Block a user