Announcement banner

This commit is contained in:
Liyas Thomas
2020-08-25 13:27:59 +05:30
parent 9c24fcec0d
commit 2916ab502e
2 changed files with 30 additions and 30 deletions

View File

@@ -662,7 +662,7 @@ section {
}
.toasted-container .toasted {
justify-content: flex-start !important;
justify-content: space-between !important;
}
.toasted.info {

View File

@@ -362,34 +362,34 @@ export default {
})
}
// let showAd = localStorage.getItem("showAd") === "no"
// if (!showAd) {
// setTimeout(() => {
// this.$toast.clear()
// this.$toast.show(
// "<span>Get <u><a href='https://gum.co/keky' target='_blank' rel='noopener'>De-Coding The Passion Project</a></u> book, expertly crafted by the creator of Hoppscotch. Whoosh this away to dismiss</span>",
// {
// icon: "",
// duration: 0,
// theme: "toasted-ad",
// action: [
// {
// text: "Get",
// icon: "chevron_right",
// onClick: (e, toastObject) => {
// localStorage.setItem("showAd", "no")
// toastObject.goAway(0)
// window.open("https://gum.co/keky")
// },
// },
// ],
// onComplete() {
// localStorage.setItem("showAd", "no")
// },
// }
// )
// }, 11000)
// }
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 showExtensionsToast = localStorage.getItem("showExtensionsToast") === "yes"
@@ -446,7 +446,7 @@ export default {
title: "Hoppscotch",
text:
"Hoppscotch • A free, fast and beautiful API request builder - Helps you create requests faster, saving precious time on development.",
url: "https://hoppscotch.io/",
url: "https://hoppscotch.io",
})
.then(() => {})
.catch(console.error)