akkoma-fe/src/components/notifications/notifications.vue

32 lines
1.4 KiB
Vue
Raw Normal View History

2016-11-27 18:44:56 +00:00
<template>
<div class="notifications">
<div class="panel panel-default">
<div class="panel-heading">
2018-08-28 13:14:32 +00:00
<div class="title">
{{$t('notifications.notifications')}}
2018-11-26 00:19:04 +00:00
<span class="badge badge-notification unseen-count" v-if="unseenCount">{{unseenCount}}</span>
2018-08-28 13:14:32 +00:00
</div>
2018-08-20 17:45:54 +00:00
<div @click.prevent class="loadmore-error alert error" v-if="error">
{{$t('timeline.error_fetching')}}
</div>
<button v-if="unseenCount" @click.prevent="markAsSeen" class="read-button">{{$t('notifications.read')}}</button>
</div>
<div class="panel-body">
<div v-for="notification in visibleNotifications" :key="notification.action.id" class="notification" :class='{"unseen": !notification.seen}'>
<div class="notification-overlay"></div>
<notification :notification="notification"></notification>
2016-11-27 18:44:56 +00:00
</div>
</div>
<div class="panel-footer">
<a href="#" v-on:click.prevent='fetchOlderNotifications()' v-if="!notifications.loading">
<div class="new-status-notification text-center panel-footer">{{$t('notifications.load_older')}}</div>
</a>
<div class="new-status-notification text-center panel-footer" v-else>...</div>
</div>
2016-11-27 18:44:56 +00:00
</div>
</div>
</template>
<script src="./notifications.js"></script>
<style lang="scss" src="./notifications.scss"></style>