Move embed/charset to sidebar

This commit is contained in:
rijkvanzanten
2020-07-30 16:38:02 -04:00
parent e02f008ffc
commit 4b0976311f
2 changed files with 16 additions and 3 deletions

View File

@@ -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>

View File

@@ -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);