2022-04-07 12:57:53 +00:00
|
|
|
<template>
|
2022-12-08 12:26:57 +00:00
|
|
|
<div class="layout-news" :style="$appState.announcement.backgroundStyle">
|
|
|
|
<i></i>
|
|
|
|
<div class="layout-news-content">
|
|
|
|
<span class="layout-news-text" :style="$appState.announcement.textStyle">{{ $appState.announcement.content }}</span>
|
|
|
|
<a class="layout-news-link" :href="$appState.announcement.linkHref">{{ $appState.announcement.linkText }}</a>
|
2022-04-07 12:57:53 +00:00
|
|
|
</div>
|
2022-12-08 12:26:57 +00:00
|
|
|
<a class="layout-news-close" :style="$appState.announcement.textStyle" @click="onClose">
|
|
|
|
<span class="pi pi-times"></span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2022-04-07 12:57:53 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-12-08 12:26:57 +00:00
|
|
|
import EventBus from '@/layouts/AppEventBus';
|
2022-04-07 12:57:53 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
mounted() {
|
2023-01-30 22:50:55 +00:00
|
|
|
EventBus.emit('news-activate');
|
2022-04-07 12:57:53 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onClose() {
|
|
|
|
this.$appState.newsActive = false;
|
|
|
|
const item = {
|
|
|
|
hiddenNews: this.$appState.announcement.id
|
|
|
|
};
|
2022-12-08 12:26:57 +00:00
|
|
|
|
2023-01-30 22:50:55 +00:00
|
|
|
localStorage.setItem(this.$appState.storageKey, JSON.stringify(item));
|
2022-04-07 12:57:53 +00:00
|
|
|
}
|
|
|
|
}
|
2022-09-14 14:26:41 +00:00
|
|
|
};
|
|
|
|
</script>
|