Skip to content

Commit

Permalink
Fix presentation-links interfaces (directus#9485)
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten authored and Armen Danielyan committed Nov 9, 2021
1 parent 877be2d commit 78ee43e
Showing 1 changed file with 63 additions and 51 deletions.
114 changes: 63 additions & 51 deletions app/src/interfaces/presentation-links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,74 @@ export default defineInterface({
group: 'presentation',
options: ({ collection }: ExtensionsOptionsContext) => [
{
field: 'label',
type: 'string',
name: '$t:label',
field: 'links',
name: '$t:interfaces.presentation-links.links',
type: 'json',
meta: {
width: 'full',
interface: 'input',
interface: 'list',
options: {
placeholder: '$t:label',
},
},
},
{
field: 'icon',
name: '$t:icon',
type: 'string',
meta: {
width: 'half',
interface: 'select-icon',
},
},
{
field: 'type',
name: '$t:type',
type: 'string',
meta: {
width: 'half',
interface: 'select-dropdown',
default_value: 'normal',
options: {
choices: [
{ text: '$t:primary', value: 'primary' },
{ text: '$t:normal', value: 'normal' },
{ text: '$t:info', value: 'info' },
{ text: '$t:success', value: 'success' },
{ text: '$t:warning', value: 'warning' },
{ text: '$t:danger', value: 'danger' },
fields: [
{
field: 'label',
type: 'string',
name: '$t:label',
meta: {
width: 'full',
interface: 'input',
options: {
placeholder: '$t:label',
},
},
},
{
field: 'icon',
name: '$t:icon',
type: 'string',
meta: {
width: 'half',
interface: 'select-icon',
},
},
{
field: 'type',
name: '$t:type',
type: 'string',
meta: {
width: 'half',
interface: 'select-dropdown',
default_value: 'normal',
options: {
choices: [
{ text: '$t:primary', value: 'primary' },
{ text: '$t:normal', value: 'normal' },
{ text: '$t:info', value: 'info' },
{ text: '$t:success', value: 'success' },
{ text: '$t:warning', value: 'warning' },
{ text: '$t:danger', value: 'danger' },
],
},
},
schema: {
default_value: 'normal',
},
},
{
field: 'url',
type: 'string',
name: '$t:url',
meta: {
width: 'full',
interface: 'system-display-template',
options: {
collectionName: collection,
font: 'monospace',
placeholder: 'https://example.com/articles/{{ id }}/{{ slug }}',
},
},
},
],
},
},
schema: {
default_value: 'normal',
},
},
{
field: 'url',
type: 'string',
name: '$t:url',
meta: {
width: 'full',
interface: 'system-display-template',
options: {
collectionName: collection,
font: 'monospace',
placeholder: 'https://example.com/articles/{{ id }}/{{ slug }}',
},
},
},
],
});

0 comments on commit 78ee43e

Please sign in to comment.