mirror of
https://github.com/directus/directus.git
synced 2026-02-11 01:05:00 -05:00
Add localType to interfaces
This commit is contained in:
@@ -8,6 +8,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
icon: 'note_add',
|
||||
component: InterfaceFile,
|
||||
types: ['uuid'],
|
||||
localTypes: ['file'],
|
||||
relationship: 'm2o',
|
||||
options: [],
|
||||
recommendedDisplays: ['file'],
|
||||
|
||||
@@ -8,6 +8,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
icon: 'note_add',
|
||||
component: InterfaceFiles,
|
||||
types: ['alias'],
|
||||
localTypes: ['files'],
|
||||
relationship: 'm2m',
|
||||
options: [],
|
||||
recommendedDisplays: ['files'],
|
||||
|
||||
@@ -8,6 +8,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
icon: 'insert_photo',
|
||||
component: InterfaceImage,
|
||||
types: ['uuid'],
|
||||
localTypes: ['file'],
|
||||
relationship: 'm2o',
|
||||
options: [],
|
||||
recommendedDisplays: ['image'],
|
||||
|
||||
@@ -10,6 +10,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
component: InterfaceManyToMany,
|
||||
relationship: 'm2m',
|
||||
types: ['alias'],
|
||||
localTypes: ['m2m'],
|
||||
options: Options,
|
||||
recommendedDisplays: ['related-values'],
|
||||
}));
|
||||
|
||||
@@ -10,6 +10,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
component: InterfaceManyToOne,
|
||||
types: ['uuid', 'string', 'text', 'integer', 'bigInteger'],
|
||||
relationship: 'm2o',
|
||||
localTypes: ['m2o'],
|
||||
options: Options,
|
||||
recommendedDisplays: ['related-values'],
|
||||
}));
|
||||
|
||||
@@ -9,6 +9,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
icon: 'arrow_right_alt',
|
||||
component: InterfaceOneToMany,
|
||||
types: ['alias'],
|
||||
localTypes: ['o2m'],
|
||||
relationship: 'o2m',
|
||||
options: Options,
|
||||
recommendedDisplays: ['related-values'],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import VueI18n from 'vue-i18n';
|
||||
import { Component } from 'vue';
|
||||
import { Field, types } from '@/types';
|
||||
import { Field, types, localTypes } from '@/types';
|
||||
|
||||
export type InterfaceConfig = {
|
||||
id: string;
|
||||
@@ -10,6 +10,7 @@ export type InterfaceConfig = {
|
||||
component: Component;
|
||||
options: DeepPartial<Field>[] | Component;
|
||||
types: typeof types[number][];
|
||||
localTypes?: readonly typeof localTypes[number][];
|
||||
relationship?: null | 'm2o' | 'o2m' | 'm2m' | 'translations';
|
||||
hideLabel?: boolean;
|
||||
hideLoader?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user