Update interface previews (#10611)

* update interface previews

* add treeview preview
This commit is contained in:
Azri Kahar
2021-12-25 09:24:18 +08:00
committed by GitHub
parent 0677d9ad45
commit d8f9f339ba
30 changed files with 164 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import { defineInterface } from '@directus/shared/utils';
import { DeepPartial, Field } from '@directus/shared/types';
import InterfaceSelectMultipleCheckboxesTree from './select-multiple-checkbox-tree.vue';
import PreviewSVG from './preview.svg?raw';
const repeaterFields: DeepPartial<Field>[] = [
{
@@ -122,4 +123,5 @@ export default defineInterface({
},
],
recommendedDisplays: ['labels'],
preview: PreviewSVG,
});

View File

@@ -0,0 +1,10 @@
<svg width="156" height="96" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="58.25" y="36" width="70" height="6" rx="2" fill="var(--primary)"/>
<path d="M47.324 33.75h-8.148c-.657 0-1.176.52-1.176 1.176v8.148c0 .657.52 1.176 1.176 1.176h8.148c.657 0 1.176-.52 1.176-1.176v-8.148c0-.657-.52-1.176-1.176-1.176Zm0 9.324h-8.148v-8.148h8.148v8.148Zm-.574-5.824-.82-.82-3.856 3.828-1.504-1.504-.82.848 2.324 2.324 4.676-4.676Z" fill="var(--primary)"/>
<rect x="58.25" y="72" width="50" height="6" rx="2" fill="var(--primary)"/>
<path d="M47.324 69.75h-8.148c-.657 0-1.176.52-1.176 1.176v8.148c0 .657.52 1.176 1.176 1.176h8.148c.657 0 1.176-.52 1.176-1.176v-8.148c0-.657-.52-1.176-1.176-1.176Zm0 9.324h-8.148v-8.148h8.148v8.148Zm-.574-5.824-.82-.82-3.856 3.828-1.504-1.504-.82.848 2.324 2.324 4.676-4.676Z" fill="var(--primary)"/>
<rect x="48.25" y="54" width="60" height="6" rx="2" fill="var(--primary)" fill-opacity=".25"/>
<path d="M37.324 52.926v8.148h-8.148v-8.148h8.148Zm0-1.176h-8.148c-.656 0-1.176.52-1.176 1.176v8.148c0 .657.52 1.176 1.176 1.176h8.148c.657 0 1.176-.52 1.176-1.176v-8.148c0-.657-.52-1.176-1.176-1.176Z" fill="var(--primary)" fill-opacity=".25"/>
<rect x="48.5" y="18.25" width="50" height="6" rx="2" fill="var(--primary)"/>
<path d="M37.574 16h-8.148c-.656 0-1.176.52-1.176 1.176v8.148c0 .656.52 1.176 1.176 1.176h8.148c.657 0 1.176-.52 1.176-1.176v-8.148c0-.656-.52-1.176-1.176-1.176Zm0 9.324h-8.148v-8.148h8.148v8.148ZM37 19.5l-.82-.82-3.856 3.828-1.504-1.504-.82.848 2.324 2.324L37 19.5Z" fill="var(--primary)"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB