Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
fix(core): display the Subscribe button if the notifications are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
juliomrqz committed Dec 11, 2018
1 parent fcffb67 commit 22e7950
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
13 changes: 12 additions & 1 deletion packages/@statusfy/core/client/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
</component>

<no-ssr>
<Subscribe class="subscribe-container"/>
<Subscribe
v-if="displaySubscribe"
class="subscribe-container"/>
</no-ssr>
</div>
</template>
Expand All @@ -32,6 +34,15 @@ export default {
type: String,
default: 'div'
}
},
computed: {
displaySubscribe () {
if (this.$statusfy.notifications && (typeof this.$statusfy.notifications === 'object')) {
return !!Object.values(this.$statusfy.notifications).find(v => v)
} else {
return false
}
}
}
}
</script>
Expand Down
32 changes: 16 additions & 16 deletions packages/@statusfy/core/client/components/mixins/head.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
head() {
head () {
const favicons = this.$statusfy.iconSizes.map(size => {
return {
hid: `favicon-${size}`,
Expand All @@ -19,19 +19,19 @@ export default {
: `${this.$statusfy.baseUrl}/feeds`

linksFeeds = [{
rel: 'alternate',
type: 'application/rss+xml',
hid: 'alternate-feed-rss',
title: '',
href: `${feedsBaseUrl}/incidents.${this.$i18n.locale}.xml`
},
{
rel: 'alternate',
type: 'application/atom+xml',
hid: 'alternate-feed-atom',
title: '',
href: `${feedsBaseUrl}/incidents.${this.$i18n.locale}.atom`,
},
rel: 'alternate',
type: 'application/rss+xml',
hid: 'alternate-feed-rss',
title: '',
href: `${feedsBaseUrl}/incidents.${this.$i18n.locale}.xml`
},
{
rel: 'alternate',
type: 'application/atom+xml',
hid: 'alternate-feed-atom',
title: '',
href: `${feedsBaseUrl}/incidents.${this.$i18n.locale}.atom`
}
]
}

Expand All @@ -43,8 +43,8 @@ export default {
rel: 'canonical',
href: canonical,
hid: 'canonical'
},
],
}
]

}
}
Expand Down

0 comments on commit 22e7950

Please sign in to comment.