add image attribution field

This commit is contained in:
nicwands 2026-06-16 13:50:35 -04:00
parent 8a28b7ae94
commit 2efd7887c9
4 changed files with 37 additions and 0 deletions

View file

@ -36,6 +36,11 @@
"global.copy", "global.copy",
"global.media" "global.media"
] ]
},
"image_attribution": {
"type": "component",
"component": "global.link",
"repeatable": false
} }
} }
} }

View 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": {}
}

View file

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

View file

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