1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-17 08:09:09 +09:00
MisskeyIO/src/client/app/mobile/views/components/notify.vue

61 lines
971 B
Vue
Raw Normal View History

2018-02-15 21:29:59 +09:00
<template>
<div class="mk-notify">
2018-09-04 11:34:36 +09:00
<div>
<mk-notification-preview :notification="notification"/>
</div>
2018-02-15 21:29:59 +09:00
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import * as anime from 'animejs';
export default Vue.extend({
props: ['notification'],
mounted() {
2018-02-18 18:40:24 +09:00
this.$nextTick(() => {
2018-02-15 21:29:59 +09:00
anime({
targets: this.$el,
bottom: '0px',
duration: 500,
easing: 'easeOutQuad'
});
setTimeout(() => {
anime({
targets: this.$el,
2018-09-04 11:34:36 +09:00
bottom: '-72px',
2018-02-15 21:29:59 +09:00
duration: 500,
easing: 'easeOutQuad',
complete: () => this.$destroy()
});
}, 6000);
});
}
});
</script>
<style lang="stylus" scoped>
.mk-notify
position fixed
z-index 1024
2018-09-04 11:34:36 +09:00
bottom -72px
2018-02-15 21:29:59 +09:00
left 0
2018-09-04 11:34:36 +09:00
right 0
2018-02-15 21:29:59 +09:00
width 100%
2018-09-04 11:34:36 +09:00
max-width 500px
height 72px
margin 0 auto
padding 8px
2018-02-15 21:29:59 +09:00
pointer-events none
2018-09-04 11:34:36 +09:00
font-size 80%
> div
height 100%
-webkit-backdrop-filter blur(2px)
backdrop-filter blur(2px)
background-color rgba(#000, 0.5)
border-radius 6px
2018-02-15 21:29:59 +09:00
</style>