From e93e2825240b94667b809cba3e812158a2b30787 Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Tue, 29 Nov 2022 08:00:18 +0100
Subject: [PATCH 1/5] Limit the size of the IP(v6) field in the user admin view

Now it breaks only below 1280px width, instead of ~1500.

Closes #1228

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 js/src/views/Admin/AdminUserProfile.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/js/src/views/Admin/AdminUserProfile.vue b/js/src/views/Admin/AdminUserProfile.vue
index 984bed069..eeb46f0a1 100644
--- a/js/src/views/Admin/AdminUserProfile.vue
+++ b/js/src/views/Admin/AdminUserProfile.vue
@@ -36,7 +36,9 @@
                       v-if="type === 'ip'"
                       class="py-4 px-2 whitespace-nowrap"
                     >
-                      <code>{{ value }}</code>
+                      <code class="truncate block max-w-[15rem]">{{
+                        value
+                      }}</code>
                     </td>
                     <td
                       v-else-if="type === 'role'"

From bce2a4dc3c088b9a235b2d0ef221eedf6dee6aea Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Tue, 29 Nov 2022 08:17:58 +0100
Subject: [PATCH 2/5] Fix terms and privacy view

Closes #1229

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 js/src/views/About/PrivacyView.vue | 4 ++--
 js/src/views/About/TermsView.vue   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/js/src/views/About/PrivacyView.vue b/js/src/views/About/PrivacyView.vue
index 2d8e0d42f..b7ca7db2c 100644
--- a/js/src/views/About/PrivacyView.vue
+++ b/js/src/views/About/PrivacyView.vue
@@ -22,10 +22,10 @@ const { locale } = useI18n({ useScope: "global" });
 const { result: configResult } = useQuery<{ config: IConfig }>(
   PRIVACY,
   () => ({
-    locale: locale.value,
+    locale: locale,
   }),
   () => ({
-    enabled: locale.value !== undefined,
+    enabled: locale !== undefined,
   })
 );
 
diff --git a/js/src/views/About/TermsView.vue b/js/src/views/About/TermsView.vue
index 13df6adfe..342b5f4f1 100644
--- a/js/src/views/About/TermsView.vue
+++ b/js/src/views/About/TermsView.vue
@@ -26,10 +26,10 @@ const { result: termsResult, loading: termsLoading } = useQuery<{
 }>(
   TERMS,
   () => ({
-    locale: locale.value,
+    locale: locale,
   }),
   () => ({
-    enabled: locale.value !== undefined,
+    enabled: locale !== undefined,
   })
 );
 

From 6f9940a0a0e9147a85e20979890ee3a60a55c9d6 Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Tue, 29 Nov 2022 08:19:12 +0100
Subject: [PATCH 3/5] Lint fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 js/src/components/Comment/EventComment.vue | 3 ++-
 js/src/views/Group/GroupView.vue           | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/js/src/components/Comment/EventComment.vue b/js/src/components/Comment/EventComment.vue
index 90e1e01af..4792553fd 100644
--- a/js/src/components/Comment/EventComment.vue
+++ b/js/src/components/Comment/EventComment.vue
@@ -53,7 +53,8 @@
           v-html="comment.text"
           dir="auto"
           :lang="comment.language"
-          class="prose dark:prose-invert xl:prose-lg !max-w-full" :class="{ 'text-black dark:text-white': comment.isAnnouncement}"
+          class="prose dark:prose-invert xl:prose-lg !max-w-full"
+          :class="{ 'text-black dark:text-white': comment.isAnnouncement }"
         />
         <div v-else>{{ t("[This comment has been deleted]") }}</div>
         <nav class="flex gap-1 mt-1" v-if="!comment.deletedAt">
diff --git a/js/src/views/Group/GroupView.vue b/js/src/views/Group/GroupView.vue
index ece9cad82..4b2b06d2e 100644
--- a/js/src/views/Group/GroupView.vue
+++ b/js/src/views/Group/GroupView.vue
@@ -662,7 +662,11 @@ import EmptyContent from "../../components/Utils/EmptyContent.vue";
 import { Paginate } from "@/types/paginate";
 import { IEvent } from "@/types/event.model";
 import { IPost } from "@/types/post.model";
-import { FOLLOW_GROUP, UNFOLLOW_GROUP, UPDATE_GROUP_FOLLOW } from "@/graphql/followers";
+import {
+  FOLLOW_GROUP,
+  UNFOLLOW_GROUP,
+  UPDATE_GROUP_FOLLOW,
+} from "@/graphql/followers";
 import { useAnonymousReportsConfig } from "../../composition/apollo/config";
 import { computed, defineAsyncComponent, inject, ref, watch } from "vue";
 import { useCurrentActorClient } from "@/composition/apollo/actor";

From fc16014b2a3c94031588247b9f7a88456d74a753 Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Tue, 29 Nov 2022 08:23:02 +0100
Subject: [PATCH 4/5] Use the correct value of current locale

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 js/src/components/Event/FullAddressAutoComplete.vue           | 4 ++--
 .../components/Participation/ParticipationWithoutAccount.vue  | 2 +-
 js/src/components/Settings/SettingsOnboarding.vue             | 2 +-
 js/src/views/User/RegisterView.vue                            | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/js/src/components/Event/FullAddressAutoComplete.vue b/js/src/components/Event/FullAddressAutoComplete.vue
index 3fc737ba5..a803c8ada 100644
--- a/js/src/components/Event/FullAddressAutoComplete.vue
+++ b/js/src/components/Event/FullAddressAutoComplete.vue
@@ -258,7 +258,7 @@ const asyncData = async (query: string): Promise<void> => {
 
   searchAddress(undefined, {
     query: searchQuery.value,
-    locale: locale.value,
+    locale: locale,
     type: props.resultType,
   });
 };
@@ -322,7 +322,7 @@ const reverseGeoCode = (e: LatLng, zoom: number) => {
     latitude: e.lat,
     longitude: e.lng,
     zoom,
-    locale: locale.value as string,
+    locale: locale as unknown as string,
   });
 };
 
diff --git a/js/src/components/Participation/ParticipationWithoutAccount.vue b/js/src/components/Participation/ParticipationWithoutAccount.vue
index 8b9a24661..4edfdf113 100644
--- a/js/src/components/Participation/ParticipationWithoutAccount.vue
+++ b/js/src/components/Participation/ParticipationWithoutAccount.vue
@@ -270,7 +270,7 @@ const joinEvent = async (): Promise<void> => {
     actorId: anonymousActorId.value,
     email: anonymousParticipation.email,
     message: anonymousParticipation.message,
-    locale: locale.value,
+    locale: locale,
     timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
   });
 };
diff --git a/js/src/components/Settings/SettingsOnboarding.vue b/js/src/components/Settings/SettingsOnboarding.vue
index fa936c5ad..e9a489b7c 100644
--- a/js/src/components/Settings/SettingsOnboarding.vue
+++ b/js/src/components/Settings/SettingsOnboarding.vue
@@ -71,7 +71,7 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
 const { loggedUser } = useUserSettings();
 
 onMounted(() => {
-  updateLocale(locale.value as string);
+  updateLocale(locale as unknown as string);
   doUpdateSetting({ timezone });
 });
 
diff --git a/js/src/views/User/RegisterView.vue b/js/src/views/User/RegisterView.vue
index 12515ae1d..1f138cdae 100644
--- a/js/src/views/User/RegisterView.vue
+++ b/js/src/views/User/RegisterView.vue
@@ -295,7 +295,7 @@ onError((error) => {
 
 const submit = async (): Promise<void> => {
   sendingForm.value = true;
-  credentials.locale = locale.value as string;
+  credentials.locale = locale as unknown as string;
   try {
     emailErrors.value = [];
     passwordErrors.value = [];

From 9328df21031f2b2f6beb5c495b249977ddfd2948 Mon Sep 17 00:00:00 2001
From: Thomas Citharel <tcit@tcit.fr>
Date: Tue, 29 Nov 2022 08:28:48 +0100
Subject: [PATCH 5/5] Fix editing group events

Closes #1222

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
---
 js/src/views/Event/EventView.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/js/src/views/Event/EventView.vue b/js/src/views/Event/EventView.vue
index ca58324d2..2d5b2015d 100755
--- a/js/src/views/Event/EventView.vue
+++ b/js/src/views/Event/EventView.vue
@@ -344,10 +344,12 @@ const participations = computed(
   () => participationsResult.value?.person.participations?.elements ?? []
 );
 
-const { person } = usePersonStatusGroup(
+const groupFederatedUsername = computed(() =>
   usernameWithDomain(event.value?.attributedTo)
 );
 
+const { person } = usePersonStatusGroup(groupFederatedUsername);
+
 const { eventCategories } = useEventCategories();
 
 // metaInfo() {