mizzkey/src/client/app/desktop/views/widgets/notifications.vue

71 lines
1.1 KiB
Vue
Raw Normal View History

2018-02-18 15:51:41 +01:00
<template>
<div class="mkw-notifications">
<template v-if="!props.compact">
2018-04-14 18:04:40 +02:00
<p class="title">%fa:R bell%%i18n:@title%</p>
<button @click="settings" title="%i18n:@settings%">%fa:cog%</button>
2018-02-18 15:51:41 +01:00
</template>
<mk-notifications/>
</div>
</template>
<script lang="ts">
2018-02-24 16:18:09 +01:00
import define from '../../../common/define-widget';
2018-02-18 15:51:41 +01:00
export default define({
name: 'notifications',
2018-02-21 07:30:03 +01:00
props: () => ({
2018-02-18 15:51:41 +01:00
compact: false
2018-02-21 07:30:03 +01:00
})
2018-02-18 15:51:41 +01:00
}).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>