all developments of milestone 1

This commit is contained in:
setop
2024-04-10 12:36:21 +00:00
parent a78dc261e5
commit 7030d56864
266 changed files with 5391 additions and 2609 deletions

View File

@@ -143,7 +143,7 @@ import AuthProviders from "@/components/User/AuthProviders.vue";
import RouteName from "@/router/name";
import { LoginError, LoginErrorCode } from "@/types/enums";
import { useCurrentUserClient } from "@/composition/apollo/user";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { enumTransformer, useRouteQuery } from "vue-use-route-query";
import { useLazyCurrentUserIdentities } from "@/composition/apollo/actor";
@@ -245,8 +245,17 @@ const { onDone: onCurrentUserMutationDone, mutate: updateCurrentUserMutation } =
onCurrentUserMutationDone(async () => {
console.debug("Current user mutation done, now setuping actors…");
// since we fail to refresh the navbar properly, we force a page reload.
// see the explanation of the bug bellow
window.location = redirect.value || "/";
try {
/* FIXME this promise never resolved the first time
no idea why !
this appends even with the last version of apollo-composable (4.0.2)
may be related to that : https://github.com/vuejs/apollo/issues/1543
*/
const result = await loadIdentities();
console.debug("login, loadIdentities resolved");
if (!result) return;
await initializeCurrentActor(result.loggedUser.actors);
} catch (err: any) {

View File

@@ -48,7 +48,7 @@ import RouteName from "@/router/name";
import { reactive, ref, computed } from "vue";
import { useMutation } from "@vue/apollo-composable";
import { useRouter } from "vue-router";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { useI18n } from "vue-i18n";
const props = defineProps<{ token: string }>();

View File

@@ -12,7 +12,7 @@ import { ICurrentUser, IUser } from "../../types/current-user.model";
import { useRouter } from "vue-router";
import { useLazyQuery, useMutation } from "@vue/apollo-composable";
import { useI18n } from "vue-i18n";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { computed, onMounted } from "vue";
import { getValueFromMeta } from "@/utils/html";

View File

@@ -213,7 +213,7 @@ import { computed, reactive, ref, watch } from "vue";
import { useMutation, useQuery } from "@vue/apollo-composable";
import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { AbsintheGraphQLErrors } from "@/types/errors.model";
type errorType = "danger" | "warning";

View File

@@ -54,7 +54,7 @@ import RouteName from "@/router/name";
import { ref, computed } from "vue";
import { useMutation } from "@vue/apollo-composable";
import { useI18n } from "vue-i18n";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
const { t } = useI18n({ useScope: "global" });
useHead({

View File

@@ -63,7 +63,7 @@ import { SEND_RESET_PASSWORD } from "../../graphql/auth";
import RouteName from "../../router/name";
import { computed, ref } from "vue";
import { useMutation } from "@vue/apollo-composable";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });

View File

@@ -56,7 +56,7 @@
import { USER_SETTINGS } from "@/graphql/user";
import { IUser } from "@/types/current-user.model";
import { useQuery } from "@vue/apollo-composable";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { computed, defineAsyncComponent, watch } from "vue";
import { useI18n } from "vue-i18n";
import RouteName from "@/router/name";

View File

@@ -31,7 +31,7 @@ import { ref, onBeforeMount, computed } from "vue";
import { useRouter } from "vue-router";
import { useMutation } from "@vue/apollo-composable";
import { IUser } from "@/types/current-user.model";
import { useHead } from "@unhead/vue";
import { useHead } from "@/utils/head";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });