From 4b6f698b77f2ba90050868c0651aac8409dfb30d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 11 Aug 2020 11:44:07 +0200 Subject: [PATCH 1/2] Don't show the delete post button when creating a new post Signed-off-by: Thomas Citharel --- js/src/views/Posts/Edit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/views/Posts/Edit.vue b/js/src/views/Posts/Edit.vue index 177ffb914..1118e7125 100644 --- a/js/src/views/Posts/Edit.vue +++ b/js/src/views/Posts/Edit.vue @@ -53,7 +53,7 @@ {{ $t("Cancel") }} - + {{ $t("Delete post") }} From 727814c6a77a4a79bc3951eca9619909a79d6d3b Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 11 Aug 2020 11:45:21 +0200 Subject: [PATCH 2/2] Add address to public group page and handle empty collections Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 11 ++- js/src/i18n/fr_FR.json | 10 +- js/src/views/Group/Group.vue | 187 ++++++++++++++++++++++++++--------- 3 files changed, 161 insertions(+), 47 deletions(-) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 0ba5586c5..42639605c 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -516,7 +516,6 @@ "Resources": "Resources", "View all resources": "View all resources", "Public page": "Public page", - "Followed by {count} persons": "Followed by {count} persons", "Post a public message": "Post a public message", "View all todos": "View all todos", "Discussions": "Discussions", @@ -749,5 +748,13 @@ "Group address": "Group address", "Events tagged with {tag}": "Events tagged with {tag}", "Explore events": "Explore events", - "#{tag}": "#{tag}" + "#{tag}": "#{tag}", + "{count} team members": "{count} team members", + "View all events": "View all events", + "No resources yet": "No resources yet", + "No posts yet": "No posts yet", + "No ongoing todos": "No ongoing todos", + "No discussions yet": "No discussions yet", + "Add / Remove…": "Add / Remove…", + "No public posts": "No public posts" } diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index e2bfa4326..1d65246f5 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -749,5 +749,13 @@ "Group address": "Adresse du groupe", "Events tagged with {tag}": "Événements taggés avec {tag}", "Explore events": "Explorer les événements", - "#{tag}": "#{tag}" + "#{tag}": "#{tag}", + "{count} team members": "{count} membres d'équipe", + "View all events": "Voir tous les événements", + "No resources yet": "Pas encore de ressources", + "No posts yet": "Pas encore de billets", + "No ongoing todos": "Pas de todos en cours", + "No discussions yet": "Pas encore de discussions", + "Add / Remove…": "Ajouter / Supprimer…", + "No public posts": "Pas de billets publics" } diff --git a/js/src/views/Group/Group.vue b/js/src/views/Group/Group.vue index a852511ef..2497a7ab1 100644 --- a/js/src/views/Group/Group.vue +++ b/js/src/views/Group/Group.vue @@ -46,21 +46,52 @@ > -
-
+
+
+ + +
+
+

+ {{ $t("{count} team members", { count: group.members.total }) }} + {{ $t("Add / Remove…") }} +

+
+
+
+

+ {{ physicalAddress.poiInfos.name }} +

+

{{ physicalAddress.poiInfos.alternativeName }}

+
+ {{ $t("Show map") }} - - -
@@ -68,7 +99,7 @@
{{ $t("Upcoming events") }} -
+
- {{ $t("View all upcoming events") }} +
+

{{ $t("No public upcoming events") }}

+
+ + {{ $t("View all events") }}
{{ $t("Resources") }} @@ -90,6 +125,9 @@
+
+

{{ $t("No resources yet") }}

+
{{ $t("Public page") }} -

{{ $t("Followed by {count} persons", { count: group.members.total }) }}

+
+

{{ $t("No posts yet") }}

+
-
- -

- {{ - $tc("{title} ({count} todos)", todoList.todos.total, { - count: todoList.todos.total, - title: todoList.title, - }) - }} -

-
- +
+
+ +

+ {{ + $tc("{title} ({count} todos)", todoList.todos.total, { + count: todoList.todos.total, + title: todoList.title, + }) + }} +

+
+ +
+
+
+

{{ $t("No ongoing todos") }}

{{ $t("View all todos") }}
{{ $t("Discussions") }} - +
+ +
+
+

{{ $t("No discussions yet") }}

+
-
+
+ {{ $t("No public posts") }}
+ +
+ +
+
@@ -214,6 +271,7 @@ import PostListItem from "@/components/Post/PostListItem.vue"; import ResourceItem from "@/components/Resource/ResourceItem.vue"; import FolderItem from "@/components/Resource/FolderItem.vue"; import RouteName from "../../router/name"; +import { Address } from "@/types/address.model"; @Component({ apollo: { @@ -247,6 +305,7 @@ import RouteName from "../../router/name"; EventCard, FolderItem, ResourceItem, + "map-leaflet": () => import(/* webpackChunkName: "map" */ "../../components/Map.vue"), }, metaInfo() { return { @@ -277,6 +336,8 @@ export default class Group extends Vue { usernameWithDomain = usernameWithDomain; + showMap = false; + @Watch("currentActor") watchCurrentActor(currentActor: IActor, oldActor: IActor) { if (currentActor.id && oldActor && currentActor.id !== oldActor.id) { @@ -311,6 +372,11 @@ export default class Group extends Vue { ) ); } + + get physicalAddress(): Address | null { + if (!this.group.physicalAddress) return null; + return new Address(this.group.physicalAddress); + } }