add image attribution field
This commit is contained in:
parent
8a28b7ae94
commit
2efd7887c9
4 changed files with 37 additions and 0 deletions
|
|
@ -36,6 +36,11 @@
|
||||||
"global.copy",
|
"global.copy",
|
||||||
"global.media"
|
"global.media"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"image_attribution": {
|
||||||
|
"type": "component",
|
||||||
|
"component": "global.link",
|
||||||
|
"repeatable": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
18
src/components/global/link.json
Normal file
18
src/components/global/link.json
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"collectionName": "components_global_links",
|
||||||
|
"info": {
|
||||||
|
"displayName": "Link",
|
||||||
|
"icon": "exit"
|
||||||
|
},
|
||||||
|
"options": {},
|
||||||
|
"attributes": {
|
||||||
|
"text": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"regex": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {}
|
||||||
|
}
|
||||||
13
types/generated/components.d.ts
vendored
13
types/generated/components.d.ts
vendored
|
|
@ -23,6 +23,18 @@ export interface GlobalDescriptiveList extends Struct.ComponentSchema {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface GlobalLink extends Struct.ComponentSchema {
|
||||||
|
collectionName: 'components_global_links';
|
||||||
|
info: {
|
||||||
|
displayName: 'Link';
|
||||||
|
icon: 'exit';
|
||||||
|
};
|
||||||
|
attributes: {
|
||||||
|
text: Schema.Attribute.String;
|
||||||
|
url: Schema.Attribute.String;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface GlobalMedia extends Struct.ComponentSchema {
|
export interface GlobalMedia extends Struct.ComponentSchema {
|
||||||
collectionName: 'components_global_media';
|
collectionName: 'components_global_media';
|
||||||
info: {
|
info: {
|
||||||
|
|
@ -53,6 +65,7 @@ declare module '@strapi/strapi' {
|
||||||
export interface ComponentSchemas {
|
export interface ComponentSchemas {
|
||||||
'global.copy': GlobalCopy;
|
'global.copy': GlobalCopy;
|
||||||
'global.descriptive-list': GlobalDescriptiveList;
|
'global.descriptive-list': GlobalDescriptiveList;
|
||||||
|
'global.link': GlobalLink;
|
||||||
'global.media': GlobalMedia;
|
'global.media': GlobalMedia;
|
||||||
'global.seo': GlobalSeo;
|
'global.seo': GlobalSeo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
types/generated/contentTypes.d.ts
vendored
1
types/generated/contentTypes.d.ts
vendored
|
|
@ -491,6 +491,7 @@ export interface ApiMosaicItemMosaicItem extends Struct.CollectionTypeSchema {
|
||||||
Schema.Attribute.Private;
|
Schema.Attribute.Private;
|
||||||
dl: Schema.Attribute.Component<'global.descriptive-list', true>;
|
dl: Schema.Attribute.Component<'global.descriptive-list', true>;
|
||||||
image: Schema.Attribute.Media<'images'>;
|
image: Schema.Attribute.Media<'images'>;
|
||||||
|
image_attribution: Schema.Attribute.Component<'global.link', false>;
|
||||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||||
localizations: Schema.Attribute.Relation<
|
localizations: Schema.Attribute.Relation<
|
||||||
'oneToMany',
|
'oneToMany',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue