New version of wiki pages

This commit is contained in:
DrMint 2022-06-02 16:13:37 +02:00
parent 7403988c42
commit 734654988f
24 changed files with 318 additions and 133 deletions

56
package-lock.json generated
View File

@ -11,7 +11,8 @@
"dependencies": {
"@strapi/plugin-graphql": "4.1.11",
"@strapi/strapi": "4.1.11",
"sqlite3": "5.0.8"
"sqlite3": "5.0.8",
"strapi-plugin-meilisearch": "^0.6.4"
},
"engines": {
"node": ">=12.x.x <=16.x.x",
@ -6303,6 +6304,14 @@
"yarn": ">=1"
}
},
"node_modules/cross-fetch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"dependencies": {
"node-fetch": "2.6.7"
}
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -11190,6 +11199,14 @@
"node": ">= 0.6"
}
},
"node_modules/meilisearch": {
"version": "0.25.1",
"resolved": "https://registry.npmjs.org/meilisearch/-/meilisearch-0.25.1.tgz",
"integrity": "sha512-20jO0pK9BhghxHSkOLbdoYn58h/Z0PNL3JQcRq7ipNIeqrxkAetCZZ6ttJC3uxcz0jVglmiFoSXu3Z/lEOLOLQ==",
"dependencies": {
"cross-fetch": "^3.1.5"
}
},
"node_modules/memfs": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz",
@ -15179,6 +15196,18 @@
"ci-info": "^3.1.1"
}
},
"node_modules/strapi-plugin-meilisearch": {
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/strapi-plugin-meilisearch/-/strapi-plugin-meilisearch-0.6.4.tgz",
"integrity": "sha512-ajlulIF/HffbnUiUOd10FSIiqlsKDFXRinHIPI73fbLjNnLXNgnnkXgwsGiH1FprnL+VO7afWd6Vowmya3Bbpw==",
"dependencies": {
"@strapi/utils": "^4.1.9",
"meilisearch": "^0.25.1"
},
"engines": {
"npm": ">=6.0.0"
}
},
"node_modules/stream-browserify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
@ -21874,6 +21903,14 @@
"cross-spawn": "^7.0.1"
}
},
"cross-fetch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"requires": {
"node-fetch": "2.6.7"
}
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -25505,6 +25542,14 @@
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"meilisearch": {
"version": "0.25.1",
"resolved": "https://registry.npmjs.org/meilisearch/-/meilisearch-0.25.1.tgz",
"integrity": "sha512-20jO0pK9BhghxHSkOLbdoYn58h/Z0PNL3JQcRq7ipNIeqrxkAetCZZ6ttJC3uxcz0jVglmiFoSXu3Z/lEOLOLQ==",
"requires": {
"cross-fetch": "^3.1.5"
}
},
"memfs": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz",
@ -28557,6 +28602,15 @@
"ci-info": "^3.1.1"
}
},
"strapi-plugin-meilisearch": {
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/strapi-plugin-meilisearch/-/strapi-plugin-meilisearch-0.6.4.tgz",
"integrity": "sha512-ajlulIF/HffbnUiUOd10FSIiqlsKDFXRinHIPI73fbLjNnLXNgnnkXgwsGiH1FprnL+VO7afWd6Vowmya3Bbpw==",
"requires": {
"@strapi/utils": "^4.1.9",
"meilisearch": "^0.25.1"
}
},
"stream-browserify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",

View File

@ -12,7 +12,8 @@
"dependencies": {
"@strapi/plugin-graphql": "4.1.11",
"@strapi/strapi": "4.1.11",
"sqlite3": "5.0.8"
"sqlite3": "5.0.8",
"strapi-plugin-meilisearch": "^0.6.4"
},
"author": {
"name": "A Strapi developer"

View File

@ -34,14 +34,6 @@
"type": "relation",
"relation": "oneToOne",
"target": "api::glossary-item-type.glossary-item-type"
},
"thumbnail": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
}
}
}

View File

@ -1,26 +0,0 @@
{
"kind": "collectionType",
"collectionName": "wiki_page_types",
"info": {
"singularName": "wiki-page-type",
"pluralName": "wiki-page-types",
"displayName": "🟥 Wiki Page Types",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"slug": {
"type": "string",
"regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
"unique": true,
"required": true
},
"titles": {
"type": "component",
"repeatable": true,
"component": "translations.simple-title"
}
}
}

View File

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

View File

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

View File

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

View File

@ -25,16 +25,24 @@
"images"
]
},
"wiki_set": {
"displayName": "wiki_set",
"Aspects": {
"type": "dynamiczone",
"components": [
"wiki-specialization.chronology",
"wiki-specialization.glossary-item",
"wiki-specialization.weapon"
]
},
"categories": {
"type": "relation",
"relation": "oneToMany",
"target": "api::category.category"
},
"translations": {
"displayName": "Wiki",
"type": "component",
"repeatable": true,
"component": "sets.wiki-set"
},
"type": {
"type": "relation",
"relation": "oneToOne",
"target": "api::wiki-page-type.wiki-page-type"
"component": "translations.wiki"
}
}
}

View File

@ -0,0 +1,15 @@
{
"collectionName": "components_collections_component_aliases",
"info": {
"displayName": "Aliases",
"icon": "arrow-circle-right",
"description": ""
},
"options": {},
"attributes": {
"alias": {
"type": "string",
"required": true
}
}
}

View File

@ -0,0 +1,45 @@
{
"collectionName": "components_collections_component_bodies",
"info": {
"displayName": "body",
"icon": "align-left",
"description": ""
},
"options": {},
"attributes": {
"source_language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"status": {
"type": "enumeration",
"enum": [
"Incomplete",
"Draft",
"Review",
"Done"
],
"default": "Incomplete",
"required": true
},
"body": {
"type": "richtext"
},
"authors": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"translators": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"proofreaders": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
}
}
}

View File

@ -1,13 +0,0 @@
{
"collectionName": "components_page_builder_component_panes",
"info": {
"displayName": "Pane",
"icon": "poll-h"
},
"options": {},
"attributes": {
"text": {
"type": "richtext"
}
}
}

View File

@ -1,14 +0,0 @@
{
"collectionName": "components_page_builder_component_tabs",
"info": {
"displayName": "Tab",
"icon": "folder-plus",
"description": ""
},
"options": {},
"attributes": {
"text": {
"type": "richtext"
}
}
}

View File

@ -13,11 +13,6 @@
"max": 10,
"required": true,
"default": 1
},
"panes": {
"type": "component",
"repeatable": true,
"component": "page-builder-component.pane"
}
}
}

View File

@ -6,12 +6,5 @@
"description": ""
},
"options": {},
"attributes": {
"tabs": {
"displayName": "tab",
"type": "component",
"repeatable": true,
"component": "page-builder-component.tab"
}
}
"attributes": {}
}

View File

@ -1,14 +0,0 @@
{
"collectionName": "components_page_builder_texts",
"info": {
"displayName": "Text",
"icon": "align-left",
"description": ""
},
"options": {},
"attributes": {
"text": {
"type": "richtext"
}
}
}

View File

@ -40,11 +40,6 @@
"relation": "oneToOne",
"target": "api::language.language"
},
"authors": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"translators": {
"type": "relation",
"relation": "oneToMany",

View File

@ -15,9 +15,6 @@
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"note": {
"type": "text"
},
@ -31,6 +28,9 @@
],
"default": "Done",
"required": true
},
"description": {
"type": "richtext"
}
}
}

View File

@ -41,6 +41,21 @@
],
"default": "Incomplete",
"required": true
},
"translators": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"proofreaders": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"source_language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
}
}
}

View File

@ -0,0 +1,37 @@
{
"collectionName": "components_translations_wiki_posts",
"info": {
"displayName": "wiki-post",
"icon": "outdent"
},
"options": {},
"attributes": {
"language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"source_language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"status": {
"type": "enumeration",
"enum": [
"Incomplete",
"Draft",
"Review",
"Done"
],
"default": "Incomplete",
"required": true
},
"summary": {
"type": "text"
},
"body": {
"type": "richtext"
}
}
}

View File

@ -0,0 +1,35 @@
{
"collectionName": "components_translations_wikis",
"info": {
"displayName": "Wiki",
"icon": "swatchbook",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"aliases": {
"displayName": "Aliases",
"type": "component",
"repeatable": true,
"component": "collections-component.aliases"
},
"body": {
"displayName": "body",
"type": "component",
"repeatable": false,
"component": "collections-component.body"
},
"summary": {
"type": "text"
},
"language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
}
}
}

View File

@ -0,0 +1,30 @@
{
"collectionName": "components_wiki_specialization_chronologies",
"info": {
"displayName": "Chronology Event",
"icon": "history",
"description": ""
},
"options": {},
"attributes": {
"translations": {
"type": "component",
"repeatable": true,
"component": "translations.chronology-item"
},
"source": {
"type": "relation",
"relation": "oneToOne",
"target": "api::source.source"
},
"date": {
"type": "component",
"repeatable": false,
"component": "basics.datepicker",
"required": true
},
"displayed_date": {
"type": "string"
}
}
}

View File

@ -0,0 +1,21 @@
{
"collectionName": "components_wiki_specialization_glossary_items",
"info": {
"displayName": "Glossary Definition",
"icon": "ad",
"description": ""
},
"options": {},
"attributes": {
"translations": {
"type": "component",
"repeatable": true,
"component": "translations.glossary-definition"
},
"source": {
"type": "relation",
"relation": "oneToOne",
"target": "api::source.source"
}
}
}

View File

@ -0,0 +1,22 @@
{
"collectionName": "components_wiki_specialization_posts",
"info": {
"displayName": "Post",
"icon": "book-reader",
"description": ""
},
"options": {},
"attributes": {
"translations": {
"displayName": "wiki-post",
"type": "component",
"repeatable": true,
"component": "translations.wiki-post"
},
"authors": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
}
}
}

View File

@ -0,0 +1,21 @@
{
"collectionName": "components_wiki_specialization_weapons",
"info": {
"displayName": "Weapon Story",
"icon": "tools",
"description": ""
},
"options": {},
"attributes": {
"translations": {
"type": "component",
"repeatable": true,
"component": "translations.weapon-story-story"
},
"source": {
"type": "relation",
"relation": "oneToOne",
"target": "api::source.source"
}
}
}