storj/web/satellite/src/components/notifications/NotificationArea.vue
Egon Elbre 0889866b17 web/: add @vue/component annotations
Some linters do not work properly without those annotations.
This was done with a batch replace.

Also needed to turn off two lint rules, they will be re-enabled in the
followup change. This way the batch change can be clearly separated from
manual modifications.

Change-Id: I891ae09689520edaba5588c1f2206766db2d2b90
2021-08-31 21:25:49 +03:00

60 lines
1.5 KiB
Vue

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div v-if="doNotificationsExist" class="notification-container">
<NotificationItem
v-for="notification in notifications"
:key="notification.id"
:notification="notification"
/>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import NotificationItem from '@/components/notifications/NotificationItem.vue';
import { DelayedNotification } from '@/types/DelayedNotification';
// @vue/component
@Component({
components: {
NotificationItem,
},
})
export default class NotificationArea extends Vue {
/**
* Returns all notification queue from store.
*/
public get notifications(): DelayedNotification[] {
return this.$store.state.notificationsModule.notificationQueue;
}
/**
* Indicates if any notifications are in queue.
*/
public get doNotificationsExist(): boolean {
return this.notifications.length > 0;
}
}
</script>
<style scoped lang="scss">
.notification-container {
width: 417px;
background-color: transparent;
display: flex;
flex-direction: column;
position: fixed;
top: 114px;
right: 17px;
align-items: flex-end;
justify-content: space-between;
border-radius: 12px;
z-index: 9999;
overflow: hidden;
}
</style>