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

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -79,9 +79,6 @@ export default {
request: Object,
requestIndex: Number,
},
components: {
modal: () => import("~/components/ui/modal"),
},
data() {
return {
requestUpdateData: {

View File

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

View File

@@ -87,9 +87,6 @@ export default {
props: {
show: Boolean,
},
components: {
modal: () => import("~/components/ui/modal"),
},
computed: {
collectionJson() {
return JSON.stringify(this.$store.state.postwoman.collections, null, 2)

View File

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

View File

@@ -85,9 +85,6 @@ export default {
show: Boolean,
editingRequest: Object,
},
components: {
modal: () => import("~/components/ui/modal"),
},
data() {
return {
defaultRequestName: "My Request",

View File

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

View File

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

View File

@@ -87,9 +87,6 @@ export default {
props: {
show: Boolean,
},
components: {
modal: () => import("~/components/ui/modal"),
},
computed: {
environmentJson() {
return JSON.stringify(this.$store.state.postwoman.environments, null, 2)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -271,13 +271,6 @@ import firebase from "firebase/app"
import { fb } from "~/helpers/fb"
export default {
components: {
modal: () => import("../ui/modal"),
login: () => import("../firebase/login"),
logout: () => import("../firebase/logout"),
contributors: () => import("./contributors"),
},
data() {
return {
// Once the PWA code is initialized, this holds a method

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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