From 436de528e9adb55bde36b3f3eeb8caf8e927bbc0 Mon Sep 17 00:00:00 2001 From: Liyas Thomas Date: Sat, 15 Feb 2020 09:53:26 +0530 Subject: [PATCH] :sparkles: Native share + updated meta description --- README.md | 2 +- layouts/default.vue | 31 +++++++++++++++++++++++++++---- nuxt.config.js | 4 ++-- pages/index.vue | 2 +- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a77f29440..0093dee15 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

- A free, fast & beautiful API request builder + A free, fast and beautiful API request builder

Web alternative to Postman - Helps you create requests faster, saving precious time on development - Subscribe diff --git a/layouts/default.vue b/layouts/default.vue index b029eff92..eac87b8ec 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -373,7 +373,7 @@

+
@@ -672,7 +681,7 @@ export default { methods: { getSpecialKey() { - return (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) ? "⌘" : "Ctrl"; + return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl"; }, linkActive(path) { return { @@ -680,7 +689,6 @@ export default { "nuxt-link-active": this.$route.path === path }; }, - logout() { fb.currentUser = null; firebase @@ -694,6 +702,20 @@ export default { this.$toast.info(this.$t("logged_out"), { icon: "vpn_key" }); + }, + nativeShare() { + if (navigator.share) { + navigator + .share({ + title: "Postwoman", + text: + "Postwoman • A free, fast and beautiful API request builder - Web alternative to Postman - Helps you create requests faster, saving precious time on development.", + url: "https://postwoman.io/" + }) + .then(() => {}) + .catch(console.error); + } else { + } } }, @@ -709,7 +731,8 @@ export default { showSupport: false, firefoxExtInstalled: window.firefoxExtSendRequest, chromeExtInstalled: window.chrome && hasChromeExtensionInstalled(), - fb + fb, + navigatorShare: navigator.share }; }, diff --git a/nuxt.config.js b/nuxt.config.js index 66f07cc06..8dbdf656d 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -2,9 +2,9 @@ // TODO: Use these when rendering the pages (rather than just for head/meta tags...) export const meta = { name: "Postwoman", - shortDescription: "API request builder", + shortDescription: "A free, fast and beautiful API request builder", description: - "The Postwoman API request builder helps you create your requests faster, saving you precious time on your development." + "Web alternative to Postman - Helps you create requests faster, saving precious time on development." }; // Sets the base path for the router. // Important for deploying to GitHub pages. diff --git a/pages/index.vue b/pages/index.vue index 7d4c49514..e74fd46ea 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2382,7 +2382,7 @@ export default { const date = new Date().toLocaleDateString(); navigator .share({ - title: `Postwoman`, + title: "Postwoman", text: `Postwoman • API request builder at ${time} on ${date}`, url: window.location.href })