decidim-comments 0.17.2 → 0.18.0
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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim/comments/bundle.js +16 -16
- data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
- data/app/commands/decidim/comments/vote_comment.rb +12 -2
- data/app/frontend/comments/add_comment_form.component.tsx +2 -0
- data/app/frontend/comments/comment.component.test.tsx +56 -0
- data/app/frontend/comments/comment.component.tsx +10 -8
- data/app/frontend/comments/comments.component.test.tsx +18 -0
- data/app/frontend/comments/comments.component.tsx +28 -5
- data/app/frontend/comments/down_vote_button.component.test.tsx +5 -5
- data/app/frontend/comments/down_vote_button.component.tsx +2 -2
- data/app/frontend/comments/up_vote_button.component.test.tsx +4 -4
- data/app/frontend/comments/up_vote_button.component.tsx +2 -2
- data/app/frontend/fragments/comment_data.fragment.graphql +1 -0
- data/app/frontend/queries/comments.query.graphql +1 -0
- data/app/frontend/support/generate_comments_data.ts +1 -0
- data/app/frontend/support/schema.ts +52 -0
- data/app/models/decidim/comments/comment.rb +14 -0
- data/app/types/decidim/comments/commentable_interface.rb +6 -0
- data/config/locales/ar-SA.yml +1 -0
- data/config/locales/ar.yml +108 -0
- data/config/locales/ca.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/es-MX.yml +1 -0
- data/config/locales/es-PY.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/eu.yml +1 -0
- data/config/locales/fi-plain.yml +1 -0
- data/config/locales/fi.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/gl.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/id-ID.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/pt-BR.yml +1 -0
- data/config/locales/pt.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/config/locales/tr-TR.yml +1 -0
- data/lib/decidim/comments.rb +4 -0
- data/lib/decidim/comments/api/comment_type.rb +6 -0
- data/lib/decidim/comments/commentable.rb +5 -0
- data/lib/decidim/comments/version.rb +1 -1
- metadata +8 -7
data/config/locales/en.yml
CHANGED
@@ -65,6 +65,7 @@ en:
|
|
65
65
|
comment_thread:
|
66
66
|
title: Conversation with %{authorName}
|
67
67
|
comments:
|
68
|
+
blocked_comments_for_user_warning: You are not able to comment at this moment, but you can read the previous ones.
|
68
69
|
blocked_comments_warning: Comments are disabled at this time, but you can read the previous ones.
|
69
70
|
loading: Loading comments ...
|
70
71
|
title: "%{count} comments"
|
data/config/locales/es-MX.yml
CHANGED
@@ -64,6 +64,7 @@ es-MX:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversación con %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: No puede hacer comentarios en este momento, pero puede leer los anteriores.
|
67
68
|
blocked_comments_warning: Los comentarios están deshabilitados en este momento, pero puedes leer los anteriores.
|
68
69
|
loading: Cargando los comentarios ...
|
69
70
|
title: "%{count} comentarios"
|
data/config/locales/es-PY.yml
CHANGED
@@ -64,6 +64,7 @@ es-PY:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversación con %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: No puede hacer comentarios en este momento, pero puede leer los anteriores.
|
67
68
|
blocked_comments_warning: Los comentarios están deshabilitados en este momento, pero puedes leer los anteriores.
|
68
69
|
loading: Cargando los comentarios ...
|
69
70
|
title: "%{count} comentarios"
|
data/config/locales/es.yml
CHANGED
@@ -64,6 +64,7 @@ es:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversación con %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: No puedes hacer comentarios en este momento, pero puedes leer los anteriores.
|
67
68
|
blocked_comments_warning: Los comentarios están deshabilitados en este momento, pero puedes leer los anteriores.
|
68
69
|
loading: Cargando los comentarios ...
|
69
70
|
title: "%{count} comentarios"
|
data/config/locales/eu.yml
CHANGED
@@ -64,6 +64,7 @@ eu:
|
|
64
64
|
comment_thread:
|
65
65
|
title: 'Solasaldia honekin: %{authorName}'
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Oraindik ez duzu iruzkinik egin, baina aurrekoak irakurri ditzakezu.
|
67
68
|
blocked_comments_warning: Iruzkinak desgaituta daude une honetan, baina aurrekoak irakur ditzakezu.
|
68
69
|
loading: Iruzkinak kargatzen...
|
69
70
|
title: "%{count} iruzkin"
|
data/config/locales/fi-plain.yml
CHANGED
@@ -64,6 +64,7 @@ fi-pl:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Keskustelu henkilön %{authorName} kanssa
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Et voi kommentoida tällä hetkellä, mutta voit lukea aikaisempia kommentteja.
|
67
68
|
blocked_comments_warning: Kommentit on poistettu käytöstä tällä hetkellä, mutta voit lukea aikaisempia kommentteja.
|
68
69
|
loading: Ladataan kommentteja ...
|
69
70
|
title: "%{count} kommenttia"
|
data/config/locales/fi.yml
CHANGED
@@ -64,6 +64,7 @@ fi:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Keskustelu henkilön %{authorName} kanssa
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Et voi kommentoida tällä hetkellä, mutta voit lukea aikaisempia kommentteja.
|
67
68
|
blocked_comments_warning: Kommentit on poistettu käytöstä tällä hetkellä, mutta voit lukea aikaisempia kommentteja.
|
68
69
|
loading: Ladataan kommentteja ...
|
69
70
|
title: "%{count} kommenttia"
|
data/config/locales/fr.yml
CHANGED
@@ -64,6 +64,7 @@ fr:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversation avec %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Vous n'êtes pas en mesure de commenter pour le moment, mais vous pouvez lire les précédents.
|
67
68
|
blocked_comments_warning: Les commentaires sont actuellement désactivés, mais vous pouvez lire ceux déjà saisis.
|
68
69
|
loading: Chargement des commentaires ...
|
69
70
|
title: "%{count} commentaires"
|
data/config/locales/gl.yml
CHANGED
@@ -64,6 +64,7 @@ gl:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversa con %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Non podes comentar neste momento, pero podes ler os anteriores.
|
67
68
|
blocked_comments_warning: Os comentarios están desactivados neste momento, pero podes ler os anteriores.
|
68
69
|
loading: Cargando comentarios ...
|
69
70
|
title: "%{count} comentarios"
|
data/config/locales/hu.yml
CHANGED
@@ -64,6 +64,7 @@ hu:
|
|
64
64
|
comment_thread:
|
65
65
|
title: 'Beszélgetés vele: %{authorName}'
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Ebben a pillanatban nem tud megjegyzéseket tenni, de elolvashatja az előzőeket.
|
67
68
|
blocked_comments_warning: A megjegyzések jelenleg le vannak tiltva, de a korábbiakat elolvashatod.
|
68
69
|
loading: Hozzászólások betöltése ...
|
69
70
|
title: "%{count} megjegyzés"
|
data/config/locales/id-ID.yml
CHANGED
@@ -62,6 +62,7 @@ id:
|
|
62
62
|
comment_thread:
|
63
63
|
title: Percakapan dengan %{authorName}
|
64
64
|
comments:
|
65
|
+
blocked_comments_for_user_warning: Anda tidak dapat berkomentar saat ini, tetapi Anda dapat membaca yang sebelumnya.
|
65
66
|
blocked_comments_warning: Komentar dinonaktifkan saat ini, tetapi Anda dapat membaca yang sebelumnya.
|
66
67
|
loading: Memuat komentar ...
|
67
68
|
title: "%{count} komentar"
|
data/config/locales/it.yml
CHANGED
@@ -64,6 +64,7 @@ it:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversazioni con %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Non sei in grado di commentare in questo momento, ma puoi leggere quelli precedenti.
|
67
68
|
blocked_comments_warning: I commenti sono disabilitati in questo momento, ma puoi leggere quelli precedenti.
|
68
69
|
loading: Sto caricando i commenti ...
|
69
70
|
title: "%{count} commenti"
|
data/config/locales/nl.yml
CHANGED
@@ -64,6 +64,7 @@ nl:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Gesprek met %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: U kunt op dit moment geen opmerkingen maken, maar u kunt de vorige wel lezen.
|
67
68
|
blocked_comments_warning: Reacties zijn op dit moment uitgeschakeld, maar je kan de vorige berichten lezen.
|
68
69
|
loading: Reacties laden...
|
69
70
|
title: "%{count} reacties"
|
data/config/locales/pl.yml
CHANGED
@@ -68,6 +68,7 @@ pl:
|
|
68
68
|
comment_thread:
|
69
69
|
title: Rozmowa z %{authorName}
|
70
70
|
comments:
|
71
|
+
blocked_comments_for_user_warning: Nie możesz teraz komentować, ale możesz przeczytać poprzednie.
|
71
72
|
blocked_comments_warning: Komentarze są w tej chwili wyłączone, ale możesz przeczytać poprzednie.
|
72
73
|
loading: Ładowanie komentarzy ...
|
73
74
|
title: "%{count} komentarzy"
|
data/config/locales/pt-BR.yml
CHANGED
@@ -64,6 +64,7 @@ pt-BR:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversa com %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Você não pode comentar neste momento, mas pode ler os anteriores.
|
67
68
|
blocked_comments_warning: Os comentários estão desativados neste momento, mas você pode ler os anteriores.
|
68
69
|
loading: Carregando comentários ...
|
69
70
|
title: "%{count} comentários"
|
data/config/locales/pt.yml
CHANGED
@@ -64,6 +64,7 @@ pt:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Conversa com %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Você não pode comentar neste momento, mas pode ler os anteriores.
|
67
68
|
blocked_comments_warning: Os comentários estão desativados neste momento, mas você pode ler os anteriores.
|
68
69
|
loading: Carregando comentários ...
|
69
70
|
title: "%{count} comentários"
|
data/config/locales/sv.yml
CHANGED
@@ -64,6 +64,7 @@ sv:
|
|
64
64
|
comment_thread:
|
65
65
|
title: Samtal med %{authorName}
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Du kan inte kommentera just nu, men du kan läsa tidigare kommentarer.
|
67
68
|
blocked_comments_warning: Kommentarer är inaktiverade just nu, men du kan läsa de föregående.
|
68
69
|
loading: Laddar kommentarer...
|
69
70
|
title: "%{count} kommentarer"
|
data/config/locales/tr-TR.yml
CHANGED
@@ -64,6 +64,7 @@ tr:
|
|
64
64
|
comment_thread:
|
65
65
|
title: '%{authorName}ile sohbet'
|
66
66
|
comments:
|
67
|
+
blocked_comments_for_user_warning: Şu anda yorum yapamıyorsunuz, ancak öncekileri okuyabilirsiniz.
|
67
68
|
blocked_comments_warning: Yorumlar şu anda devre dışı, ancak öncekileri okuyabilirsiniz.
|
68
69
|
loading: Yorumlar yükleniyor ...
|
69
70
|
title: "%{count} yorum"
|
data/lib/decidim/comments.rb
CHANGED
@@ -74,6 +74,12 @@ module Decidim
|
|
74
74
|
obj.reported_by?(ctx[:current_user])
|
75
75
|
}
|
76
76
|
end
|
77
|
+
|
78
|
+
field :userAllowedToComment, !types.Boolean, "Check if the current user can comment" do
|
79
|
+
resolve lambda { |obj, _args, ctx|
|
80
|
+
obj.root_commentable.commentable? && obj.root_commentable.user_allowed_to_comment?(ctx[:current_user])
|
81
|
+
}
|
82
|
+
end
|
77
83
|
end
|
78
84
|
end
|
79
85
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.18.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.18.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: jquery-rails
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,28 +46,28 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.18.0
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.18.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: decidim-dev
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 0.18.0
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 0.18.0
|
71
71
|
description: Pluggable comments system for some components.
|
72
72
|
email:
|
73
73
|
- josepjaume@gmail.com
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- app/types/decidim/comments/commentable_mutation_type.rb
|
149
149
|
- app/types/decidim/comments/commentable_type.rb
|
150
150
|
- config/locales/ar-SA.yml
|
151
|
+
- config/locales/ar.yml
|
151
152
|
- config/locales/ca.yml
|
152
153
|
- config/locales/cs-CZ.yml
|
153
154
|
- config/locales/cs.yml
|