From faa92aebd96e587c91f7be823777647ae80f186d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 23 Mar 2021 16:17:08 +0100 Subject: [PATCH] Fix and improve group page edition Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 3 +- js/src/i18n/fr_FR.json | 3 +- js/src/mixins/group.ts | 8 ++-- js/src/views/Posts/Edit.vue | 81 +++++++++++++++++++++++++++++-------- 4 files changed, 72 insertions(+), 23 deletions(-) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 066791bcf..b26ce8296 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -967,5 +967,6 @@ "You posted a comment on the event {event}.": "You posted a comment on the event {event}.", "{profile} posted a comment on the event {event}.": "{profile} posted a comment on the event {event}.", "You replied to a comment on the event {event}.": "You replied to a comment on the event {event}.", - "{profile} replied to a comment on the event {event}.": "{profile} replied to a comment on the event {event}." + "{profile} replied to a comment on the event {event}.": "{profile} replied to a comment on the event {event}.", + "New post": "New post" } diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index 7ffb0ae0d..09642de70 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -1061,5 +1061,6 @@ "You posted a comment on the event {event}.": "Vous avez posté un commentaire sur l'événement {event}.", "{profile} posted a comment on the event {event}.": "{profile} a posté un commentaire sur l'événement {event}.", "You replied to a comment on the event {event}.": "Vous avez répondu à un commentaire sur l'événement {event}.", - "{profile} replied to a comment on the event {event}.": "{profile} a répondu à un commentaire sur l'événement {event}." + "{profile} replied to a comment on the event {event}.": "{profile} a répondu à un commentaire sur l'événement {event}.", + "New post": "Nouveau billet" } diff --git a/js/src/mixins/group.ts b/js/src/mixins/group.ts index 4003ecf22..1ff873f9c 100644 --- a/js/src/mixins/group.ts +++ b/js/src/mixins/group.ts @@ -34,7 +34,7 @@ import { Component, Vue } from "vue-property-decorator"; variables() { return { id: this.currentActor.id, - group: this.$route.params.preferredUsername, + group: this.group.preferredUsername, }; }, subscribeToMore: { @@ -42,14 +42,14 @@ import { Component, Vue } from "vue-property-decorator"; variables() { return { actorId: this.currentActor.id, - group: this.$route.params.preferredUsername, + group: this.group.preferredUsername, }; }, skip() { return ( !this.currentActor || !this.currentActor.id || - !this.$route.params.preferredUsername + !this.group.preferredUsername ); }, }, @@ -57,7 +57,7 @@ import { Component, Vue } from "vue-property-decorator"; return ( !this.currentActor || !this.currentActor.id || - !this.$route.params.preferredUsername + !this.group.preferredUsername ); }, }, diff --git a/js/src/views/Posts/Edit.vue b/js/src/views/Posts/Edit.vue index 74703f31b..b976b336b 100644 --- a/js/src/views/Posts/Edit.vue +++ b/js/src/views/Posts/Edit.vue @@ -2,6 +2,43 @@
+

{{ $t("Edit post") }}

@@ -111,7 +148,6 @@