Merge branch 'master' into feature/post-request-tests
This commit is contained in:
38
.travis.yml
38
.travis.yml
@@ -13,38 +13,40 @@
|
|||||||
|
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "12"
|
- "12"
|
||||||
|
|
||||||
|
os: linux
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- libgconf-2-4 # cypress binary dependency
|
- libgconf-2-4 # cypress binary dependency
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- DEPLOY_ENV=POSTWOMAN_IO
|
- DEPLOY_ENV=POSTWOMAN_IO
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
npm: true
|
npm: true
|
||||||
directories:
|
directories:
|
||||||
- "node_modules"
|
- "node_modules"
|
||||||
- ~/.cache
|
- ~/.cache
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- "master"
|
- "master"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- "npm install firebase-tools"
|
- "npm install firebase-tools"
|
||||||
- "npm install"
|
- "npm install"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- "npm run test"
|
- "npm run test"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- "cd functions"
|
- "cd functions"
|
||||||
- "npm install"
|
- "npm install"
|
||||||
- "cd .."
|
- "cd .."
|
||||||
- "npm run generate"
|
- "npm run generate"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks: https://www.travisbuddy.com
|
webhooks: https://www.travisbuddy.com
|
||||||
|
|||||||
35
README.md
35
README.md
@@ -3,10 +3,10 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<p>
|
<p>
|
||||||
API request builder - A free, fast, and beautiful alternative to Postman
|
<b>A free, fast & beautiful API request builder</b>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Helps you create your requests faster, saving you precious time on your development - <a href="https://postwoman.launchaco.com">Subscribe</a>
|
<i>Web alternative to Postman - Helps you create requests faster, saving precious time on development - <a href="https://postwoman.launchaco.com">Subscribe</a></i>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
@@ -190,30 +190,13 @@ _Requests with Pre-Request Scripts are indicated in History entries_
|
|||||||
🌎 **i18n β**: Experience the app in your own language.
|
🌎 **i18n β**: Experience the app in your own language.
|
||||||
|
|
||||||
1. Scroll down to the footer
|
1. Scroll down to the footer
|
||||||
2. Click "Choose Language" button
|
2. Click "Choose Language" icon button
|
||||||
3. Select your language from the menu
|
3. Select your language from the menu
|
||||||
|
|
||||||
_Keep in mind translations aren't available for all source and target language combinations_
|
_Keep in mind: Translations aren't available for all source and target language combinations_
|
||||||
|
|
||||||
**To provide a localized experience for users around the world, you can add you own translations.**
|
**To provide a localized experience for users around the world, you can add you own translations.**
|
||||||
|
|
||||||
- Add a new locale in `lang/`
|
|
||||||
|
|
||||||
Example: `lang/es-ES.js`
|
|
||||||
- Mention `code`, `name`, `iso` and `file` in `nuxt.config.js`
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```
|
|
||||||
i18n: {
|
|
||||||
locales: [{
|
|
||||||
code: 'es',
|
|
||||||
name: 'Español',
|
|
||||||
iso: 'es-ES',
|
|
||||||
file: 'es-ES.js'
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
_**All `i18n` contributions are welcome to `i18n` [branch](https://github.com/liyasthomas/postwoman/tree/i18n) only!**_
|
_**All `i18n` contributions are welcome to `i18n` [branch](https://github.com/liyasthomas/postwoman/tree/i18n) only!**_
|
||||||
|
|
||||||
📦 **Add-ons**: Official add-ons for Postwoman.
|
📦 **Add-ons**: Official add-ons for Postwoman.
|
||||||
@@ -228,6 +211,16 @@ _**All `i18n` contributions are welcome to `i18n` [branch](https://github.com/li
|
|||||||
|
|
||||||
_Add-ons are developed and maintained under **[Official Postwoman Organization](https://github.com/postwoman-io)**._
|
_Add-ons are developed and maintained under **[Official Postwoman Organization](https://github.com/postwoman-io)**._
|
||||||
|
|
||||||
|
☁️ **Auth + Sync**: Sign in and sync in real-time.
|
||||||
|
|
||||||
|
**Sign in with:**
|
||||||
|
- Google
|
||||||
|
- GitHub
|
||||||
|
|
||||||
|
**Sync:**
|
||||||
|
- History
|
||||||
|
- Collections
|
||||||
|
|
||||||
**To find out more, please check out [Postwoman Wiki](https://github.com/liyasthomas/postwoman/wiki).**
|
**To find out more, please check out [Postwoman Wiki](https://github.com/liyasthomas/postwoman/wiki).**
|
||||||
|
|
||||||
## Demo 🚀 [](https://postwoman.io)
|
## Demo 🚀 [](https://postwoman.io)
|
||||||
|
|||||||
@@ -592,7 +592,6 @@ pre {
|
|||||||
|
|
||||||
select {
|
select {
|
||||||
height: 37px;
|
height: 37px;
|
||||||
background-color: var(--bg-dark-color);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
|
|||||||
2
build.js
2
build.js
@@ -53,7 +53,7 @@ try {
|
|||||||
|
|
||||||
// Write version data into a file
|
// Write version data into a file
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
PW_BUILD_DATA_DIR + "/version.json",
|
`${PW_BUILD_DATA_DIR}/version.json`,
|
||||||
JSON.stringify(version)
|
JSON.stringify(version)
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
addNewCollection() {
|
addNewCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info('Please provide a valid name for the collection')
|
this.$toast.info("Please provide a valid name for the collection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$store.commit("postwoman/addNewCollection", {
|
this.$store.commit("postwoman/addNewCollection", {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
saveCollection() {
|
saveCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info('Please provide a valid name for the collection');
|
this.$toast.info("Please provide a valid name for the collection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const collectionUpdated = {
|
const collectionUpdated = {
|
||||||
|
|||||||
@@ -11,6 +11,54 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<span
|
||||||
|
v-tooltip="{
|
||||||
|
content: !fb.currentUser
|
||||||
|
? $t('login_first')
|
||||||
|
: $t('replace_current')
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
:disabled="!fb.currentUser"
|
||||||
|
class="icon"
|
||||||
|
@click="syncCollections"
|
||||||
|
>
|
||||||
|
<i class="material-icons">folder_shared</i>
|
||||||
|
<span>{{ $t("import_from_sync") }}</span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToReplaceWith"
|
||||||
|
v-tooltip="$t('replace_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">create_new_folder</i>
|
||||||
|
<span>{{ $t("replace_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="replaceWithJSON"
|
||||||
|
style="display: none;"
|
||||||
|
ref="inputChooseFileToReplaceWith"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="icon"
|
||||||
|
@click="openDialogChooseFileToImportFrom"
|
||||||
|
v-tooltip="$t('preserve_current')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">folder_special</i>
|
||||||
|
<span>{{ $t("import_json") }}</span>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
@change="importFromJSON"
|
||||||
|
style="display: none;"
|
||||||
|
ref="inputChooseFileToImportFrom"
|
||||||
|
accept="application/json"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -18,39 +66,6 @@
|
|||||||
<textarea v-model="collectionJson" rows="8"></textarea>
|
<textarea v-model="collectionJson" rows="8"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<div class="flex-wrap">
|
|
||||||
<span>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="openDialogChooseFileToReplaceWith"
|
|
||||||
v-tooltip="$t('replace_current')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">create_new_folder</i>
|
|
||||||
<span>{{ $t("replace_json") }}</span>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
@change="replaceWithJSON"
|
|
||||||
style="display: none;"
|
|
||||||
ref="inputChooseFileToReplaceWith"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="icon"
|
|
||||||
@click="openDialogChooseFileToImportFrom"
|
|
||||||
v-tooltip="$t('preserve_current')"
|
|
||||||
>
|
|
||||||
<i class="material-icons">folder_shared</i>
|
|
||||||
<span>{{ $t("import_json") }}</span>
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
@change="importFromJSON"
|
|
||||||
style="display: none;"
|
|
||||||
ref="inputChooseFileToImportFrom"
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
<span></span>
|
|
||||||
</div>
|
|
||||||
<div class="flex-wrap">
|
<div class="flex-wrap">
|
||||||
<span></span>
|
<span></span>
|
||||||
<span>
|
<span>
|
||||||
@@ -71,7 +86,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fb
|
||||||
|
};
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
show: Boolean
|
show: Boolean
|
||||||
},
|
},
|
||||||
@@ -101,6 +123,7 @@ export default {
|
|||||||
this.$store.commit("postwoman/replaceCollections", collections);
|
this.$store.commit("postwoman/replaceCollections", collections);
|
||||||
};
|
};
|
||||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]);
|
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]);
|
||||||
|
this.fileImported();
|
||||||
},
|
},
|
||||||
importFromJSON() {
|
importFromJSON() {
|
||||||
let reader = new FileReader();
|
let reader = new FileReader();
|
||||||
@@ -110,6 +133,7 @@ export default {
|
|||||||
this.$store.commit("postwoman/importCollections", collections);
|
this.$store.commit("postwoman/importCollections", collections);
|
||||||
};
|
};
|
||||||
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]);
|
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]);
|
||||||
|
this.fileImported();
|
||||||
},
|
},
|
||||||
exportJSON() {
|
exportJSON() {
|
||||||
let text = this.collectionJson;
|
let text = this.collectionJson;
|
||||||
@@ -125,6 +149,18 @@ export default {
|
|||||||
document.body.appendChild(anchor);
|
document.body.appendChild(anchor);
|
||||||
anchor.click();
|
anchor.click();
|
||||||
document.body.removeChild(anchor);
|
document.body.removeChild(anchor);
|
||||||
|
this.$toast.success(this.$t("download_started"), {
|
||||||
|
icon: "done"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
syncCollections() {
|
||||||
|
this.$store.commit("postwoman/replaceCollections", fb.currentCollections);
|
||||||
|
this.fileImported();
|
||||||
|
},
|
||||||
|
fileImported() {
|
||||||
|
this.$toast.info(this.$t("file_imported"), {
|
||||||
|
icon: "folder_shared"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ ul {
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import collection from "./collection";
|
import collection from "./collection";
|
||||||
|
import { fb } from "../../functions/fb";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -172,11 +173,13 @@ export default {
|
|||||||
this.$data.editingCollection = collection;
|
this.$data.editingCollection = collection;
|
||||||
this.$data.editingCollectionIndex = collectionIndex;
|
this.$data.editingCollectionIndex = collectionIndex;
|
||||||
this.displayModalEdit(true);
|
this.displayModalEdit(true);
|
||||||
|
this.syncCollections();
|
||||||
},
|
},
|
||||||
addFolder(collection, collectionIndex) {
|
addFolder(collection, collectionIndex) {
|
||||||
this.$data.editingCollection = collection;
|
this.$data.editingCollection = collection;
|
||||||
this.$data.editingCollectionIndex = collectionIndex;
|
this.$data.editingCollectionIndex = collectionIndex;
|
||||||
this.displayModalAddFolder(true);
|
this.displayModalAddFolder(true);
|
||||||
|
this.syncCollections();
|
||||||
},
|
},
|
||||||
editFolder(payload) {
|
editFolder(payload) {
|
||||||
const { collectionIndex, folder, folderIndex } = payload;
|
const { collectionIndex, folder, folderIndex } = payload;
|
||||||
@@ -185,6 +188,7 @@ export default {
|
|||||||
this.$data.editingFolder = folder;
|
this.$data.editingFolder = folder;
|
||||||
this.$data.editingFolderIndex = folderIndex;
|
this.$data.editingFolderIndex = folderIndex;
|
||||||
this.displayModalEditFolder(true);
|
this.displayModalEditFolder(true);
|
||||||
|
this.syncCollections();
|
||||||
},
|
},
|
||||||
editRequest(payload) {
|
editRequest(payload) {
|
||||||
const { request, collectionIndex, folderIndex, requestIndex } = payload;
|
const { request, collectionIndex, folderIndex, requestIndex } = payload;
|
||||||
@@ -193,6 +197,7 @@ export default {
|
|||||||
this.$data.editingRequest = request;
|
this.$data.editingRequest = request;
|
||||||
this.$data.editingRequestIndex = requestIndex;
|
this.$data.editingRequestIndex = requestIndex;
|
||||||
this.displayModalEditRequest(true);
|
this.displayModalEditRequest(true);
|
||||||
|
this.syncCollections();
|
||||||
},
|
},
|
||||||
resetSelectedData() {
|
resetSelectedData() {
|
||||||
this.$data.editingCollection = undefined;
|
this.$data.editingCollection = undefined;
|
||||||
@@ -201,6 +206,15 @@ export default {
|
|||||||
this.$data.editingFolderIndex = undefined;
|
this.$data.editingFolderIndex = undefined;
|
||||||
this.$data.editingRequest = undefined;
|
this.$data.editingRequest = undefined;
|
||||||
this.$data.editingRequestIndex = undefined;
|
this.$data.editingRequestIndex = undefined;
|
||||||
|
},
|
||||||
|
syncCollections() {
|
||||||
|
if (fb.currentUser !== null) {
|
||||||
|
if (fb.currentSettings[0].value) {
|
||||||
|
fb.writeCollections(
|
||||||
|
JSON.parse(JSON.stringify(this.$store.state.postwoman.collections))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -101,16 +101,15 @@ export default {
|
|||||||
|
|
||||||
if (this.validationSchema) {
|
if (this.validationSchema) {
|
||||||
this.editor.session.setAnnotations(
|
this.editor.session.setAnnotations(
|
||||||
gql.validate(this.validationSchema, doc)
|
gql.validate(this.validationSchema, doc).map(err => {
|
||||||
.map((err) => {
|
return {
|
||||||
return {
|
row: err.locations[0].line - 1,
|
||||||
row: err.locations[0].line - 1,
|
column: err.locations[0].column - 1,
|
||||||
column: err.locations[0].column - 1,
|
text: err.message,
|
||||||
text: err.message,
|
type: "error"
|
||||||
type: "error"
|
};
|
||||||
}
|
})
|
||||||
})
|
);
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.editor.session.setAnnotations([
|
this.editor.session.setAnnotations([
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export const fb = {
|
|||||||
currentFeeds: [],
|
currentFeeds: [],
|
||||||
currentSettings: [],
|
currentSettings: [],
|
||||||
currentHistory: [],
|
currentHistory: [],
|
||||||
|
currentCollections: [],
|
||||||
writeFeeds: async (message, label) => {
|
writeFeeds: async (message, label) => {
|
||||||
const dt = {
|
const dt = {
|
||||||
createdOn: new Date(),
|
createdOn: new Date(),
|
||||||
@@ -34,14 +35,11 @@ export const fb = {
|
|||||||
message,
|
message,
|
||||||
label
|
label
|
||||||
};
|
};
|
||||||
try {
|
usersCollection
|
||||||
return usersCollection
|
.doc(fb.currentUser.uid)
|
||||||
.doc(fb.currentUser.uid)
|
.collection("feeds")
|
||||||
.collection("feeds")
|
.add(dt)
|
||||||
.add(dt);
|
.catch(e => console.error("error inserting", dt, e));
|
||||||
} catch (e) {
|
|
||||||
return console.error("error inserting", dt, e);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deleteFeed: id => {
|
deleteFeed: id => {
|
||||||
usersCollection
|
usersCollection
|
||||||
@@ -60,26 +58,20 @@ export const fb = {
|
|||||||
name: setting,
|
name: setting,
|
||||||
value
|
value
|
||||||
};
|
};
|
||||||
try {
|
usersCollection
|
||||||
return usersCollection
|
.doc(fb.currentUser.uid)
|
||||||
.doc(fb.currentUser.uid)
|
.collection("settings")
|
||||||
.collection("settings")
|
.doc(setting)
|
||||||
.doc(setting)
|
.set(st)
|
||||||
.set(st);
|
.catch(e => console.error("error updating", st, e));
|
||||||
} catch (e) {
|
|
||||||
return console.error("error updating", st, e);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
writeHistory: async entry => {
|
writeHistory: async entry => {
|
||||||
const hs = entry;
|
const hs = entry;
|
||||||
try {
|
usersCollection
|
||||||
return usersCollection
|
.doc(fb.currentUser.uid)
|
||||||
.doc(fb.currentUser.uid)
|
.collection("history")
|
||||||
.collection("history")
|
.add(hs)
|
||||||
.add(hs);
|
.catch(e => console.error("error inserting", hs, e));
|
||||||
} catch (e) {
|
|
||||||
return console.error("error inserting", hs, e);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
deleteHistory: entry => {
|
deleteHistory: entry => {
|
||||||
usersCollection
|
usersCollection
|
||||||
@@ -105,6 +97,21 @@ export const fb = {
|
|||||||
.doc(entry.id)
|
.doc(entry.id)
|
||||||
.update({ star: value })
|
.update({ star: value })
|
||||||
.catch(e => console.error("error deleting", entry, e));
|
.catch(e => console.error("error deleting", entry, e));
|
||||||
|
},
|
||||||
|
writeCollections: async collection => {
|
||||||
|
const cl = {
|
||||||
|
updatedOn: new Date(),
|
||||||
|
author: fb.currentUser.uid,
|
||||||
|
author_name: fb.currentUser.displayName,
|
||||||
|
author_image: fb.currentUser.photoURL,
|
||||||
|
collection: collection
|
||||||
|
};
|
||||||
|
usersCollection
|
||||||
|
.doc(fb.currentUser.uid)
|
||||||
|
.collection("collections")
|
||||||
|
.doc("sync")
|
||||||
|
.set(cl)
|
||||||
|
.catch(e => console.error("error updating", cl, e));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -121,11 +128,10 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
photoUrl: profile.photoURL,
|
photoUrl: profile.photoURL,
|
||||||
uid: profile.uid
|
uid: profile.uid
|
||||||
};
|
};
|
||||||
try {
|
usersCollection
|
||||||
usersCollection.doc(fb.currentUser.uid).set(us);
|
.doc(fb.currentUser.uid)
|
||||||
} catch (e) {
|
.set(us)
|
||||||
console.error("error updating", us, e);
|
.catch(e => console.error("error updating", us, e));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
usersCollection
|
usersCollection
|
||||||
@@ -167,6 +173,19 @@ firebase.auth().onAuthStateChanged(user => {
|
|||||||
});
|
});
|
||||||
fb.currentHistory = history;
|
fb.currentHistory = history;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
usersCollection
|
||||||
|
.doc(fb.currentUser.uid)
|
||||||
|
.collection("collections")
|
||||||
|
.onSnapshot(collectionsRef => {
|
||||||
|
const collections = [];
|
||||||
|
collectionsRef.forEach(doc => {
|
||||||
|
const collection = doc.data();
|
||||||
|
collection.id = doc.id;
|
||||||
|
collections.push(collection);
|
||||||
|
});
|
||||||
|
fb.currentCollections = collections[0].collection;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
fb.currentUser = null;
|
fb.currentUser = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
// functions which might be called frequently
|
// functions which might be called frequently
|
||||||
// NOTE : Don't use lambda functions as this doesn't get bound properly in them, use the 'function (args) {}' format
|
// NOTE : Don't use lambda functions as this doesn't get bound properly in them, use the 'function (args) {}' format
|
||||||
const debounce = (func, delay) => {
|
const debounce = (func, delay) => {
|
||||||
let inDebounce
|
let inDebounce;
|
||||||
return function() {
|
return function() {
|
||||||
const context = this
|
const context = this;
|
||||||
const args = arguments
|
const args = arguments;
|
||||||
clearTimeout(inDebounce)
|
clearTimeout(inDebounce);
|
||||||
inDebounce = setTimeout(() => func.apply(context, args), delay)
|
inDebounce = setTimeout(() => func.apply(context, args), delay);
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
export default debounce;
|
export default debounce;
|
||||||
|
|||||||
@@ -259,5 +259,6 @@ export default {
|
|||||||
syncCollections: "Collections",
|
syncCollections: "Collections",
|
||||||
turn_on: "Turn on",
|
turn_on: "Turn on",
|
||||||
login_first: "Login first",
|
login_first: "Login first",
|
||||||
paste_a_collection: "Paste a Collection"
|
paste_a_collection: "Paste a Collection",
|
||||||
|
import_from_sync: "Import from Sync"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -664,9 +664,8 @@
|
|||||||
import intializePwa from "../assets/js/pwa";
|
import intializePwa from "../assets/js/pwa";
|
||||||
import * as version from "../.postwoman/version.json";
|
import * as version from "../.postwoman/version.json";
|
||||||
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy";
|
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy";
|
||||||
|
import firebase from "firebase/app";
|
||||||
import firebase from 'firebase/app';
|
import { fb } from "../functions/fb";
|
||||||
import { fb } from '../functions/fb';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
44
package-lock.json
generated
44
package-lock.json
generated
@@ -1203,12 +1203,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@kazupon/vue-i18n-loader": {
|
"@kazupon/vue-i18n-loader": {
|
||||||
"version": "0.4.1",
|
"version": "0.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.5.0.tgz",
|
||||||
"integrity": "sha512-hVznmhnyoUKozGY7pwq/UtPL76UDzb+aiN2YksZZIzCY/MkEqih0MSyEmTGw7+HVWzJRPAlDyoRNR4tWKmkCRw==",
|
"integrity": "sha512-Tp2mXKemf9/RBhI9CW14JjR9oKjL2KH7tV6S0eKEjIBuQBAOFNuPJu3ouacmz9hgoXbNp+nusw3MVQmxZWFR9g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"js-yaml": "^3.13.1",
|
"js-yaml": "^3.13.1",
|
||||||
"json5": "^2.1.0"
|
"json5": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@nuxt/babel-preset-app": {
|
"@nuxt/babel-preset-app": {
|
||||||
@@ -4068,9 +4068,9 @@
|
|||||||
"integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk="
|
"integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk="
|
||||||
},
|
},
|
||||||
"cypress": {
|
"cypress": {
|
||||||
"version": "3.8.2",
|
"version": "3.8.3",
|
||||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.8.3.tgz",
|
||||||
"integrity": "sha512-aTs0u3+dfEuLe0Ct0FVO5jD1ULqxbuqWUZwzBm0rxdLgLxIAOI/A9f/WkgY5Cfy1TEXe8pKC6Wal0ZpnkdGRSw==",
|
"integrity": "sha512-I9L/d+ilTPPA4vq3NC1OPKmw7jJIpMKNdyfR8t1EXYzYCjyqbc59migOm1YSse/VRbISLJ+QGb5k4Y3bz2lkYw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@cypress/listr-verbose-renderer": "0.4.1",
|
"@cypress/listr-verbose-renderer": "0.4.1",
|
||||||
@@ -8098,13 +8098,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nuxt-i18n": {
|
"nuxt-i18n": {
|
||||||
"version": "6.4.1",
|
"version": "6.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.5.0.tgz",
|
||||||
"integrity": "sha512-SHAK5eA9oci8AtqOCDvPgWKp+W7SIBbbxW5xraPO0YTdyJWuA1gmUuo24w7MSms4d/cUcWoJaNiEYZHqxidUTA==",
|
"integrity": "sha512-JNg5rJl/8/b5ruX1ZXPHGk2hXFFefaSgUgg19vaNPMpSWt4UqP2X47ShSv6UdRvUw8TZvcDjDBieZsyfsx+GEg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/parser": "^7.5.5",
|
"@babel/parser": "^7.5.5",
|
||||||
"@babel/traverse": "^7.5.5",
|
"@babel/traverse": "^7.5.5",
|
||||||
"@kazupon/vue-i18n-loader": "^0.4.0",
|
"@kazupon/vue-i18n-loader": "^0.5.0",
|
||||||
"cookie": "^0.4.0",
|
"cookie": "^0.4.0",
|
||||||
"is-https": "^1.0.0",
|
"is-https": "^1.0.0",
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^2.2.1",
|
||||||
@@ -8592,9 +8592,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"popper.js": {
|
"popper.js": {
|
||||||
"version": "1.16.0",
|
"version": "1.16.1",
|
||||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
|
||||||
"integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw=="
|
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
|
||||||
},
|
},
|
||||||
"posix-character-classes": {
|
"posix-character-classes": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
@@ -11848,12 +11848,12 @@
|
|||||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||||
},
|
},
|
||||||
"v-tooltip": {
|
"v-tooltip": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.3.tgz",
|
||||||
"integrity": "sha512-xQ+qzOFfywkLdjHknRPgMMupQNS8yJtf9Utd5Dxiu/0n4HtrxqsgDtN2MLZ0LKbburtSAQgyypuE/snM8bBZhw==",
|
"integrity": "sha512-KZZY3s+dcijzZmV2qoDH4rYmjMZ9YKGBVoUznZKQX0e3c2GjpJm3Sldzz8HHH2Ud87JqhZPB4+4gyKZ6m98cKQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.15",
|
||||||
"popper.js": "^1.15.0",
|
"popper.js": "^1.16.0",
|
||||||
"vue-resize": "^0.4.5"
|
"vue-resize": "^0.4.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -11914,9 +11914,9 @@
|
|||||||
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog=="
|
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog=="
|
||||||
},
|
},
|
||||||
"vue-i18n": {
|
"vue-i18n": {
|
||||||
"version": "8.15.1",
|
"version": "8.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.15.1.tgz",
|
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.15.3.tgz",
|
||||||
"integrity": "sha512-GBbz8qYCu0U2LNu4IcuFLZiuyninG4k26knvhL7GZG5Ncp4RR2VKDEH6g8gQ6I+UUBCvH2MBQVPSdxWe4DBkPw=="
|
"integrity": "sha512-PVNgo6yhOmacZVFjSapZ314oewwLyXHjJwAqjnaPN1GJAJd/dvsrShGzSiJuCX4Hc36G4epJvNXUwO8y7wEKew=="
|
||||||
},
|
},
|
||||||
"vue-i18n-extensions": {
|
"vue-i18n-extensions": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
"firebase": "^7.7.0",
|
"firebase": "^7.7.0",
|
||||||
"graphql": "^14.5.8",
|
"graphql": "^14.5.8",
|
||||||
"nuxt": "^2.11.0",
|
"nuxt": "^2.11.0",
|
||||||
"nuxt-i18n": "^6.4.1",
|
"nuxt-i18n": "^6.5.0",
|
||||||
"v-tooltip": "^2.0.2",
|
"v-tooltip": "^2.0.3",
|
||||||
"vue-virtual-scroll-list": "^1.4.4",
|
"vue-virtual-scroll-list": "^1.4.4",
|
||||||
"vuefire": "^2.2.1",
|
"vuefire": "^2.2.1",
|
||||||
"vuejs-auto-complete": "^0.9.0",
|
"vuejs-auto-complete": "^0.9.0",
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
"yargs-parser": "^16.1.0"
|
"yargs-parser": "^16.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cypress": "^3.8.2",
|
"cypress": "^3.8.3",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
"sass-loader": "^8.0.2",
|
"sass-loader": "^8.0.2",
|
||||||
"start-server-and-test": "^1.10.6"
|
"start-server-and-test": "^1.10.6"
|
||||||
|
|||||||
@@ -812,9 +812,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.gqlTypes = types;
|
this.gqlTypes = types;
|
||||||
|
|
||||||
this.$refs.queryEditor.setValidationSchema(schema);
|
this.$refs.queryEditor.setValidationSchema(schema);
|
||||||
|
|
||||||
this.$nuxt.$loading.finish();
|
this.$nuxt.$loading.finish();
|
||||||
const duration = Date.now() - startTime;
|
const duration = Date.now() - startTime;
|
||||||
this.$toast.info(this.$t("finished_in", { duration }), {
|
this.$toast.info(this.$t("finished_in", { duration }), {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</pw-toggle>
|
</pw-toggle>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="fb.currentSettings.length == 0">
|
<p v-if="fb.currentSettings.length == 0">
|
||||||
<button class="" @click="writeSettings">
|
<button class="" @click="initSettings">
|
||||||
<i class="material-icons">sync</i>
|
<i class="material-icons">sync</i>
|
||||||
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
|
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -406,8 +406,8 @@ export default {
|
|||||||
action: {
|
action: {
|
||||||
text: this.$t("yes"),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings("syncHistory", false);
|
fb.writeSettings("syncHistory", true);
|
||||||
fb.writeSettings("syncCollections", true);
|
fb.writeSettings("syncCollections", false);
|
||||||
this.$router.push({ path: "/settings" });
|
this.$router.push({ path: "/settings" });
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
}
|
}
|
||||||
@@ -435,8 +435,8 @@ export default {
|
|||||||
action: {
|
action: {
|
||||||
text: this.$t("yes"),
|
text: this.$t("yes"),
|
||||||
onClick: (e, toastObject) => {
|
onClick: (e, toastObject) => {
|
||||||
fb.writeSettings("syncHistory", false);
|
fb.writeSettings("syncHistory", true);
|
||||||
fb.writeSettings("syncCollections", true);
|
fb.writeSettings("syncCollections", false);
|
||||||
this.$router.push({ path: "/settings" });
|
this.$router.push({ path: "/settings" });
|
||||||
toastObject.remove();
|
toastObject.remove();
|
||||||
}
|
}
|
||||||
@@ -453,9 +453,9 @@ export default {
|
|||||||
toggleSettings(s, v) {
|
toggleSettings(s, v) {
|
||||||
fb.writeSettings(s, !v);
|
fb.writeSettings(s, !v);
|
||||||
},
|
},
|
||||||
writeSettings() {
|
initSettings() {
|
||||||
fb.writeSettings("syncHistory", false);
|
fb.writeSettings("syncHistory", true);
|
||||||
fb.writeSettings("syncCollections", true);
|
fb.writeSettings("syncCollections", false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -111,10 +111,10 @@ export const mutations = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addNewCollection({ collections }, collection) {
|
addNewCollection({ collections }, collection) {
|
||||||
const { name } = collection
|
const { name } = collection;
|
||||||
const duplicateCollection = collections.some(item => item.name === name)
|
const duplicateCollection = collections.some(item => item.name === name);
|
||||||
if (duplicateCollection) {
|
if (duplicateCollection) {
|
||||||
this.$toast.info('Duplicate collection');
|
this.$toast.info("Duplicate collection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
collections.push({
|
collections.push({
|
||||||
@@ -132,10 +132,10 @@ export const mutations = {
|
|||||||
|
|
||||||
editCollection({ collections }, payload) {
|
editCollection({ collections }, payload) {
|
||||||
const { collection, collectionIndex } = payload;
|
const { collection, collectionIndex } = payload;
|
||||||
const { name } = collection
|
const { name } = collection;
|
||||||
const duplicateCollection = collections.some(item => item.name === name)
|
const duplicateCollection = collections.some(item => item.name === name);
|
||||||
if (duplicateCollection) {
|
if (duplicateCollection) {
|
||||||
this.$toast.info('Duplicate collection');
|
this.$toast.info("Duplicate collection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
collections[collectionIndex] = collection;
|
collections[collectionIndex] = collection;
|
||||||
|
|||||||
Reference in New Issue
Block a user