From ffc7acade604655131382b46afedba43df7fa97e Mon Sep 17 00:00:00 2001 From: He4eT Date: Tue, 1 Apr 2025 15:05:57 +0200 Subject: [PATCH] Hackspace: add links --- .../content-types/hackspace/schema.json | 5 +++++ src/components/hackspace/link.json | 21 +++++++++++++++++++ types/generated/components.d.ts | 14 +++++++++++++ types/generated/contentTypes.d.ts | 1 + 4 files changed, 41 insertions(+) create mode 100644 src/components/hackspace/link.json diff --git a/src/api/hackspace/content-types/hackspace/schema.json b/src/api/hackspace/content-types/hackspace/schema.json index f0d8f1b..5de0ea3 100644 --- a/src/api/hackspace/content-types/hackspace/schema.json +++ b/src/api/hackspace/content-types/hackspace/schema.json @@ -57,6 +57,11 @@ "type": "component", "repeatable": true, "component": "hackspace.project" + }, + "links": { + "type": "component", + "repeatable": true, + "component": "hackspace.link" } } } diff --git a/src/components/hackspace/link.json b/src/components/hackspace/link.json new file mode 100644 index 0000000..2a3d489 --- /dev/null +++ b/src/components/hackspace/link.json @@ -0,0 +1,21 @@ +{ + "collectionName": "components_hackspace_links", + "info": { + "displayName": "Link", + "icon": "link" + }, + "options": {}, + "attributes": { + "name": { + "type": "string", + "required": true + }, + "description": { + "type": "text" + }, + "url": { + "type": "string", + "required": true + } + } +} diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index 189c741..6baa757 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -86,6 +86,19 @@ export interface HackspaceKeymaster extends Struct.ComponentSchema { }; } +export interface HackspaceLink extends Struct.ComponentSchema { + collectionName: 'components_hackspace_links'; + info: { + displayName: 'Link'; + icon: 'link'; + }; + attributes: { + description: Schema.Attribute.Text; + name: Schema.Attribute.String & Schema.Attribute.Required; + url: Schema.Attribute.String & Schema.Attribute.Required; + }; +} + export interface HackspaceLocation extends Struct.ComponentSchema { collectionName: 'components_hackspace_locations'; info: { @@ -163,6 +176,7 @@ declare module '@strapi/strapi' { 'hackspace.feed': HackspaceFeed; 'hackspace.feed-list': HackspaceFeedList; 'hackspace.keymaster': HackspaceKeymaster; + 'hackspace.link': HackspaceLink; 'hackspace.location': HackspaceLocation; 'hackspace.project': HackspaceProject; 'hackspace.spacefed': HackspaceSpacefed; diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 63ef674..d256536 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -416,6 +416,7 @@ export interface ApiHackspaceHackspace extends Struct.SingleTypeSchema { createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private; feeds: Schema.Attribute.Component<'hackspace.feed-list', false>; + links: Schema.Attribute.Component<'hackspace.link', true>; locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation< 'oneToMany',