diff --git a/js/package.json b/js/package.json index 662bcfa0d..b9d10a365 100644 --- a/js/package.json +++ b/js/package.json @@ -27,7 +27,7 @@ "@absinthe/socket": "^0.2.1", "@absinthe/socket-apollo-link": "^0.2.1", "@apollo/client": "^3.3.16", - "@oruga-ui/oruga-next": "^0.6.0", + "@oruga-ui/oruga-next": "^0.7.0", "@sentry/tracing": "^7.1", "@sentry/vue": "^7.1", "@tiptap/core": "^2.0.0-beta.41", @@ -114,7 +114,7 @@ "@vitest/coverage-v8": "^0.34.1", "@vitest/ui": "^0.34.1", "@vue/eslint-config-prettier": "^8.0.0", - "@vue/eslint-config-typescript": "^11.0.0", + "@vue/eslint-config-typescript": "^12.0.0", "@vue/test-utils": "^2.0.2", "eslint": "^8.21.0", "eslint-config-prettier": "^9.0.0", @@ -131,7 +131,7 @@ "prettier-eslint": "^15.0.1", "rollup-plugin-visualizer": "^5.7.1", "sass": "^1.34.1", - "typescript": "~5.1.3", + "typescript": "~5.2.2", "vite": "^4.0.4", "vite-plugin-pwa": "^0.16.4", "vitest": "^0.34.1", diff --git a/js/src/App.vue b/js/src/App.vue index 6f9ca4315..846962227 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -138,6 +138,7 @@ interval.value = window.setInterval(async () => { }, 60000) as unknown as number; onBeforeMount(async () => { + console.debug("Before mount App"); if (initializeCurrentUser()) { try { await initializeCurrentActor(); @@ -150,6 +151,8 @@ onBeforeMount(async () => { userAlreadyActivated: "true", }, }); + } else { + throw err; } } } @@ -202,20 +205,24 @@ onUnmounted(() => { const { mutate: updateCurrentUser } = useMutation(UPDATE_CURRENT_USER_CLIENT); const initializeCurrentUser = () => { + console.debug("Initializing current user"); const userId = localStorage.getItem(AUTH_USER_ID); const userEmail = localStorage.getItem(AUTH_USER_EMAIL); const accessToken = localStorage.getItem(AUTH_ACCESS_TOKEN); const role = localStorage.getItem(AUTH_USER_ROLE); if (userId && userEmail && accessToken && role) { - updateCurrentUser({ + const userData = { id: userId, email: userEmail, isLoggedIn: true, role, - }); + }; + updateCurrentUser(userData); + console.debug("Initialized current user", userData); return true; } + console.debug("Failed to initialize current user"); return false; }; diff --git a/js/src/apollo/utils.ts b/js/src/apollo/utils.ts index 0ac78d0ee..3d025527b 100644 --- a/js/src/apollo/utils.ts +++ b/js/src/apollo/utils.ts @@ -45,6 +45,11 @@ export const typePolicies: TypePolicies = { comments: paginatedLimitPagination(), }, }, + Conversation: { + fields: { + comments: paginatedLimitPagination(), + }, + }, Group: { fields: { organizedEvents: paginatedLimitPagination([ diff --git a/js/src/components/Account/ActorAutoComplete.vue b/js/src/components/Account/ActorAutoComplete.vue new file mode 100644 index 000000000..b95c37055 --- /dev/null +++ b/js/src/components/Account/ActorAutoComplete.vue @@ -0,0 +1,77 @@ + + + diff --git a/js/src/components/Account/ActorCard.vue b/js/src/components/Account/ActorCard.vue index 7d93e6fab..c4d49710d 100644 --- a/js/src/components/Account/ActorCard.vue +++ b/js/src/components/Account/ActorCard.vue @@ -39,6 +39,9 @@ v-html="actor.summary" /> +
+ +
+
+ + + +
+ + {{ t("There's no conversations yet") }} + + + + + diff --git a/js/src/components/Conversations/NewConversation.vue b/js/src/components/Conversations/NewConversation.vue new file mode 100644 index 000000000..4895dea28 --- /dev/null +++ b/js/src/components/Conversations/NewConversation.vue @@ -0,0 +1,137 @@ + + + diff --git a/js/src/components/Discussion/DiscussionComment.vue b/js/src/components/Discussion/DiscussionComment.vue index 5339615ba..a7d75bae8 100644 --- a/js/src/components/Discussion/DiscussionComment.vue +++ b/js/src/components/Discussion/DiscussionComment.vue @@ -1,5 +1,7 @@