summaryrefslogtreecommitdiff
path: root/src/client/pages/notifications.vue
blob: 06f8ad3cbab26aaf27a21706993e6a64e5e0d217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
<div class="clupoqwt" v-size="{ min: [800] }">
	<XNotifications class="notifications" @before="before" @after="after" page/>
</div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import Progress from '@client/scripts/loading';
import XNotifications from '@client/components/notifications.vue';
import * as os from '@client/os';
import * as symbols from '@client/symbols';

export default defineComponent({
	components: {
		XNotifications
	},

	data() {
		return {
			[symbols.PAGE_INFO]: {
				title: this.$ts.notifications,
				icon: 'fas fa-bell',
				bg: 'var(--bg)',
				actions: [{
					text: this.$ts.markAllAsRead,
					icon: 'fas fa-check',
					handler: () => {
						os.apiWithDialog('notifications/mark-all-as-read');
					}
				}]
			},
		};
	},

	methods: {
		before() {
			Progress.start();
		},

		after() {
			Progress.done();
		}
	}
});
</script>

<style lang="scss" scoped>
.clupoqwt {
	&.min-width_800px {
		background: var(--bg);
		padding: 32px 0;

		> .notifications {
			max-width: 800px;
			margin: 0 auto;
		}
	}
}
</style>