mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
Popover refactored
This commit is contained in:
51
resources/js/components/Desktop/PopoverItem.vue
Normal file
51
resources/js/components/Desktop/PopoverItem.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div v-if="isVisible" class="popover-item">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {events} from '@/bus'
|
||||
|
||||
export default {
|
||||
name: 'PopoverItem',
|
||||
props: [
|
||||
'name'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
isVisible: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
events.$on('popover:open', name => {
|
||||
if (this.name === name) this.isVisible = !this.isVisible
|
||||
})
|
||||
|
||||
events.$on('unClick', () => this.isVisible = false)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@assets/vuefilemanager/_variables";
|
||||
@import "@assets/vuefilemanager/_mixins";
|
||||
|
||||
.popover-item {
|
||||
min-width: 250px;
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
box-shadow: $shadow;
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
right: 0;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.popover-item {
|
||||
background: $dark_mode_foreground;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
18
resources/js/components/Desktop/PopoverWrapper.vue
Normal file
18
resources/js/components/Desktop/PopoverWrapper.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="popover-wrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PopoverWrapper',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.popover-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
28
resources/js/components/Desktop/ToolbarGroup.vue
Normal file
28
resources/js/components/Desktop/ToolbarGroup.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="toolbar-button-wrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ToolbarWrapper',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.toolbar-button-wrapper {
|
||||
margin-left: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1024px) {
|
||||
|
||||
.toolbar-button-wrapper {
|
||||
margin-left: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
21
resources/js/components/Desktop/ToolbarWrapper.vue
Normal file
21
resources/js/components/Desktop/ToolbarWrapper.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div class="toolbar-tools">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ToolbarWrapper',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@assets/vuefilemanager/_variables";
|
||||
@import "@assets/vuefilemanager/_mixins";
|
||||
|
||||
.toolbar-tools {
|
||||
text-align: right;
|
||||
display: flex;;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user