Added more types for library item + thumbs for content

This commit is contained in:
DrMint 2022-02-08 05:51:22 +01:00
parent db7d5ff083
commit 1b2422bd9b
12 changed files with 136 additions and 1 deletions

View File

@ -57,6 +57,13 @@
"type": "component", "type": "component",
"repeatable": true, "repeatable": true,
"component": "sets.audio-set" "component": "sets.audio-set"
},
"thumbnail": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false
} }
} }
} }

View File

@ -74,7 +74,9 @@
"metadata.books", "metadata.books",
"metadata.video", "metadata.video",
"metadata.game", "metadata.game",
"metadata.audio" "metadata.audio",
"metadata.merch",
"metadata.other"
], ],
"max": 1 "max": 1
}, },

View File

@ -0,0 +1,20 @@
{
"kind": "collectionType",
"collectionName": "merch_items",
"info": {
"singularName": "merch-item",
"pluralName": "merch-items",
"displayName": "Merch Items"
},
"options": {
"draftAndPublish": false
},
"attributes": {
"slug": {
"type": "string",
"required": true,
"unique": true,
"regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
}
}
}

View File

@ -0,0 +1,9 @@
'use strict';
/**
* merch-item controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::merch-item.merch-item');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* merch-item router.
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::merch-item.merch-item');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* merch-item service.
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::merch-item.merch-item');

View File

@ -0,0 +1,21 @@
{
"kind": "collectionType",
"collectionName": "other_subtypes",
"info": {
"singularName": "other-subtype",
"pluralName": "other-subtypes",
"displayName": "Other Subtypes",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"slug": {
"type": "string",
"required": true,
"unique": true,
"regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
}
}
}

View File

@ -0,0 +1,9 @@
'use strict';
/**
* other-subtype controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::other-subtype.other-subtype');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* other-subtype router.
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::other-subtype.other-subtype');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* other-subtype service.
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::other-subtype.other-subtype');

View File

@ -0,0 +1,15 @@
{
"collectionName": "components_metadata_merches",
"info": {
"displayName": "Merch",
"icon": "gift"
},
"options": {},
"attributes": {
"merch_item": {
"type": "relation",
"relation": "oneToOne",
"target": "api::merch-item.merch-item"
}
}
}

View File

@ -0,0 +1,16 @@
{
"collectionName": "components_metadata_others",
"info": {
"displayName": "Other",
"icon": "apple-alt",
"description": ""
},
"options": {},
"attributes": {
"subtype": {
"type": "relation",
"relation": "oneToOne",
"target": "api::other-subtype.other-subtype"
}
}
}