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
|
||||
node_js:
|
||||
- "12"
|
||||
- "12"
|
||||
|
||||
os: linux
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libgconf-2-4 # cypress binary dependency
|
||||
apt:
|
||||
packages:
|
||||
- libgconf-2-4 # cypress binary dependency
|
||||
|
||||
env:
|
||||
- DEPLOY_ENV=POSTWOMAN_IO
|
||||
- DEPLOY_ENV=POSTWOMAN_IO
|
||||
|
||||
cache:
|
||||
npm: true
|
||||
directories:
|
||||
- "node_modules"
|
||||
- ~/.cache
|
||||
npm: true
|
||||
directories:
|
||||
- "node_modules"
|
||||
- ~/.cache
|
||||
|
||||
branches:
|
||||
only:
|
||||
- "master"
|
||||
only:
|
||||
- "master"
|
||||
|
||||
install:
|
||||
- "npm install firebase-tools"
|
||||
- "npm install"
|
||||
- "npm install firebase-tools"
|
||||
- "npm install"
|
||||
|
||||
before_script:
|
||||
- "npm run test"
|
||||
- "npm run test"
|
||||
|
||||
script:
|
||||
- "cd functions"
|
||||
- "npm install"
|
||||
- "cd .."
|
||||
- "npm run generate"
|
||||
- "cd functions"
|
||||
- "npm install"
|
||||
- "cd .."
|
||||
- "npm run generate"
|
||||
|
||||
notifications:
|
||||
webhooks: https://www.travisbuddy.com
|
||||
|
||||
35
README.md
35
README.md
@@ -3,10 +3,10 @@
|
||||
<br>
|
||||
<br>
|
||||
<p>
|
||||
API request builder - A free, fast, and beautiful alternative to Postman
|
||||
<b>A free, fast & beautiful API request builder</b>
|
||||
</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>
|
||||
|
||||
@@ -190,30 +190,13 @@ _Requests with Pre-Request Scripts are indicated in History entries_
|
||||
🌎 **i18n β**: Experience the app in your own language.
|
||||
|
||||
1. Scroll down to the footer
|
||||
2. Click "Choose Language" button
|
||||
2. Click "Choose Language" icon button
|
||||
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.**
|
||||
|
||||
- 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!**_
|
||||
|
||||
📦 **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)**._
|
||||
|
||||
☁️ **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).**
|
||||
|
||||
## Demo 🚀 [](https://postwoman.io)
|
||||
|
||||
@@ -592,7 +592,6 @@ pre {
|
||||
|
||||
select {
|
||||
height: 37px;
|
||||
background-color: var(--bg-dark-color);
|
||||
cursor: pointer;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
|
||||
2
build.js
2
build.js
@@ -53,7 +53,7 @@ try {
|
||||
|
||||
// Write version data into a file
|
||||
fs.writeFileSync(
|
||||
PW_BUILD_DATA_DIR + "/version.json",
|
||||
`${PW_BUILD_DATA_DIR}/version.json`,
|
||||
JSON.stringify(version)
|
||||
);
|
||||
})();
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
methods: {
|
||||
addNewCollection() {
|
||||
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;
|
||||
}
|
||||
this.$store.commit("postwoman/addNewCollection", {
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
methods: {
|
||||
saveCollection() {
|
||||
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;
|
||||
}
|
||||
const collectionUpdated = {
|
||||
|
||||
@@ -11,6 +11,54 @@
|
||||
</button>
|
||||
</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>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -18,39 +66,6 @@
|
||||
<textarea v-model="collectionJson" rows="8"></textarea>
|
||||
</div>
|
||||
<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">
|
||||
<span></span>
|
||||
<span>
|
||||
@@ -71,7 +86,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fb } from "../../functions/fb";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fb
|
||||
};
|
||||
},
|
||||
props: {
|
||||
show: Boolean
|
||||
},
|
||||
@@ -101,6 +123,7 @@ export default {
|
||||
this.$store.commit("postwoman/replaceCollections", collections);
|
||||
};
|
||||
reader.readAsText(this.$refs.inputChooseFileToReplaceWith.files[0]);
|
||||
this.fileImported();
|
||||
},
|
||||
importFromJSON() {
|
||||
let reader = new FileReader();
|
||||
@@ -110,6 +133,7 @@ export default {
|
||||
this.$store.commit("postwoman/importCollections", collections);
|
||||
};
|
||||
reader.readAsText(this.$refs.inputChooseFileToImportFrom.files[0]);
|
||||
this.fileImported();
|
||||
},
|
||||
exportJSON() {
|
||||
let text = this.collectionJson;
|
||||
@@ -125,6 +149,18 @@ export default {
|
||||
document.body.appendChild(anchor);
|
||||
anchor.click();
|
||||
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>
|
||||
import collection from "./collection";
|
||||
import { fb } from "../../functions/fb";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -172,11 +173,13 @@ export default {
|
||||
this.$data.editingCollection = collection;
|
||||
this.$data.editingCollectionIndex = collectionIndex;
|
||||
this.displayModalEdit(true);
|
||||
this.syncCollections();
|
||||
},
|
||||
addFolder(collection, collectionIndex) {
|
||||
this.$data.editingCollection = collection;
|
||||
this.$data.editingCollectionIndex = collectionIndex;
|
||||
this.displayModalAddFolder(true);
|
||||
this.syncCollections();
|
||||
},
|
||||
editFolder(payload) {
|
||||
const { collectionIndex, folder, folderIndex } = payload;
|
||||
@@ -185,6 +188,7 @@ export default {
|
||||
this.$data.editingFolder = folder;
|
||||
this.$data.editingFolderIndex = folderIndex;
|
||||
this.displayModalEditFolder(true);
|
||||
this.syncCollections();
|
||||
},
|
||||
editRequest(payload) {
|
||||
const { request, collectionIndex, folderIndex, requestIndex } = payload;
|
||||
@@ -193,6 +197,7 @@ export default {
|
||||
this.$data.editingRequest = request;
|
||||
this.$data.editingRequestIndex = requestIndex;
|
||||
this.displayModalEditRequest(true);
|
||||
this.syncCollections();
|
||||
},
|
||||
resetSelectedData() {
|
||||
this.$data.editingCollection = undefined;
|
||||
@@ -201,6 +206,15 @@ export default {
|
||||
this.$data.editingFolderIndex = undefined;
|
||||
this.$data.editingRequest = 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) {
|
||||
this.editor.session.setAnnotations(
|
||||
gql.validate(this.validationSchema, doc)
|
||||
.map((err) => {
|
||||
return {
|
||||
row: err.locations[0].line - 1,
|
||||
column: err.locations[0].column - 1,
|
||||
text: err.message,
|
||||
type: "error"
|
||||
}
|
||||
})
|
||||
)
|
||||
gql.validate(this.validationSchema, doc).map(err => {
|
||||
return {
|
||||
row: err.locations[0].line - 1,
|
||||
column: err.locations[0].column - 1,
|
||||
text: err.message,
|
||||
type: "error"
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
this.editor.session.setAnnotations([
|
||||
|
||||
@@ -25,6 +25,7 @@ export const fb = {
|
||||
currentFeeds: [],
|
||||
currentSettings: [],
|
||||
currentHistory: [],
|
||||
currentCollections: [],
|
||||
writeFeeds: async (message, label) => {
|
||||
const dt = {
|
||||
createdOn: new Date(),
|
||||
@@ -34,14 +35,11 @@ export const fb = {
|
||||
message,
|
||||
label
|
||||
};
|
||||
try {
|
||||
return usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.collection("feeds")
|
||||
.add(dt);
|
||||
} catch (e) {
|
||||
return console.error("error inserting", dt, e);
|
||||
}
|
||||
usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.collection("feeds")
|
||||
.add(dt)
|
||||
.catch(e => console.error("error inserting", dt, e));
|
||||
},
|
||||
deleteFeed: id => {
|
||||
usersCollection
|
||||
@@ -60,26 +58,20 @@ export const fb = {
|
||||
name: setting,
|
||||
value
|
||||
};
|
||||
try {
|
||||
return usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.collection("settings")
|
||||
.doc(setting)
|
||||
.set(st);
|
||||
} catch (e) {
|
||||
return console.error("error updating", st, e);
|
||||
}
|
||||
usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.collection("settings")
|
||||
.doc(setting)
|
||||
.set(st)
|
||||
.catch(e => console.error("error updating", st, e));
|
||||
},
|
||||
writeHistory: async entry => {
|
||||
const hs = entry;
|
||||
try {
|
||||
return usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.collection("history")
|
||||
.add(hs);
|
||||
} catch (e) {
|
||||
return console.error("error inserting", hs, e);
|
||||
}
|
||||
usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.collection("history")
|
||||
.add(hs)
|
||||
.catch(e => console.error("error inserting", hs, e));
|
||||
},
|
||||
deleteHistory: entry => {
|
||||
usersCollection
|
||||
@@ -105,6 +97,21 @@ export const fb = {
|
||||
.doc(entry.id)
|
||||
.update({ star: value })
|
||||
.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,
|
||||
uid: profile.uid
|
||||
};
|
||||
try {
|
||||
usersCollection.doc(fb.currentUser.uid).set(us);
|
||||
} catch (e) {
|
||||
console.error("error updating", us, e);
|
||||
}
|
||||
usersCollection
|
||||
.doc(fb.currentUser.uid)
|
||||
.set(us)
|
||||
.catch(e => console.error("error updating", us, e));
|
||||
});
|
||||
|
||||
usersCollection
|
||||
@@ -167,6 +173,19 @@ firebase.auth().onAuthStateChanged(user => {
|
||||
});
|
||||
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 {
|
||||
fb.currentUser = null;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
// 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
|
||||
const debounce = (func, delay) => {
|
||||
let inDebounce
|
||||
let inDebounce;
|
||||
return function() {
|
||||
const context = this
|
||||
const args = arguments
|
||||
clearTimeout(inDebounce)
|
||||
inDebounce = setTimeout(() => func.apply(context, args), delay)
|
||||
}
|
||||
}
|
||||
const context = this;
|
||||
const args = arguments;
|
||||
clearTimeout(inDebounce);
|
||||
inDebounce = setTimeout(() => func.apply(context, args), delay);
|
||||
};
|
||||
};
|
||||
|
||||
export default debounce;
|
||||
|
||||
@@ -259,5 +259,6 @@ export default {
|
||||
syncCollections: "Collections",
|
||||
turn_on: "Turn on",
|
||||
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 * as version from "../.postwoman/version.json";
|
||||
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy";
|
||||
|
||||
import firebase from 'firebase/app';
|
||||
import { fb } from '../functions/fb';
|
||||
import firebase from "firebase/app";
|
||||
import { fb } from "../functions/fb";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
44
package-lock.json
generated
44
package-lock.json
generated
@@ -1203,12 +1203,12 @@
|
||||
}
|
||||
},
|
||||
"@kazupon/vue-i18n-loader": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.4.1.tgz",
|
||||
"integrity": "sha512-hVznmhnyoUKozGY7pwq/UtPL76UDzb+aiN2YksZZIzCY/MkEqih0MSyEmTGw7+HVWzJRPAlDyoRNR4tWKmkCRw==",
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.5.0.tgz",
|
||||
"integrity": "sha512-Tp2mXKemf9/RBhI9CW14JjR9oKjL2KH7tV6S0eKEjIBuQBAOFNuPJu3ouacmz9hgoXbNp+nusw3MVQmxZWFR9g==",
|
||||
"requires": {
|
||||
"js-yaml": "^3.13.1",
|
||||
"json5": "^2.1.0"
|
||||
"json5": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"@nuxt/babel-preset-app": {
|
||||
@@ -4068,9 +4068,9 @@
|
||||
"integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk="
|
||||
},
|
||||
"cypress": {
|
||||
"version": "3.8.2",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.8.2.tgz",
|
||||
"integrity": "sha512-aTs0u3+dfEuLe0Ct0FVO5jD1ULqxbuqWUZwzBm0rxdLgLxIAOI/A9f/WkgY5Cfy1TEXe8pKC6Wal0ZpnkdGRSw==",
|
||||
"version": "3.8.3",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-3.8.3.tgz",
|
||||
"integrity": "sha512-I9L/d+ilTPPA4vq3NC1OPKmw7jJIpMKNdyfR8t1EXYzYCjyqbc59migOm1YSse/VRbISLJ+QGb5k4Y3bz2lkYw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@cypress/listr-verbose-renderer": "0.4.1",
|
||||
@@ -8098,13 +8098,13 @@
|
||||
}
|
||||
},
|
||||
"nuxt-i18n": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.4.1.tgz",
|
||||
"integrity": "sha512-SHAK5eA9oci8AtqOCDvPgWKp+W7SIBbbxW5xraPO0YTdyJWuA1gmUuo24w7MSms4d/cUcWoJaNiEYZHqxidUTA==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.5.0.tgz",
|
||||
"integrity": "sha512-JNg5rJl/8/b5ruX1ZXPHGk2hXFFefaSgUgg19vaNPMpSWt4UqP2X47ShSv6UdRvUw8TZvcDjDBieZsyfsx+GEg==",
|
||||
"requires": {
|
||||
"@babel/parser": "^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",
|
||||
"is-https": "^1.0.0",
|
||||
"js-cookie": "^2.2.1",
|
||||
@@ -8592,9 +8592,9 @@
|
||||
}
|
||||
},
|
||||
"popper.js": {
|
||||
"version": "1.16.0",
|
||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
|
||||
"integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw=="
|
||||
"version": "1.16.1",
|
||||
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
|
||||
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
|
||||
},
|
||||
"posix-character-classes": {
|
||||
"version": "0.1.1",
|
||||
@@ -11848,12 +11848,12 @@
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
},
|
||||
"v-tooltip": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.2.tgz",
|
||||
"integrity": "sha512-xQ+qzOFfywkLdjHknRPgMMupQNS8yJtf9Utd5Dxiu/0n4HtrxqsgDtN2MLZ0LKbburtSAQgyypuE/snM8bBZhw==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.3.tgz",
|
||||
"integrity": "sha512-KZZY3s+dcijzZmV2qoDH4rYmjMZ9YKGBVoUznZKQX0e3c2GjpJm3Sldzz8HHH2Ud87JqhZPB4+4gyKZ6m98cKQ==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.11",
|
||||
"popper.js": "^1.15.0",
|
||||
"lodash": "^4.17.15",
|
||||
"popper.js": "^1.16.0",
|
||||
"vue-resize": "^0.4.5"
|
||||
}
|
||||
},
|
||||
@@ -11914,9 +11914,9 @@
|
||||
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog=="
|
||||
},
|
||||
"vue-i18n": {
|
||||
"version": "8.15.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.15.1.tgz",
|
||||
"integrity": "sha512-GBbz8qYCu0U2LNu4IcuFLZiuyninG4k26knvhL7GZG5Ncp4RR2VKDEH6g8gQ6I+UUBCvH2MBQVPSdxWe4DBkPw=="
|
||||
"version": "8.15.3",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.15.3.tgz",
|
||||
"integrity": "sha512-PVNgo6yhOmacZVFjSapZ314oewwLyXHjJwAqjnaPN1GJAJd/dvsrShGzSiJuCX4Hc36G4epJvNXUwO8y7wEKew=="
|
||||
},
|
||||
"vue-i18n-extensions": {
|
||||
"version": "0.2.1",
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
"firebase": "^7.7.0",
|
||||
"graphql": "^14.5.8",
|
||||
"nuxt": "^2.11.0",
|
||||
"nuxt-i18n": "^6.4.1",
|
||||
"v-tooltip": "^2.0.2",
|
||||
"nuxt-i18n": "^6.5.0",
|
||||
"v-tooltip": "^2.0.3",
|
||||
"vue-virtual-scroll-list": "^1.4.4",
|
||||
"vuefire": "^2.2.1",
|
||||
"vuejs-auto-complete": "^0.9.0",
|
||||
@@ -38,7 +38,7 @@
|
||||
"yargs-parser": "^16.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cypress": "^3.8.2",
|
||||
"cypress": "^3.8.3",
|
||||
"node-sass": "^4.13.1",
|
||||
"sass-loader": "^8.0.2",
|
||||
"start-server-and-test": "^1.10.6"
|
||||
|
||||
@@ -812,9 +812,7 @@ export default {
|
||||
}
|
||||
}
|
||||
this.gqlTypes = types;
|
||||
|
||||
this.$refs.queryEditor.setValidationSchema(schema);
|
||||
|
||||
this.$nuxt.$loading.finish();
|
||||
const duration = Date.now() - startTime;
|
||||
this.$toast.info(this.$t("finished_in", { duration }), {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
</pw-toggle>
|
||||
</p>
|
||||
<p v-if="fb.currentSettings.length == 0">
|
||||
<button class="" @click="writeSettings">
|
||||
<button class="" @click="initSettings">
|
||||
<i class="material-icons">sync</i>
|
||||
<span>{{ $t("turn_on") + " " + $t("sync") }}</span>
|
||||
</button>
|
||||
@@ -406,8 +406,8 @@ export default {
|
||||
action: {
|
||||
text: this.$t("yes"),
|
||||
onClick: (e, toastObject) => {
|
||||
fb.writeSettings("syncHistory", false);
|
||||
fb.writeSettings("syncCollections", true);
|
||||
fb.writeSettings("syncHistory", true);
|
||||
fb.writeSettings("syncCollections", false);
|
||||
this.$router.push({ path: "/settings" });
|
||||
toastObject.remove();
|
||||
}
|
||||
@@ -435,8 +435,8 @@ export default {
|
||||
action: {
|
||||
text: this.$t("yes"),
|
||||
onClick: (e, toastObject) => {
|
||||
fb.writeSettings("syncHistory", false);
|
||||
fb.writeSettings("syncCollections", true);
|
||||
fb.writeSettings("syncHistory", true);
|
||||
fb.writeSettings("syncCollections", false);
|
||||
this.$router.push({ path: "/settings" });
|
||||
toastObject.remove();
|
||||
}
|
||||
@@ -453,9 +453,9 @@ export default {
|
||||
toggleSettings(s, v) {
|
||||
fb.writeSettings(s, !v);
|
||||
},
|
||||
writeSettings() {
|
||||
fb.writeSettings("syncHistory", false);
|
||||
fb.writeSettings("syncCollections", true);
|
||||
initSettings() {
|
||||
fb.writeSettings("syncHistory", true);
|
||||
fb.writeSettings("syncCollections", false);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@ export const mutations = {
|
||||
},
|
||||
|
||||
addNewCollection({ collections }, collection) {
|
||||
const { name } = collection
|
||||
const duplicateCollection = collections.some(item => item.name === name)
|
||||
const { name } = collection;
|
||||
const duplicateCollection = collections.some(item => item.name === name);
|
||||
if (duplicateCollection) {
|
||||
this.$toast.info('Duplicate collection');
|
||||
this.$toast.info("Duplicate collection");
|
||||
return;
|
||||
}
|
||||
collections.push({
|
||||
@@ -132,10 +132,10 @@ export const mutations = {
|
||||
|
||||
editCollection({ collections }, payload) {
|
||||
const { collection, collectionIndex } = payload;
|
||||
const { name } = collection
|
||||
const duplicateCollection = collections.some(item => item.name === name)
|
||||
const { name } = collection;
|
||||
const duplicateCollection = collections.some(item => item.name === name);
|
||||
if (duplicateCollection) {
|
||||
this.$toast.info('Duplicate collection');
|
||||
this.$toast.info("Duplicate collection");
|
||||
return;
|
||||
}
|
||||
collections[collectionIndex] = collection;
|
||||
|
||||
Reference in New Issue
Block a user