strapi-plugin-comments 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -57
- package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +15 -15
- package/admin/src/translations/es.json +192 -0
- package/admin/src/translations/index.d.ts +1 -1
- package/admin/src/translations/index.js +5 -3
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -1
package/README.md
CHANGED
|
@@ -5,22 +5,16 @@
|
|
|
5
5
|
<h1>Strapi v4 - Comments plugin</h1>
|
|
6
6
|
<p>Powerful Strapi based comments moderation tool for you and your users</p>
|
|
7
7
|
<a href="https://www.npmjs.org/package/strapi-plugin-comments">
|
|
8
|
-
<img alt="GitHub package.json version" src="https://img.shields.io/github/package-json/v/VirtusLab-Open-Source/strapi-plugin-comments?label=npm&logo=npm">
|
|
8
|
+
<img alt="GitHub package.json version" src="https://img.shields.io/github/package-json/v/VirtusLab-Open-Source/strapi-plugin-comments/strapi-v4?label=npm&logo=npm">
|
|
9
9
|
</a>
|
|
10
10
|
<a href="https://www.npmjs.org/package/strapi-plugin-comments">
|
|
11
11
|
<img src="https://img.shields.io/npm/dm/strapi-plugin-comments.svg" alt="Monthly download on NPM" />
|
|
12
12
|
</a>
|
|
13
13
|
<a href="https://circleci.com/gh/VirtusLab-Open-Source/strapi-plugin-comments">
|
|
14
|
-
<img src="https://circleci.com/gh/VirtusLab-Open-Source/strapi-plugin-comments.svg?style=shield" alt="CircleCI" />
|
|
14
|
+
<img src="https://circleci.com/gh/VirtusLab-Open-Source/strapi-plugin-comments/tree/strapi-v4.svg?style=shield" alt="CircleCI" />
|
|
15
15
|
</a>
|
|
16
16
|
<a href="https://codecov.io/gh/VirtusLab-Open-Source/strapi-plugin-comments">
|
|
17
|
-
<img src="https://codecov.io/gh/VirtusLab-Open-Source/strapi-plugin-comments/coverage.svg?branch=
|
|
18
|
-
</a>
|
|
19
|
-
<a href="https://sharing.clickup.com/tl/xhcmx-83/strapiv-4-comments-roadmap">
|
|
20
|
-
<img src="https://img.shields.io/website?down_message=roadmap&label=product&up_message=roadmap&url=https%3A%2F%2Fsharing.clickup.com%2Ftl%2Fxhcmx-83%2Fstrapiv-4-comments-roadmap" />
|
|
21
|
-
</a>
|
|
22
|
-
<a href="https://sharing.clickup.com/b/xhcmx-63/strapiv-4-comments-board">
|
|
23
|
-
<img src="https://img.shields.io/website?down_message=board&label=product&up_color=blue&up_message=board&url=https%3A%2F%2Fsharing.clickup.com%2Fb%2Fxhcmx-63%2Fstrapiv-4-comments-board" />
|
|
17
|
+
<img src="https://codecov.io/gh/VirtusLab-Open-Source/strapi-plugin-comments/coverage.svg?branch=strapi-v4" alt="codecov.io" />
|
|
24
18
|
</a>
|
|
25
19
|
</div>
|
|
26
20
|
|
|
@@ -34,33 +28,38 @@ A plugin for [Strapi Headless CMS](https://github.com/strapi/strapi) that provid
|
|
|
34
28
|
|
|
35
29
|
### Table of Contents
|
|
36
30
|
|
|
37
|
-
1. [
|
|
38
|
-
2. [
|
|
39
|
-
3. [
|
|
40
|
-
4. [
|
|
31
|
+
1. [💎 Versions](#-versions)
|
|
32
|
+
2. [✨ Features](#-features)
|
|
33
|
+
3. [⏳ Installation](#-installation)
|
|
34
|
+
4. [🖐 Requirements](#-requirements)
|
|
35
|
+
5. [🔧 Configuration](#-configuration)
|
|
41
36
|
- [Settings page](#in-v203-and-newer)
|
|
42
37
|
- [Plugin file](#in-v202-and-older--default-configuration-state-for-v203-and-newer)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
6. [🕸️ Public API - REST](#%EF%B8%8F-public-rest-api-specification)
|
|
39
|
+
7. [🕸️ Public API - GraphQL](#%EF%B8%8F-public-graphql-specification)
|
|
40
|
+
8. [🌿 Model lifecycle hooks](#model-life-cycle-hooks)
|
|
41
|
+
9. [⚗️ Custom fields](#-custom-fields)
|
|
42
|
+
10. [🧩 Examples](#-examples)
|
|
43
|
+
11. [💬 FAQ](#-faq)
|
|
44
|
+
12. [🤝 Contributing](#-contributing)
|
|
45
|
+
13. [👨💻 Community support](#-community-support)
|
|
46
|
+
|
|
47
|
+
## 💎 Versions
|
|
48
|
+
|
|
49
|
+
- **Strapi v5** - [v3.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-comments)
|
|
50
|
+
- **Strapi v4** - (current) [v2.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-comments/tree/strapi-v4)
|
|
51
|
+
- **Strapi v3** - [v1.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-comments/tree/strapi-v3)
|
|
48
52
|
|
|
49
53
|
## ✨ Features
|
|
50
54
|
|
|
51
55
|
- **Comments Public REST + GraphQL API:** Elegant, entirely customizable and a fully extensible admin panel.
|
|
52
56
|
- **Strapi & generic users:** Support for built-in & also generic non-Strapi users that might be the comments authors.
|
|
53
|
-
- **Strapi Custom Fields support:** Improve an experience of your Content Types by using [dedicated set of custom fields](https://docs-
|
|
57
|
+
- **Strapi Custom Fields support:** Improve an experience of your Content Types by using [dedicated set of custom fields](https://docs-v4.strapi.io/dev-docs/custom-fields) for each of them and automate client side processing of Comments.
|
|
54
58
|
- **Any Content Type relation:** Comments can be linked to any of your Content Types by default. Simply, you're controlling it.
|
|
55
59
|
- **Moderation Panel:** Search & Filter through the bucket with your auditory comments. Manage them by blocking single ones or full threads. All in combined list & hierarchical tree view of threads.
|
|
56
60
|
- **Automated Bad Words filtering:** By default end users are not allowed to post abusing comments where bad words have been used.
|
|
57
61
|
- **Abuse Reporting & Reviewing:** Don't allow inferior language, react to reports from your community, send email notifications about issued reports
|
|
58
62
|
|
|
59
|
-
## ⚙️ Versions
|
|
60
|
-
|
|
61
|
-
- **Strapi v4** - (current) - [v2.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-comments)
|
|
62
|
-
- **Strapi v3** - [v1.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-comments/tree/strapi-v3)
|
|
63
|
-
|
|
64
63
|
## ⏳ Installation
|
|
65
64
|
|
|
66
65
|
### Via Strapi Marketplace
|
|
@@ -123,7 +122,7 @@ All done. Enjoy 🎉
|
|
|
123
122
|
|
|
124
123
|
## 🖐 Requirements
|
|
125
124
|
|
|
126
|
-
Complete installation requirements are exact same as for Strapi itself and can be found in the documentation under [Installation Requirements](https://docs.strapi.io/
|
|
125
|
+
Complete installation requirements are exact same as for Strapi itself and can be found in the documentation under [Installation Requirements](https://docs-v4.strapi.io/dev-docs/intro).
|
|
127
126
|
|
|
128
127
|
**Minimum environment requirements**
|
|
129
128
|
|
|
@@ -134,10 +133,10 @@ In our minimum support we're following [official Node.js releases timelines](htt
|
|
|
134
133
|
|
|
135
134
|
**Supported Strapi versions**:
|
|
136
135
|
|
|
137
|
-
- Strapi v4.
|
|
136
|
+
- Strapi v4.25.x (recently tested)
|
|
138
137
|
- Strapi v4.x
|
|
139
138
|
|
|
140
|
-
> This plugin is designed for **Strapi v4
|
|
139
|
+
> This plugin is designed for **Strapi v4**. To get support for other Strapi versions, please follow the [versions](#-versions) section.
|
|
141
140
|
|
|
142
141
|
**Plugin dependencies**
|
|
143
142
|
- `@strapi/plugin-graphql` - required to run because built-in support for GraphQL handled by this plugin
|
|
@@ -193,7 +192,7 @@ module.exports = ({ env }) => ({
|
|
|
193
192
|
|
|
194
193
|
- `enabledCollections` - list of Collection and Single Types for which plugin should be enabled in format like `'api::<collection name>.<content type name>'`. By default it's empty and none comments are not enabled for any of type in Strapi.
|
|
195
194
|
- `no-profanity` - Enabled support for [profanity filtering](https://www.npmjs.com/package/no-profanity). Can be turned off or altered using the [options reference](https://www.npmjs.com/package/no-profanity?activeTab=readme#options). Default value: `true`.
|
|
196
|
-
- `moderatorRoles` - Optional list of names of roles. Users with those roles will be notified by email when a new abuse report is created. This feature requires a built-in [Strapi email plugin](https://docs.strapi.io/
|
|
195
|
+
- `moderatorRoles` - Optional list of names of roles. Users with those roles will be notified by email when a new abuse report is created. This feature requires a built-in [Strapi email plugin](https://docs-v4.strapi.io/dev-docs/plugins/email) configured.
|
|
197
196
|
- `approvalFlow` - list of Content Types which are supporting approval flow. Values must be in format like `'api::<collection name>.<content type name>'`. For not included, posted comments are going to be immediately visible.
|
|
198
197
|
- `entryLabel` - ordered list of property names per Content Type to generate related entity label. Keys must be in format like `'api::<collection name>.<content type name>'`. Default formatting set as `*`.
|
|
199
198
|
- `reportReasons` - set of enums you would like to use for issuing abuse reports. Provided by default `'BAD_LANGUAGE'`, `'DISCRIMINATION'` and `'OTHER'`.
|
|
@@ -202,7 +201,7 @@ module.exports = ({ env }) => ({
|
|
|
202
201
|
|
|
203
202
|
## Additional GQL Configuration
|
|
204
203
|
|
|
205
|
-
All you need to do is to install and enable `@strapi/plugin-graphql` for you instance based on the **[official Strapi v4 docs](https://docs.strapi.io/
|
|
204
|
+
All you need to do is to install and enable `@strapi/plugin-graphql` for you instance based on the **[official Strapi v4 docs](https://docs-v4.strapi.io/dev-docs/plugins/graphql#configurations)** and decide if you would like to call it by anyone (open for world) or only by authenticated users (Strapi users).
|
|
206
205
|
|
|
207
206
|
> **Important!**
|
|
208
207
|
> If you're using `config/plugins.js` to configure your plugins , please put `comments` property before `graphql`. Otherwise types are not going to be properly added to GraphQL Schema. That's because of dynamic types which base on plugin configuration which are added on `boostrap` stage, not `register`. This is not valid if you're using `graphql` plugin without any custom configuration, so most of cases in real.
|
|
@@ -315,8 +314,8 @@ Return a hierarchical tree structure of comments for specified instance of Conte
|
|
|
315
314
|
|
|
316
315
|
#### Strapi REST API properties support:
|
|
317
316
|
|
|
318
|
-
- [field selection](https://docs.strapi.io/
|
|
319
|
-
- [sorting](https://docs.strapi.io/
|
|
317
|
+
- [field selection](https://docs-v4.strapi.io/dev-docs/api/rest/populate-select#field-selection)
|
|
318
|
+
- [sorting](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#sorting)
|
|
320
319
|
|
|
321
320
|
### Get Comments (flat structure)
|
|
322
321
|
|
|
@@ -356,10 +355,10 @@ Return a flat structure of comments for specified instance of Content Type like
|
|
|
356
355
|
|
|
357
356
|
#### Strapi REST API properties support:
|
|
358
357
|
|
|
359
|
-
- [filtering](https://docs.strapi.io/
|
|
360
|
-
- [field selection](https://docs.strapi.io/
|
|
361
|
-
- [sorting](https://docs.strapi.io/
|
|
362
|
-
- [pagination](https://docs.strapi.io/
|
|
358
|
+
- [filtering](https://docs-v4.strapi.io/dev-docs/api/rest/filters-locale-publication#filtering)
|
|
359
|
+
- [field selection](https://docs-v4.strapi.io/dev-docs/api/rest/populate-select#field-selection)
|
|
360
|
+
- [sorting](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#sorting)
|
|
361
|
+
- [pagination](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#pagination)
|
|
363
362
|
|
|
364
363
|
### Get Comments (by Author)
|
|
365
364
|
|
|
@@ -406,10 +405,10 @@ To skip a field from the response you can use a query param called `omit`. It is
|
|
|
406
405
|
|
|
407
406
|
#### Strapi REST API properties support:
|
|
408
407
|
|
|
409
|
-
- [filtering](https://docs.strapi.io/
|
|
410
|
-
- [field selection](https://docs.strapi.io/
|
|
411
|
-
- [sorting](https://docs.strapi.io/
|
|
412
|
-
- [pagination](https://docs.strapi.io/
|
|
408
|
+
- [filtering](https://docs-v4.strapi.io/dev-docs/api/rest/filters-locale-publication#filtering)
|
|
409
|
+
- [field selection](https://docs-v4.strapi.io/dev-docs/api/rest/populate-select#field-selection)
|
|
410
|
+
- [sorting](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#sorting)
|
|
411
|
+
- [pagination](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#pagination)
|
|
413
412
|
|
|
414
413
|
### Post a Comment
|
|
415
414
|
|
|
@@ -634,7 +633,7 @@ query {
|
|
|
634
633
|
|
|
635
634
|
#### Strapi GraphQL API properties support:
|
|
636
635
|
|
|
637
|
-
- [sorting](https://docs.strapi.io/
|
|
636
|
+
- [sorting](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#sorting)
|
|
638
637
|
|
|
639
638
|
### Get Comments (flat structure)
|
|
640
639
|
|
|
@@ -685,9 +684,9 @@ query {
|
|
|
685
684
|
|
|
686
685
|
#### Strapi GraphQL API properties support:
|
|
687
686
|
|
|
688
|
-
- [filtering](https://docs.strapi.io/
|
|
689
|
-
- [sorting](https://docs.strapi.io/
|
|
690
|
-
- [pagination](https://docs.strapi.io/
|
|
687
|
+
- [filtering](https://docs-v4.strapi.io/dev-docs/api/rest/filters-locale-publication#filtering)
|
|
688
|
+
- [sorting](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#sorting)
|
|
689
|
+
- [pagination](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#pagination)
|
|
691
690
|
|
|
692
691
|
### Get Comments (by Author)
|
|
693
692
|
|
|
@@ -734,9 +733,9 @@ query {
|
|
|
734
733
|
|
|
735
734
|
#### Strapi GraphQL API properties support:
|
|
736
735
|
|
|
737
|
-
- [filtering](https://docs.strapi.io/
|
|
738
|
-
- [sorting](https://docs.strapi.io/
|
|
739
|
-
- [pagination](https://docs.strapi.io/
|
|
736
|
+
- [filtering](https://docs-v4.strapi.io/dev-docs/api/rest/filters-locale-publication#filtering)
|
|
737
|
+
- [sorting](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#sorting)
|
|
738
|
+
- [pagination](https://docs-v4.strapi.io/dev-docs/api/rest/sort-pagination#pagination)
|
|
740
739
|
|
|
741
740
|
### Post a Comment
|
|
742
741
|
|
|
@@ -935,13 +934,13 @@ Live example of plugin usage can be found in the [VirtusLab Strapi Examples](htt
|
|
|
935
934
|
|
|
936
935
|
For developers who upgrades their Strapi instance custom field from Comments plugin is available. Custom field can be picked from content types' edit page or added in definition file.
|
|
937
936
|
|
|
938
|
-
Read more about this feature in [Strapi's docs](https://docs-
|
|
937
|
+
Read more about this feature in [Strapi's docs](https://docs-v4.strapi.io/dev-docs/custom-fields).
|
|
939
938
|
|
|
940
939
|
## Model lifecycle hooks
|
|
941
940
|
|
|
942
941
|
Comments plugin allows to register lifecycle hooks for `Comment` and `Comment report` content types.
|
|
943
942
|
|
|
944
|
-
You can read more about lifecycle hooks [here](https://docs.strapi.io/dev-docs/backend-customization/models#lifecycle-hooks). (You can set a listener for all of the hooks).
|
|
943
|
+
You can read more about lifecycle hooks [here](https://docs-v4.strapi.io/dev-docs/backend-customization/models#lifecycle-hooks). (You can set a listener for all of the hooks).
|
|
945
944
|
|
|
946
945
|
Lifecycle hooks can be register either in `register()` or `bootstrap()` methods of your server. You can register more than one listener for a specified lifecycle hook. For example: you want to do three things on report creation and do not want to handle all of these actions in one big function. You can split logic in as many listeners as you want.
|
|
947
946
|
|
|
@@ -979,15 +978,6 @@ Example:
|
|
|
979
978
|
|
|
980
979
|
## 🤝 Contributing
|
|
981
980
|
|
|
982
|
-
<div>
|
|
983
|
-
<a href="https://sharing.clickup.com/tl/xhcmx-83/strapiv-4-comments-roadmap">
|
|
984
|
-
<img src="https://img.shields.io/website?down_message=roadmap&label=product&up_message=roadmap&url=https%3A%2F%2Fsharing.clickup.com%2Ftl%2Fxhcmx-83%2Fstrapiv-4-comments-roadmap" />
|
|
985
|
-
</a>
|
|
986
|
-
<a href="https://sharing.clickup.com/b/xhcmx-63/strapiv-4-comments-board">
|
|
987
|
-
<img src="https://img.shields.io/website?down_message=board&label=product&up_color=blue&up_message=board&url=https%3A%2F%2Fsharing.clickup.com%2Fb%2Fxhcmx-63%2Fstrapiv-4-comments-board" />
|
|
988
|
-
</a>
|
|
989
|
-
</div>
|
|
990
|
-
|
|
991
981
|
Feel free to fork and make a Pull Request to this plugin project. All the input is warmly welcome!
|
|
992
982
|
|
|
993
983
|
## 👨💻 Community support
|
|
@@ -26,27 +26,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
const prop_types_1 = __importDefault(require("prop-types"));
|
|
31
|
-
const react_intl_1 = require("react-intl");
|
|
32
|
-
const lodash_1 = require("lodash");
|
|
33
29
|
const Flex_1 = require("@strapi/design-system/Flex");
|
|
34
30
|
const IconButton_1 = require("@strapi/design-system/IconButton");
|
|
35
31
|
const Link_1 = require("@strapi/design-system/Link");
|
|
36
32
|
const Stack_1 = require("@strapi/design-system/Stack");
|
|
37
33
|
const Table_1 = require("@strapi/design-system/Table");
|
|
38
34
|
const Typography_1 = require("@strapi/design-system/Typography");
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
35
|
+
const lodash_1 = require("lodash");
|
|
36
|
+
const prop_types_1 = __importDefault(require("prop-types"));
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_intl_1 = require("react-intl");
|
|
39
|
+
const Avatar_1 = __importDefault(require("../../../../components/Avatar"));
|
|
43
40
|
const DiscussionThreadItemApprovalFlowActions_1 = __importDefault(require("../../../../components/DiscussionThreadItemApprovalFlowActions"));
|
|
44
|
-
const StatusBadge_1 = __importDefault(require("../../../../components/StatusBadge"));
|
|
45
|
-
const styles_2 = require("../../../../components/IconButton/styles");
|
|
46
41
|
const DiscussionThreadItemReviewAction_1 = __importDefault(require("../../../../components/DiscussionThreadItemReviewAction"));
|
|
47
|
-
const
|
|
48
|
-
const
|
|
42
|
+
const styles_1 = require("../../../../components/IconButton/styles");
|
|
43
|
+
const icons_1 = require("../../../../components/icons");
|
|
44
|
+
const StatusBadge_1 = __importDefault(require("../../../../components/StatusBadge"));
|
|
45
|
+
const utils_1 = require("../../../../utils");
|
|
46
|
+
const renderEntryTitle_1 = __importDefault(require("../../../../utils/renderEntryTitle"));
|
|
47
|
+
const styles_2 = require("./styles");
|
|
49
48
|
const mdRenderer_1 = __importDefault(require("../../../../components/PreviewWysiwyg/utils/mdRenderer"));
|
|
49
|
+
const satinizeHtml_1 = __importDefault(require("../../../../components/PreviewWysiwyg/utils/satinizeHtml"));
|
|
50
50
|
const DiscoverTableRow = ({ config, item, allowedActions: { canModerate, canAccessReports, canReviewReports }, onClick, }) => {
|
|
51
51
|
const { reports } = item;
|
|
52
52
|
const { formatDate } = (0, react_intl_1.useIntl)();
|
|
@@ -64,7 +64,7 @@ const DiscoverTableRow = ({ config, item, allowedActions: { canModerate, canAcce
|
|
|
64
64
|
},
|
|
65
65
|
}, status)));
|
|
66
66
|
};
|
|
67
|
-
const renderEntryUrl = (entry) => entry ? `/content-manager/
|
|
67
|
+
const renderEntryUrl = (entry) => entry ? `/content-manager/collection-types/${entry.uid}/${entry.id}` : null;
|
|
68
68
|
const renderDetailsUrl = (entry) => (0, utils_1.getUrl)(`discover/${entry.id}`);
|
|
69
69
|
const gotApprovalFlow = !(0, lodash_1.isNil)(item.approvalStatus);
|
|
70
70
|
const needsApproval = gotApprovalFlow && item.approvalStatus === "PENDING";
|
|
@@ -92,7 +92,7 @@ const DiscoverTableRow = ({ config, item, allowedActions: { canModerate, canAcce
|
|
|
92
92
|
id: "page.discover.table.cell.thread",
|
|
93
93
|
props: { id: threadOf.id },
|
|
94
94
|
}, "#" + threadOf.id))) : ("-")),
|
|
95
|
-
react_1.default.createElement(Table_1.Td, { style: { maxWidth: "15vw" } }, related ? (react_1.default.createElement(
|
|
95
|
+
react_1.default.createElement(Table_1.Td, { style: { maxWidth: "15vw" } }, related ? (react_1.default.createElement(styles_2.TableLink, { to: renderEntryUrl(related) }, (0, renderEntryTitle_1.default)(related, config))) : ("-")),
|
|
96
96
|
react_1.default.createElement(Table_1.Td, null,
|
|
97
97
|
react_1.default.createElement(Typography_1.Typography, { textColor: "neutral800" }, formatDate(updatedAt || createdAt, {
|
|
98
98
|
dateStyle: "long",
|
|
@@ -102,7 +102,7 @@ const DiscoverTableRow = ({ config, item, allowedActions: { canModerate, canAcce
|
|
|
102
102
|
react_1.default.createElement(Typography_1.Typography, { textColor: "neutral800" }, renderStatus(item))),
|
|
103
103
|
react_1.default.createElement(Table_1.Td, null,
|
|
104
104
|
react_1.default.createElement(Flex_1.Flex, { direction: "column", alignItems: "flex-end" },
|
|
105
|
-
react_1.default.createElement(
|
|
105
|
+
react_1.default.createElement(styles_1.IconButtonGroupStyled, { isSingle: !(reviewFlowEnabled || (canModerate && needsApproval)) },
|
|
106
106
|
canModerate && needsApproval && (react_1.default.createElement(DiscussionThreadItemApprovalFlowActions_1.default, { id: id, allowedActions: { canModerate } })),
|
|
107
107
|
react_1.default.createElement(DiscussionThreadItemReviewAction_1.default, { item: item, queryToInvalidate: "get-data", allowedActions: {
|
|
108
108
|
canModerate,
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugin.name": "Comentarios",
|
|
3
|
+
"plugin.section": "Plugin de Comentarios",
|
|
4
|
+
"plugin.section.item": "Configuración",
|
|
5
|
+
"common.button.back": "Volver",
|
|
6
|
+
"nav.header.moderation": "Moderación",
|
|
7
|
+
"nav.header.settings": "Configuración",
|
|
8
|
+
"nav.item.updates": "Actualizaciones",
|
|
9
|
+
"nav.item.discover": "Descubrir",
|
|
10
|
+
"nav.item.reports": "Informes",
|
|
11
|
+
"nav.item.settings": "Configuración",
|
|
12
|
+
"page.auth.noAccess": "Sin acceso",
|
|
13
|
+
"page.auth.not.allowed": "¡Oops! Parece que no tienes acceso a esta página...",
|
|
14
|
+
"page.common.item.status.OPEN": "Abierto",
|
|
15
|
+
"page.common.item.status.PENDING": "Pendiente",
|
|
16
|
+
"page.common.item.status.BLOCKED": "Bloqueado",
|
|
17
|
+
"page.common.item.status.APPROVED": "Aprobado",
|
|
18
|
+
"page.common.item.status.RESOLVED": "Resuelto",
|
|
19
|
+
"page.common.item.status.TO_REVIEW": "Por revisar ({count, number})",
|
|
20
|
+
"page.common.item.status.REJECTED": "Rechazado",
|
|
21
|
+
"page.common.item.status.REMOVED": "Eliminado por el autor",
|
|
22
|
+
"page.updates.header": "Actualizaciones recientes",
|
|
23
|
+
"page.discover.header": "Descubrir hilos",
|
|
24
|
+
"page.discover.header.count": "entradas encontradas",
|
|
25
|
+
"page.discover.table.header.id": "ID",
|
|
26
|
+
"page.discover.table.header.author": "Autor",
|
|
27
|
+
"page.discover.table.header.message": "Mensaje",
|
|
28
|
+
"page.discover.table.header.thread": "Hilo de",
|
|
29
|
+
"page.discover.table.header.entry": "Entrada",
|
|
30
|
+
"page.discover.table.header.lastUpdate": "Última actualización",
|
|
31
|
+
"page.discover.table.header.status": "Estado",
|
|
32
|
+
"page.discover.table.header.actions": "Acciones",
|
|
33
|
+
"page.discover.table.cell.thread": "Comentario #{id}",
|
|
34
|
+
"page.discover.table.action.display": "Mostrar",
|
|
35
|
+
"page.discover.table.action.reports": "Informes",
|
|
36
|
+
"page.discover.table.empty": "Todavía no tienes comentarios.",
|
|
37
|
+
"page.discover.table.empty.search": "No hay comentarios que coincidan con la búsqueda.",
|
|
38
|
+
"page.discover.table.filters": "Filtrado",
|
|
39
|
+
"page.discover.table.reports.review": "Revisar informes",
|
|
40
|
+
"page.reports.header": "Resolver informes",
|
|
41
|
+
"page.reports.table.empty": "Todavía no tienes informes.",
|
|
42
|
+
"page.reports.table.empty.search": "No hay informes que coincidan con la búsqueda.",
|
|
43
|
+
"page.reports.table.header.id": "ID",
|
|
44
|
+
"page.reports.table.header.reason": "Motivo",
|
|
45
|
+
"page.reports.table.header.content": "Contenido",
|
|
46
|
+
"page.reports.table.header.status": "Estado",
|
|
47
|
+
"page.reports.table.header.issueDate": "Fecha de emisión",
|
|
48
|
+
"page.reports.table.header.relatedComment": "Comentario relacionado",
|
|
49
|
+
"page.reports.table.header.actions": "Acciones",
|
|
50
|
+
"page.reports.table.cell.action.resolve": "resuelto",
|
|
51
|
+
"page.reports.table.cell.action.block": "Bloquear",
|
|
52
|
+
"page.details.header": "Panel de discusión",
|
|
53
|
+
"page.details.header.description": "Detalles y gestión de discusión relacionados con la entidad",
|
|
54
|
+
"page.details.panel.discussion": "Discusión",
|
|
55
|
+
"page.details.panel.discussion.nav.drilldown": "Ampliar",
|
|
56
|
+
"page.details.panel.discussion.nav.back": "Ir arriba",
|
|
57
|
+
"page.details.panel.discussion.warnings.reports.description": "informes abiertos",
|
|
58
|
+
"page.details.panel.discussion.warnings.reports.review": "Revisar",
|
|
59
|
+
"page.details.panel.discussion.warnings.reports.dialog.list": "Informes",
|
|
60
|
+
"page.details.panel.discussion.warnings.reports.dialog.header": "Moderación: Revisar informes abiertos",
|
|
61
|
+
"page.details.panel.discussion.warnings.reports.dialog.selectAll": "Seleccionar todas las entradas",
|
|
62
|
+
"page.details.panel.discussion.warnings.reports.dialog.select": "Seleccionar entidad",
|
|
63
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason": "Motivo",
|
|
64
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason.BAD_LANGUAGE": "Lenguaje inapropiado",
|
|
65
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason.DISCRIMINATION": "Discriminación",
|
|
66
|
+
"page.details.panel.discussion.warnings.reports.dialog.reason.OTHER": "Otro",
|
|
67
|
+
"page.details.panel.discussion.warnings.reports.dialog.content": "Contenido",
|
|
68
|
+
"page.details.panel.discussion.warnings.reports.dialog.createdAt": "Fecha de emisión",
|
|
69
|
+
"page.details.panel.discussion.warnings.reports.dialog.status": "Estado",
|
|
70
|
+
"page.details.panel.discussion.warnings.reports.dialog.status.OPEN": "Abierto",
|
|
71
|
+
"page.details.panel.discussion.warnings.reports.dialog.status.RESOLVED": "Resuelto",
|
|
72
|
+
"page.details.panel.discussion.warnings.reports.dialog.actions": "Acciones",
|
|
73
|
+
"page.details.panel.discussion.warnings.reports.dialog.actions.resolve": "Resolver",
|
|
74
|
+
"page.details.panel.discussion.warnings.reports.dialog.actions.resolve.selected": "Resolver informes ({count})",
|
|
75
|
+
"page.details.panel.discussion.warnings.reports.dialog.confirmation.success": "El informe abierto ha sido resuelto",
|
|
76
|
+
"page.details.panel.discussion.warnings.reports.selected.dialog.confirmation.success": "Se han resuelto los informes abiertos",
|
|
77
|
+
"page.details.panel.discussion.warnings.comments.header": "Moderación: Revisar comentario denunciado",
|
|
78
|
+
"page.details.panel.discussion.status.blocked": "Bloqueado",
|
|
79
|
+
"page.details.panel.discussion.reply": "Responder",
|
|
80
|
+
"page.details.panel.discussion.reopen": "Reabrir",
|
|
81
|
+
"page.details.panel.discussion.send": "Enviar respuesta del moderador",
|
|
82
|
+
"page.details.actions.comment.post.confirmation": "El comentario ha sido publicado",
|
|
83
|
+
"page.details.actions.comment.update.confirmation": "El comentario ha sido actualizado",
|
|
84
|
+
"page.details.panel.entity": "Detalles de la entidad",
|
|
85
|
+
"page.details.panel.status": "La discusión está",
|
|
86
|
+
"page.details.panel.status.open": "Abierta",
|
|
87
|
+
"page.details.panel.status.blocked": "Bloqueada",
|
|
88
|
+
"page.details.panel.status.pending": "Pendiente",
|
|
89
|
+
"page.details.panel.loading": "Obteniendo entidad...",
|
|
90
|
+
"page.details.actions.comment.block": "Bloquear comentario",
|
|
91
|
+
"page.details.actions.comment.block.confirmation.header": "Moderación: Bloquear comentario",
|
|
92
|
+
"page.details.actions.comment.block.confirmation.description": "¿Realmente quieres bloquear este comentario?",
|
|
93
|
+
"page.details.actions.comment.block.confirmation.button.confirm": "Sí, bloquear",
|
|
94
|
+
"page.details.actions.comment.block.confirmation.success": "El comentario ha sido bloqueado",
|
|
95
|
+
"page.details.actions.comment.unblock": "Desbloquear comentario",
|
|
96
|
+
"page.details.actions.comment.unblock.confirmation.success": "El comentario ha sido desbloqueado",
|
|
97
|
+
"page.details.actions.comment.delete": "Eliminar comentario",
|
|
98
|
+
"page.details.actions.comment.delete.confirmation.success": "El comentario ha sido eliminado",
|
|
99
|
+
"page.details.actions.comment.reports.review": "Revisar",
|
|
100
|
+
"page.details.actions.thread.block": "Bloquear hilo",
|
|
101
|
+
"page.details.actions.thread.block.confirmation.header": "Moderación: Bloquear hilo",
|
|
102
|
+
"page.details.actions.thread.block.confirmation.description": "¿Realmente quieres bloquear todo el hilo? No se permitirán más discusiones.",
|
|
103
|
+
"page.details.actions.thread.block.confirmation.button.confirm": "Sí, bloquear",
|
|
104
|
+
"page.details.actions.thread.block.confirmation.success": "El hilo ha sido bloqueado",
|
|
105
|
+
"page.details.actions.thread.unblock": "Desbloquear hilo",
|
|
106
|
+
"page.details.actions.thread.unblock.confirmation.success": "El hilo ha sido desbloqueado",
|
|
107
|
+
"page.details.actions.thread.modal.start.thread": "Iniciar hilo",
|
|
108
|
+
"page.details.actions.thread.modal.update.comment": "Actualizar comentario",
|
|
109
|
+
"page.details.actions.comment.approve.confirmation.success": "El comentario ha sido aprobado",
|
|
110
|
+
"page.details.actions.comment.reject.confirmation.success": "El comentario ha sido rechazado",
|
|
111
|
+
"page.details.filters.label": "Ver",
|
|
112
|
+
"page.details.filters.removed.visibility": "Mostrar comentarios eliminados",
|
|
113
|
+
"page.coming.soon": "Espera lo que viene pronto...",
|
|
114
|
+
"page.settings": "Configuración",
|
|
115
|
+
"page.settings.header.title": "Comentarios",
|
|
116
|
+
"page.settings.header.description": "Configura tus capacidades de moderación de comentarios",
|
|
117
|
+
"page.settings.actions.submit": "Guardar",
|
|
118
|
+
"page.settings.actions.restore": "Restaurar configuración predeterminada",
|
|
119
|
+
"page.settings.actions.restart": "Reiniciar Strapi",
|
|
120
|
+
"page.settings.section.general": "Configuración general",
|
|
121
|
+
"page.settings.section.additional": "Configuración adicional",
|
|
122
|
+
"page.settings.section.client": "Configuración del portal del cliente",
|
|
123
|
+
"page.settings.section.restore": "Restaurar configuración predeterminada",
|
|
124
|
+
"page.settings.section.restore.subtitle": "Descartar todas las configuraciones aplicadas y volver a la configuración predeterminada del plugin. Úsalo con precaución.",
|
|
125
|
+
"page.settings.form.enabledCollections.label": "Habilitar comentarios solo para",
|
|
126
|
+
"page.settings.form.enabledCollections.placeholder": "Selecciona una o más colecciones",
|
|
127
|
+
"page.settings.form.enabledCollections.hint": "Si no seleccionas ninguna, se habilitarán todos los tipos de contenido",
|
|
128
|
+
"page.settings.form.contentTypesSettings.label": "Tipos de contenido",
|
|
129
|
+
"page.settings.form.contentTypesSettings.tooltip": "Configuración personalizada por tipo de contenido",
|
|
130
|
+
"page.settings.form.moderatorRoles.label": "Enviar notificaciones significativas a",
|
|
131
|
+
"page.settings.form.moderatorRoles.placeholder": "Selecciona uno o más roles",
|
|
132
|
+
"page.settings.form.moderatorRoles.hint": "Roles que recibirán notificaciones importantes del plugin para realizar acciones significativas",
|
|
133
|
+
"page.settings.form.badWords.label": "Filtrado de malas palabras",
|
|
134
|
+
"page.settings.form.badWords.hint": "Si está habilitado, cada publicación / actualización de comentarios se verificará en busca de lenguaje inapropiado",
|
|
135
|
+
"page.settings.form.gqlAuth.label": "Autorización de consultas GraphQL",
|
|
136
|
+
"page.settings.form.gqlAuth.hint": "Si está habilitado, las consultas y mutaciones de la API GraphQL solo pueden ser realizadas por usuarios autenticados de Strapi. De lo contrario, la API permanece abierta.",
|
|
137
|
+
"page.settings.form.approvalFlow.label": "Flujo de aprobación",
|
|
138
|
+
"page.settings.form.approvalFlow.hint": "Los comentarios asociados al tipo de contenido \"{name}\" pasarán por un flujo de aprobación manual",
|
|
139
|
+
"page.settings.form.entryLabel.label": "Campos de título",
|
|
140
|
+
"page.settings.form.entryLabel.placeholder": "Selecciona al menos uno o déjalo vacío para aplicar los valores predeterminados",
|
|
141
|
+
"page.settings.form.entryLabel.hint": "Si se deja en blanco, la representación del título utilizará los siguientes campos en orden: \"Título\", \"Asunto\" y \"Nombre\"",
|
|
142
|
+
"page.settings.form.client.url.label": "URL del portal",
|
|
143
|
+
"page.settings.form.client.url.hint": "URL donde está disponible tu portal de cliente",
|
|
144
|
+
"page.settings.form.client.email.label": "Correo electrónico de comunicación",
|
|
145
|
+
"page.settings.form.client.email.hint": "Dirección de correo electrónico utilizada para envíos, comunicación con usuarios en nombre del equipo del portal",
|
|
146
|
+
"page.settings.actions.restore.confirmation.header": "Restaurar configuración predeterminada",
|
|
147
|
+
"page.settings.actions.restore.confirmation.description": "Estás a punto de restaurar la configuración del plugin a sus valores predeterminados. Esto puede tener un impacto destructivo en el contenido recopilado anteriormente. ¿Realmente deseas continuar?",
|
|
148
|
+
"page.settings.actions.restore.confirmation.button.confirm": "Sí, quiero restaurar",
|
|
149
|
+
"page.settings.actions.restart.alert.title": "Strapi requiere reinicio",
|
|
150
|
+
"page.settings.actions.restart.alert.description": "Has realizado cambios en la configuración que requieren que tu aplicación Strapi se reinicie para que tengan efecto en el esquema GraphQL. Hazlo manualmente o utilizando la opción a continuación.",
|
|
151
|
+
"page.settings.actions.restart.alert.close": "Descartar",
|
|
152
|
+
"page.settings.notification.fetch.error": "Error al obtener la configuración. Reintentando...",
|
|
153
|
+
"page.settings.notification.submit.success": "La configuración se ha guardado correctamente",
|
|
154
|
+
"page.settings.notification.submit.error": "Error al guardar la configuración. Inténtalo de nuevo.",
|
|
155
|
+
"page.settings.notification.restore.success": "La configuración se ha restaurado correctamente",
|
|
156
|
+
"page.settings.notification.restore.error": "Error al restaurar la configuración. Inténtalo de nuevo.",
|
|
157
|
+
"page.settings.notification.restart.success": "La aplicación se ha reiniciado correctamente",
|
|
158
|
+
"page.settings.notification.restart.error": "Error al reiniciar tu aplicación. Inténtalo manualmente.",
|
|
159
|
+
"page.settings.loading": "Obteniendo configuración...",
|
|
160
|
+
"page.settings.form.author.blockedProps.label": "Detalles del autor bloqueados",
|
|
161
|
+
"page.settings.form.author.blockedProps.hint": "Las propiedades especificadas se filtrarán de los detalles del autor (separadas por comas)",
|
|
162
|
+
"compontents.confirmation.dialog.header": "Confirmación",
|
|
163
|
+
"compontents.confirmation.dialog.description": "¿Realmente deseas realizar esta acción?",
|
|
164
|
+
"compontents.confirmation.dialog.button.confirm": "Sí, continuar",
|
|
165
|
+
"compontents.confirmation.dialog.button.cancel": "Cancelar",
|
|
166
|
+
"compontents.toogle.enabled": "Habilitado",
|
|
167
|
+
"compontents.toogle.disabled": "Deshabilitado",
|
|
168
|
+
"compontents.author.unknown": "Autor eliminado",
|
|
169
|
+
"components.reason.unknown": "Motivo no proporcionado",
|
|
170
|
+
"components.content.unknown": "Contenido no proporcionado",
|
|
171
|
+
"components.notAccessPage.back": "Volver a la página de inicio",
|
|
172
|
+
"customField.comments.label": "Comentarios",
|
|
173
|
+
"customField.comments.description": "Especifica los parámetros de consulta de comentarios",
|
|
174
|
+
"customField.comments.input.commentsNumber.label": "Número de comentarios",
|
|
175
|
+
"customField.comments.input.renderType.label": "Renderizar comentarios como",
|
|
176
|
+
"customField.comments.input.renderType.option.tree.label": "Árbol",
|
|
177
|
+
"customField.comments.input.renderType.option.flat.label": "Lista plana",
|
|
178
|
+
"customField.comments.input.sortByDate.label": "Ordenar por fecha de creación",
|
|
179
|
+
"customField.comments.input.sortByDate.option.asc.label": "Ascendente",
|
|
180
|
+
"customField.comments.input.sortByDate.option.desc.label": "Descendente",
|
|
181
|
+
"customField.comments.input.filterBy.label": "Filtrar por",
|
|
182
|
+
"customField.comments.input.filterBy.option.dateCreated.label": "Fecha de creación",
|
|
183
|
+
"customField.comments.input.filterBy.option.dateCreated.label.details.label": "Especificar fecha",
|
|
184
|
+
"customField.comments.input.filterBy.option.approvalStatus.label": "Estado de aprobación",
|
|
185
|
+
"customField.comments.input.filterBy.option.approvalStatus.label.details.label": "Especificar estado",
|
|
186
|
+
"customField.comments.input.filterBy.option.approvalStatus.option.pending.label": "Pendiente",
|
|
187
|
+
"customField.comments.input.filterBy.option.approvalStatus.option.approved.label": "Aprobado",
|
|
188
|
+
"customField.comments.input.filterBy.option.approvalStatus.option.rejected.label": "Rechazado",
|
|
189
|
+
"customField.comments.input.populate.label": "Rellenar",
|
|
190
|
+
"customField.comments.input.populate.author.label": "Rellenar campo de autor",
|
|
191
|
+
"customField.comments.input.populate.avatar.label": "Rellenar campo de avatar"
|
|
192
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyValueSet } from "strapi-typed";
|
|
2
|
-
export type TranslationKey = "en" | "fr" | "pt-BR" | "tr" | "ru" | "zh-Hans" | "pl";
|
|
2
|
+
export type TranslationKey = "en" | "fr" | "pt-BR" | "tr" | "ru" | "zh-Hans" | "pl" | "es";
|
|
3
3
|
export type Translations = {
|
|
4
4
|
[key in TranslationKey]: KeyValueSet<string>;
|
|
5
5
|
};
|
|
@@ -4,12 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const en_json_1 = __importDefault(require("./en.json"));
|
|
7
|
+
const es_json_1 = __importDefault(require("./es.json"));
|
|
7
8
|
const fr_json_1 = __importDefault(require("./fr.json"));
|
|
8
|
-
const
|
|
9
|
+
const pl_json_1 = __importDefault(require("./pl.json"));
|
|
9
10
|
const pt_BR_json_1 = __importDefault(require("./pt-BR.json"));
|
|
10
11
|
const ru_json_1 = __importDefault(require("./ru.json"));
|
|
12
|
+
const tr_json_1 = __importDefault(require("./tr.json"));
|
|
11
13
|
const zh_Hans_json_1 = __importDefault(require("./zh-Hans.json"));
|
|
12
|
-
const pl_json_1 = __importDefault(require("./pl.json"));
|
|
13
14
|
const trads = {
|
|
14
15
|
en: en_json_1.default,
|
|
15
16
|
fr: fr_json_1.default,
|
|
@@ -17,7 +18,8 @@ const trads = {
|
|
|
17
18
|
tr: tr_json_1.default,
|
|
18
19
|
ru: ru_json_1.default,
|
|
19
20
|
"zh-Hans": zh_Hans_json_1.default,
|
|
20
|
-
pl: pl_json_1.default
|
|
21
|
+
pl: pl_json_1.default,
|
|
22
|
+
es: es_json_1.default
|
|
21
23
|
};
|
|
22
24
|
exports.default = trads;
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strapi-plugin-comments",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "Strapi - Comments plugin",
|
|
5
5
|
"strapi": {
|
|
6
6
|
"name": "comments",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "https://github.com/VirtusLab-Open-Source/strapi-plugin-comments"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@strapi/design-system": "1.
|
|
18
|
-
"@strapi/plugin-graphql": "^4.25.
|
|
19
|
-
"@strapi/utils": "^4.25.
|
|
20
|
-
"@strapi/types": "4.25.
|
|
17
|
+
"@strapi/design-system": "1.19.0",
|
|
18
|
+
"@strapi/plugin-graphql": "^4.25.18",
|
|
19
|
+
"@strapi/utils": "^4.25.18",
|
|
20
|
+
"@strapi/types": "4.25.18",
|
|
21
21
|
"no-profanity": "^1.4.2",
|
|
22
22
|
"styled-components": "^5.3.8",
|
|
23
23
|
"match-sorter": "^4.0.2",
|