summaryrefslogtreecommitdiff
path: root/src/server/web/app/desktop/views/widgets/notifications.vue
blob: 1a2b3d3f892e72427342d26ef118b12626de06ed (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
61
62
63
64
65
66
67
68
69
70
<template>
<div class="mkw-notifications">
	<template v-if="!props.compact">
		<p class="title">%fa:R bell%%i18n:desktop.tags.mk-notifications-home-widget.title%</p>
		<button @click="settings" title="%i18n:desktop.tags.mk-notifications-home-widget.settings%">%fa:cog%</button>
	</template>
	<mk-notifications/>
</div>
</template>

<script lang="ts">
import define from '../../../common/define-widget';
export default define({
	name: 'notifications',
	props: () => ({
		compact: false
	})
}).extend({
	methods: {
		settings() {
			alert('not implemented yet');
		},
		func() {
			this.props.compact = !this.props.compact;
		}
	}
});
</script>

<style lang="stylus" scoped>
.mkw-notifications
	background #fff
	border solid 1px rgba(0, 0, 0, 0.075)
	border-radius 6px

	> .title
		z-index 1
		margin 0
		padding 0 16px
		line-height 42px
		font-size 0.9em
		font-weight bold
		color #888
		box-shadow 0 1px rgba(0, 0, 0, 0.07)

		> [data-fa]
			margin-right 4px

	> button
		position absolute
		z-index 2
		top 0
		right 0
		padding 0
		width 42px
		font-size 0.9em
		line-height 42px
		color #ccc

		&:hover
			color #aaa

		&:active
			color #999

	> .mk-notifications
		max-height 300px
		overflow auto

</style>