Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
:can-move-video-down="canMoveVideoDown"
:can-remove-from-playlist="canRemoveFromPlaylist"
:layout="layout"
:show-grab-bar="isDraggable && layout === 'grid'"
:show-grab-bar="showGrabBar && layout === 'grid'"
:grab-bar-enabled="isDraggable && layout === 'grid'"
@move-video-up="moveVideoUp"
@move-video-down="moveVideoDown"
@move-video-to-the-top="moveVideoToTheTop"
Expand Down Expand Up @@ -176,7 +177,8 @@ const emit = defineEmits([
])

const inUserPlaylist = props.playlistType === 'user'
const isDraggable = computed(() => inUserPlaylist && props.isSortOrderCustom && (props.canMoveVideoUp || props.canMoveVideoDown))
const showGrabBar = computed(() => inUserPlaylist && props.isSortOrderCustom)
const isDraggable = computed(() => showGrabBar.value && (props.canMoveVideoUp || props.canMoveVideoDown))
const { dragVideo, moveDraggedVideo, afterDrag } = handleDragAndDrop(emit)
const draggableEventHandlers = {
dragstart: onDragVideo,
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/components/FtListVideo/FtListVideo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
padding-block: 1em;
}

.grabBar.grabBarDisabled {
cursor: not-allowed;
opacity: 0.3;
}

.draggable:not(.draggable:only-child):focus .grabBar,
.draggable:not(.draggable:only-child):hover .grabBar {
display: revert;
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/components/FtListVideo/FtListVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<div
v-if="showGrabBar"
class="grabBar"
:class="{
grabBarDisabled: !grabBarEnabled,
}"
:draggable="!grabBarEnabled"
>
<FontAwesomeIcon
:icon="['fas', 'fa-bars']"
Expand Down Expand Up @@ -371,6 +375,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
grabBarEnabled: {
type: Boolean,
default: false,
},
})

const emit = defineEmits([
Expand Down