mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Move embed/charset to sidebar
This commit is contained in:
@@ -21,6 +21,16 @@
|
||||
<dd>{{ size }}</dd>
|
||||
</div>
|
||||
|
||||
<div v-if="file.charset">
|
||||
<dt>{{ $t('charset') }}</dt>
|
||||
<dd>{{ charset }}</dd>
|
||||
</div>
|
||||
|
||||
<div v-if="file.embed">
|
||||
<dt>{{ $t('embed') }}</dt>
|
||||
<dd>{{ embed }}</dd>
|
||||
</div>
|
||||
|
||||
<div v-if="creationDate">
|
||||
<dt>{{ $t('created') }}</dt>
|
||||
<dd>{{ creationDate }}</dd>
|
||||
|
||||
@@ -234,8 +234,8 @@ export default defineComponent({
|
||||
);
|
||||
});
|
||||
|
||||
// These are the fields that will be prevented from showing up in the form
|
||||
const fieldsBlacklist: string[] = [
|
||||
// These are the fields that will be prevented from showing up in the form because they'll be shown in the sidebar
|
||||
const fieldsDenyList: string[] = [
|
||||
'type',
|
||||
'width',
|
||||
'height',
|
||||
@@ -244,12 +244,15 @@ export default defineComponent({
|
||||
'uploaded_by',
|
||||
'uploaded_on',
|
||||
'duration',
|
||||
'folder',
|
||||
'charset',
|
||||
'embed'
|
||||
];
|
||||
|
||||
const fieldsFiltered = computed(() => {
|
||||
return fieldsStore
|
||||
.getFieldsForCollection('directus_files')
|
||||
.filter((field: Field) => fieldsBlacklist.includes(field.field) === false);
|
||||
.filter((field: Field) => fieldsDenyList.includes(field.field) === false);
|
||||
});
|
||||
|
||||
const { formFields } = useFormFields(fieldsFiltered);
|
||||
|
||||
Reference in New Issue
Block a user