Merge pull request #571 from liyasthomas/feature/native-share
✨ Native share + updated meta description
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<p>
|
<p>
|
||||||
<b>A free, fast & beautiful API request builder</b>
|
<b>A free, fast and beautiful API request builder</b>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<i>Web alternative to Postman - Helps you create requests faster, saving precious time on development - <a href="https://postwoman.launchaco.com">Subscribe</a></i>
|
<i>Web alternative to Postman - Helps you create requests faster, saving precious time on development - <a href="https://postwoman.launchaco.com">Subscribe</a></i>
|
||||||
|
|||||||
@@ -373,7 +373,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="icon"
|
class="icon"
|
||||||
onClick="window.open('https://twitter.com/share?text=👽 Postwoman • API request builder - Helps you create your requests faster, saving you precious time on your development&url=https://postwoman.io&hashtags=postwoman&via=liyasthomas');"
|
onClick="window.open('https://twitter.com/share?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&hashtags=postwoman&via=liyasthomas');"
|
||||||
v-close-popover
|
v-close-popover
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@@ -388,6 +388,15 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<span>{{ $t("tweet") }}</span>
|
<span>{{ $t("tweet") }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="navigatorShare"
|
||||||
|
class="icon"
|
||||||
|
@click="nativeShare"
|
||||||
|
v-close-popover
|
||||||
|
v-tooltip="$t('more')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">share</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-popover>
|
</v-popover>
|
||||||
@@ -672,7 +681,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getSpecialKey() {
|
getSpecialKey() {
|
||||||
return (/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) ? "⌘" : "Ctrl";
|
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl";
|
||||||
},
|
},
|
||||||
linkActive(path) {
|
linkActive(path) {
|
||||||
return {
|
return {
|
||||||
@@ -680,7 +689,6 @@ export default {
|
|||||||
"nuxt-link-active": this.$route.path === path
|
"nuxt-link-active": this.$route.path === path
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
fb.currentUser = null;
|
fb.currentUser = null;
|
||||||
firebase
|
firebase
|
||||||
@@ -694,6 +702,21 @@ export default {
|
|||||||
this.$toast.info(this.$t("logged_out"), {
|
this.$toast.info(this.$t("logged_out"), {
|
||||||
icon: "vpn_key"
|
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 {
|
||||||
|
this.$toast.info("Web Share API is not supported in your browser")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -709,7 +732,8 @@ export default {
|
|||||||
showSupport: false,
|
showSupport: false,
|
||||||
firefoxExtInstalled: window.firefoxExtSendRequest,
|
firefoxExtInstalled: window.firefoxExtSendRequest,
|
||||||
chromeExtInstalled: window.chrome && hasChromeExtensionInstalled(),
|
chromeExtInstalled: window.chrome && hasChromeExtensionInstalled(),
|
||||||
fb
|
fb,
|
||||||
|
navigatorShare: navigator.share
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
// TODO: Use these when rendering the pages (rather than just for head/meta tags...)
|
||||||
export const meta = {
|
export const meta = {
|
||||||
name: "Postwoman",
|
name: "Postwoman",
|
||||||
shortDescription: "API request builder",
|
shortDescription: "A free, fast and beautiful API request builder",
|
||||||
description:
|
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.
|
// Sets the base path for the router.
|
||||||
// Important for deploying to GitHub pages.
|
// Important for deploying to GitHub pages.
|
||||||
|
|||||||
@@ -2382,7 +2382,7 @@ export default {
|
|||||||
const date = new Date().toLocaleDateString();
|
const date = new Date().toLocaleDateString();
|
||||||
navigator
|
navigator
|
||||||
.share({
|
.share({
|
||||||
title: `Postwoman`,
|
title: "Postwoman",
|
||||||
text: `Postwoman • API request builder at ${time} on ${date}`,
|
text: `Postwoman • API request builder at ${time} on ${date}`,
|
||||||
url: window.location.href
|
url: window.location.href
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user