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