diff --git a/README.md b/README.md
index a918e9016..a5b00397c 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-

+
@@ -8,7 +8,7 @@
Web alternative to Postman - Helps you create requests faster, saving precious time on development - Subscribe
-
+
[](https://travis-ci.com/liyasthomas/postwoman) [](https://github.com/liyasthomas/postwoman/releases/latest) [](https://postwoman.io) [](CONTRIBUTING.md) [](https://opencollective.com/postwoman) [](https://www.paypal.me/liyascthomas) [](https://t.me/postwoman_app) [](https://discord.gg/GAMWxmR) [](https://twitter.com/intent/tweet?url=https%3A%2F%2Fpostwoman.io&text=%F0%9F%91%BD%20Postwoman%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%2520Postwoman%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%2Fpostwoman.io%26hashtags%3Dpostwoman%26via%3Dliyasthomas&via=liyasthomas&hashtags=postwoman)
@@ -30,11 +30,31 @@
**Donate: [Open Collective](https://opencollective.com/postwoman), [PayPal](https://www.paypal.me/liyascthomas), [Patreon](https://www.patreon.com/liyasthomas), [:octocat: GitHub Sponsors](https://github.com/sponsors/postwoman-io)**
-
-

-
+
+
+ Table of contents
+
+---
+1. [Features](#features-)
+2. [Demo](#demo--)
+3. [Usage](#usage-)
+4. [Built with](#built-with-)
+5. [Developing](#developing-)
+6. [Docker](#docker--)
+7. [Releasing](#releasing-)
+8. [Contributing](#contributing-)
+9. [Continuous Integration](#continuous-integration--)
+10. [Versioning](#versioning--)
+11. [Change log](#change-log-)
+12. [Authors](#authors-)
+13. [License](#license-)
+14. [Acknowledgements](#acknowledgements-)
+15. [Badges](#badges-)
+---
+
+
### Features ✨
❤️ **Lightweight**: Crafted with minimalistic UI design - simple design is the best design.
@@ -324,7 +344,7 @@ docker run -p 3000:3000 liyasthomas/postwoman:latest
docker build -t postwoman:latest
```
-## Releasing 🏷️
+## Releasing 🧞
1. [Clone this repo](https://help.github.com/en/articles/cloning-a-repository) with git.
2. Install dependencies by running `npm install` within the directory that you cloned (probably `postwoman`).
@@ -347,7 +367,7 @@ This project is developed by [Liyas Thomas](https://github.com/liyasthomas) usin
See the [CHANGELOG](CHANGELOG.md) file for details.
-## Authors 🔮
+## Authors 🧙
### Lead Developers
@@ -441,7 +461,7 @@ This project is licensed under the [MIT License](https://opensource.org/licenses
- Inspirations:
- [Dribbble](https://dribbble.com)
-## Badges
+## Badges 📛
diff --git a/components/collections/addFolder.vue b/components/collections/addFolder.vue
index 2f442b580..47b2f05cd 100644
--- a/components/collections/addFolder.vue
+++ b/components/collections/addFolder.vue
@@ -64,6 +64,14 @@ export default {
collectionIndex: this.$props.collectionIndex,
})
this.hideModal()
+ this.syncCollections()
+ },
+ syncCollections() {
+ if (fb.currentUser !== null) {
+ if (fb.currentSettings[0].value) {
+ fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
+ }
+ }
},
hideModal() {
this.$emit("hide-modal")
diff --git a/components/collections/importExportCollections.vue b/components/collections/importExportCollections.vue
index 6c5fd0a50..2c90803db 100644
--- a/components/collections/importExportCollections.vue
+++ b/components/collections/importExportCollections.vue
@@ -122,6 +122,7 @@ export default {
}
this.$store.commit("postwoman/importCollections", collections)
this.fileImported()
+ this.syncToFBCollections()
}
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0])
},
@@ -142,6 +143,7 @@ export default {
}
this.$store.commit("postwoman/importCollections", collections)
this.fileImported()
+ this.syncToFBCollections()
}
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0])
},
@@ -167,6 +169,13 @@ export default {
this.$store.commit("postwoman/replaceCollections", fb.currentCollections)
this.fileImported()
},
+ syncToFBCollections() {
+ if (fb.currentUser !== null) {
+ if (fb.currentSettings[0].value) {
+ fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
+ }
+ }
+ },
fileImported() {
this.$toast.info(this.$t("file_imported"), {
icon: "folder_shared",
diff --git a/components/environments/addEnvironment.vue b/components/environments/addEnvironment.vue
index 6d15499e6..8d3e53951 100644
--- a/components/environments/addEnvironment.vue
+++ b/components/environments/addEnvironment.vue
@@ -84,8 +84,8 @@ export default {
this.syncEnvironments()
},
hideModal() {
- this.$data.name = undefined
this.$emit("hide-modal")
+ this.$data.name = undefined
},
},
}
diff --git a/components/environments/editEnvironment.vue b/components/environments/editEnvironment.vue
index a05eedd6e..03aee2a75 100644
--- a/components/environments/editEnvironment.vue
+++ b/components/environments/editEnvironment.vue
@@ -135,7 +135,7 @@ export default {
}
},
watch: {
- editingEnvironment: function(update) {
+ editingEnvironment: function (update) {
this.name =
this.$props.editingEnvironment && this.$props.editingEnvironment.name
? this.$props.editingEnvironment.name
@@ -210,8 +210,8 @@ export default {
this.syncEnvironments()
},
hideModal() {
- this.$data.name = undefined
this.$emit("hide-modal")
+ this.$data.name = undefined
},
},
}
diff --git a/components/environments/importExportEnvironment.vue b/components/environments/importExportEnvironment.vue
index f2c240b03..6568cadba 100644
--- a/components/environments/importExportEnvironment.vue
+++ b/components/environments/importExportEnvironment.vue
@@ -168,10 +168,18 @@ export default {
this.$store.commit("postwoman/replaceEnvironments", fb.currentEnvironments)
this.fileImported()
},
+ syncToFBEnvironments() {
+ if (fb.currentUser !== null) {
+ if (fb.currentSettings[1].value) {
+ fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
+ }
+ }
+ },
fileImported() {
this.$toast.info(this.$t("file_imported"), {
icon: "folder_shared",
})
+ this.syncToFBEnvironments()
},
},
}
diff --git a/static/images/screenshot1.png b/static/images/screenshot1.png
index 05705a4cf..59e84ab42 100644
Binary files a/static/images/screenshot1.png and b/static/images/screenshot1.png differ
diff --git a/store/postwoman.js b/store/postwoman.js
index dc38e8dda..c936a5fc3 100644
--- a/store/postwoman.js
+++ b/store/postwoman.js
@@ -138,9 +138,11 @@ export const mutations = {
},
importAddEnvironments(state, { environments, confirmation }) {
- const duplicateEnvironment = environments.some(({ name }) =>
- state.environments.some(({ name }) => name.toLowerCase() === name.toLowerCase())
- )
+ const duplicateEnvironment = environments.some((item) => {
+ return state.environments.some((item2) => {
+ return item.name.toLowerCase() === item2.name.toLowerCase()
+ })
+ })
if (duplicateEnvironment) {
this.$toast.info("Duplicate environment")
return