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",