email notifier, uri encode qr code

pull/682/head
hunterlong 2020-06-19 17:57:34 -07:00
parent 15493fb6ba
commit c8e967b476
3 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,6 @@
return { return {
tab: "v-pills-home-tab", tab: "v-pills-home-tab",
qrcode: "", qrcode: "",
qrurl: "",
} }
}, },
computed: { computed: {
@ -174,8 +173,8 @@
const n = await Api.notifiers() const n = await Api.notifiers()
this.$store.commit('setNotifiers', n) this.$store.commit('setNotifiers', n)
this.qrurl = `statping://setup?domain=${c.domain}&api=${c.api_secret}` const u = `statping://setup?domain=${c.domain}&api=${c.api_secret}`
this.qrcode = "https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=" + encodeURI(this.qrurl) this.qrcode = "https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=" + encodeURIComponent(u)
this.cache = await Api.cache() this.cache = await Api.cache()
}, },
changeTab(e) { changeTab(e) {

View File

@ -31,6 +31,7 @@ func InitNotifiers() {
Webhook, Webhook,
Mobile, Mobile,
Pushover, Pushover,
statpingMailer,
) )
} }

View File

@ -31,7 +31,7 @@ func (s *statpingEmailer) Select() *notifications.Notification {
var statpingMailer = &statpingEmailer{&notifications.Notification{ var statpingMailer = &statpingEmailer{&notifications.Notification{
Method: statpingEmailerName, Method: statpingEmailerName,
Title: "Statping Emailer", Title: "Statping Emailer",
Description: "Send an email when a service becomes offline or back online using Statping's email service.", Description: "Send an email when a service becomes offline or back online using Statping's email service. You will need to verify your email address.",
Author: "Hunter Long", Author: "Hunter Long",
AuthorUrl: "https://github.com/hunterlong", AuthorUrl: "https://github.com/hunterlong",
Delay: time.Duration(10 * time.Second), Delay: time.Duration(10 * time.Second),