Skip to content
Snippets Groups Projects
Commit 276c7a54 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix: disabled media source editor shouldn’t allow sorting and metadata editing

parent cc4bb961
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
>
<div>
<icon-system-uicons-drag-vertical
v-if="canSort"
class="tw-flex-none tw-mr-2 tw-cursor-grab"
data-drag-handle
/>
......@@ -66,6 +67,7 @@
<div>
<button
v-if="canEdit"
type="button"
class="btn btn-default btn-sm tw-p-1 tw-rounded-full"
@click="editDialog.open()"
......@@ -163,10 +165,14 @@ import AStatus from '@/components/generic/AStatus.vue'
const props = withDefaults(
defineProps<{
mediaSource: MediaSource
canSort?: boolean
canEdit?: boolean
as?: string
}>(),
{
as: 'div',
canSort: false,
canEdit: true,
},
)
......
......@@ -5,7 +5,7 @@
:key="source.id"
:media-source="source"
as="li"
:drag-handle="sources.length === 1 ? false : canSort"
:can-sort="sources.length === 1 ? false : canSort"
:can-edit="canEdit"
/>
</ol>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment