Files
vuefilemanager/resources/js/components/Mobile/MenuMobile.vue
Čarodej e6133d6071 Fixes:
- [x] Ipad landscape in teams missing heads widget
- [x] Ipad portrait (sm) full screen mode
- [x] Ipad landscape add file handler button
- [x] In recent upload, shared items and trash is search instead spotlight text button
- [x] Dissapearing mobile context menu animation is buggy
- [x] Fileitemgrid in single shared item refactoring
- [x] Ipad landscape add eye icon to show info details list/grid
2021-11-01 11:22:23 +01:00

94 lines
1.9 KiB
Vue

<template>
<transition name="context-menu">
<div v-if="isVisible" @click="closeMenu" class="options">
<slot></slot>
</div>
</transition>
</template>
<script>
import {events} from '/resources/js/bus'
export default {
name: 'MenuMobile',
props: [
'name'
],
data() {
return {
isVisible: false,
}
},
methods: {
closeMenu() {
this.isVisible = false
events.$emit('mobile-menu:hide')
}
},
created() {
events.$on('mobile-menu:show', name => {
if (name === this.name)
this.isVisible = !this.isVisible
})
events.$on('mobile-menu:hide', () => this.isVisible = false)
}
}
</script>
<style scoped lang="scss">
@import "resources/sass/vuefilemanager/_variables";
@import "resources/sass/vuefilemanager/_mixins";
.options {
position: fixed;
padding-bottom: 25px;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
overflow: hidden;
background: white;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
&.showed {
display: block;
}
}
// Transition
.context-menu-enter-active,
.fade-enter-active {
transition: all 300ms;
}
.context-menu-leave-active,
.fade-leave-active {
transition: all 300ms;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.context-menu-enter,
.context-menu-leave-to {
opacity: 0;
transform: translateY(100%);
}
.context-menu-leave-active {
position: fixed;
}
.dark {
.options {
background: $dark_mode_foreground;
}
}
</style>