diff --git a/src/web/app/common/-tags/special-message.tag b/src/web/app/common/-tags/special-message.tag deleted file mode 100644 index da903c6325..0000000000 --- a/src/web/app/common/-tags/special-message.tag +++ /dev/null @@ -1,27 +0,0 @@ -<mk-special-message> - <p v-if="m == 1 && d == 1">%i18n:common.tags.mk-special-message.new-year%</p> - <p v-if="m == 12 && d == 25">%i18n:common.tags.mk-special-message.christmas%</p> - <style lang="stylus" scoped> - :scope - display block - - &:empty - display none - - > p - margin 0 - padding 4px - text-align center - font-size 14px - font-weight bold - text-transform uppercase - color #fff - background #ff1036 - - </style> - <script lang="typescript"> - const now = new Date(); - this.d = now.getDate(); - this.m = now.getMonth() + 1; - </script> -</mk-special-message> diff --git a/src/web/app/common/views/components/special-message.vue b/src/web/app/common/views/components/special-message.vue new file mode 100644 index 0000000000..900afe1783 --- /dev/null +++ b/src/web/app/common/views/components/special-message.vue @@ -0,0 +1,42 @@ +<template> +<div class="mk-special-message"> + <p v-if="m == 1 && d == 1">%i18n:common.tags.mk-special-message.new-year%</p> + <p v-if="m == 12 && d == 25">%i18n:common.tags.mk-special-message.christmas%</p> +</div> +</template> + +<script lang="ts"> +import Vue from 'vue'; +export default Vue.extend({ + data() { + return { + now: new Date() + }; + }, + computed: { + d(): number { + return now.getDate(); + }, + m(): number { + return now.getMonth() + 1; + } + } +}); +</script> + +<style lang="stylus" scoped> +.mk-special-message + &:empty + display none + + > p + margin 0 + padding 4px + text-align center + font-size 14px + font-weight bold + text-transform uppercase + color #fff + background #ff1036 + +</style>