sponsor ad

This commit is contained in:
Liyas Thomas
2020-10-20 16:59:54 +05:30
parent d6409d7152
commit b179731359
2 changed files with 30 additions and 29 deletions

View File

@@ -359,34 +359,34 @@ export default {
})
}
// let showAd = localStorage.getItem("showAd") === "no"
// if (!showAd) {
// setTimeout(() => {
// this.$toast.clear()
// this.$toast.show(
// "<span>Postwoman is now Hoppscotch 🎉<br><u><a href='https://dev.to/liyasthomas/postwoman-is-changing-name-igp' target='_blank' rel='noopener'>Read the announcement</a></u> →<br><sub>Whoosh this away to dismiss.</sub></span>",
// {
// icon: "",
// duration: 0,
// theme: "toasted-ad",
// action: [
// {
// text: "GitHub",
// icon: "chevron_right",
// onClick: (e, toastObject) => {
// // localStorage.setItem("showAd", "no")
// toastObject.goAway(0)
// window.open("https://github.com/hoppscotch/hoppscotch")
// },
// },
// ],
// onComplete() {
// // localStorage.setItem("showAd", "no")
// },
// }
// )
// }, 8000)
// }
let showAd = localStorage.getItem("showAd") === "no"
if (!showAd) {
setTimeout(() => {
this.$toast.clear()
this.$toast.show(
"<span><a href='https://github.com/sponsors/hoppscotch' target='_blank' rel='noopener'>Make a donation to support Hoppscotch open source project 🎉</a><br><sub>Whoosh this away to dismiss.</sub></span>",
{
icon: "",
duration: 0,
theme: "toasted-ad",
action: [
{
text: "DONATE",
icon: "favorite",
onClick: (e, toastObject) => {
localStorage.setItem("showAd", "no")
toastObject.goAway(0)
window.open("https://github.com/sponsors/hoppscotch")
},
},
],
onComplete() {
localStorage.setItem("showAd", "no")
},
}
)
}, 8000)
}
let showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"