From 84f62cd043d5cf5d186fea6f24a1a9dff5fc64ce Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 1 Sep 2023 12:17:27 +0200 Subject: [PATCH] fix(front): fix behavior of local toggle for profiles & groups view depending on domain value Signed-off-by: Thomas Citharel --- js/src/views/Admin/GroupProfiles.vue | 8 ++++---- js/src/views/Admin/ProfilesView.vue | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/views/Admin/GroupProfiles.vue b/js/src/views/Admin/GroupProfiles.vue index dbd904eea..7b12c9cb1 100644 --- a/js/src/views/Admin/GroupProfiles.vue +++ b/js/src/views/Admin/GroupProfiles.vue @@ -129,11 +129,11 @@ const PROFILES_PER_PAGE = 10; const { restrictions } = useRestrictions(); -const preferredUsername = ref(""); -const name = ref(""); -const domain = ref(""); +const preferredUsername = useRouteQuery("preferredUsername", ""); +const name = useRouteQuery("name", ""); +const domain = useRouteQuery("domain", ""); -const local = useRouteQuery("local", true, booleanTransformer); +const local = useRouteQuery("local", domain.value === "", booleanTransformer); const suspended = useRouteQuery("suspended", false, booleanTransformer); const page = useRouteQuery("page", 1, integerTransformer); diff --git a/js/src/views/Admin/ProfilesView.vue b/js/src/views/Admin/ProfilesView.vue index fa754642c..27523f265 100644 --- a/js/src/views/Admin/ProfilesView.vue +++ b/js/src/views/Admin/ProfilesView.vue @@ -119,7 +119,7 @@ const preferredUsername = useRouteQuery("preferredUsername", ""); const name = useRouteQuery("name", ""); const domain = useRouteQuery("domain", ""); -const local = useRouteQuery("local", true, booleanTransformer); +const local = useRouteQuery("local", domain.value === "", booleanTransformer); const suspended = useRouteQuery("suspended", false, booleanTransformer); const page = useRouteQuery("page", 1, integerTransformer);