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

41 lines
879 B
Vue
Raw Normal View History

2018-02-18 15:51:41 +01:00
<template>
<div class="mkw-notifications">
2018-04-19 20:56:58 +02:00
<mk-widget-container :show-header="!props.compact">
<template slot="header"><fa :icon="['far', 'bell']"/>{{ $t('title') }}</template>
<!-- <button slot="func" :title="$t('title')" @click="settings"><fa icon="cog"/></button> -->
2018-04-19 20:56:58 +02:00
<mk-notifications :class="$style.notifications"/>
</mk-widget-container>
2018-02-18 15:51:41 +01:00
</div>
</template>
<script lang="ts">
2018-02-24 16:18:09 +01:00
import define from '../../../common/define-widget';
import i18n from '../../../i18n';
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({
i18n: i18n('desktop/views/widgets/notifications.vue'),
2018-02-18 15:51:41 +01:00
methods: {
settings() {
alert('not implemented yet');
},
func() {
this.props.compact = !this.props.compact;
2018-04-29 10:17:15 +02:00
this.save();
2018-02-18 15:51:41 +01:00
}
}
});
</script>
2018-04-19 20:56:58 +02:00
<style lang="stylus" module>
.notifications
max-height 300px
overflow auto
2018-02-18 15:51:41 +01:00
</style>