Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(all): Add reply to convo #154

Merged
merged 19 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/platform/trpc/routers/convoRouter/convoRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
groupMembers,
convoAttachments,
pendingAttachments,
convoEntryReplies
convoEntryReplies,
type ConvoEntryMetadata
} from '@u22n/database/schema';
import { typeIdValidator, type TypeId, typeIdGenerator } from '@u22n/utils';
import { TRPCError } from '@trpc/server';
Expand Down Expand Up @@ -344,6 +345,10 @@ export const convoRouter = router({
publicId: true,
emailUsername: true,
emailDomain: true
reputationId: true,
publicId: true,
emailUsername: true,
emailDomain: true
}
});

Expand Down
1 change: 1 addition & 0 deletions apps/web-app/components/convos/convoMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
);

watch(convoEntries, () => {
if (convoEntries.value && convoEntries.value.entries) {
if (convoEntries.value && convoEntries.value.entries) {
entriesArray.value.push(...convoEntries.value.entries);
setReplyToMessagePublicId(convoEntries.value.entries[0]?.publicId ?? '');
Expand Down
2 changes: 2 additions & 0 deletions apps/web-app/components/settings/sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
<template>
<div
class="bg-base-2 border-base-6 flex h-full max-h-full flex-col gap-2 overflow-y-auto rounded-r-xl border-r-2 p-8 pl-12 shadow-md">
class="bg-base-2 border-base-6 flex h-full max-h-full flex-col gap-2
overflow-y-auto rounded-r-xl border-r-2 p-8 pl-12 shadow-md">
<div
class="flex h-full max-h-full grow flex-col gap-4 overflow-hidden overflow-y-auto">
<div class="flex w-full flex-col gap-2">
Expand Down
12 changes: 12 additions & 0 deletions apps/web-app/pages/[orgSlug]/convo/[id].vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import {
computed,
computed,
navigateTo,
provide,
Expand Down Expand Up @@ -154,6 +155,9 @@
color: participantColor,
signaturePlainText: participantSignaturePlainText,
signatureHtml: participantSignatureHtml
color: participantColor,
signaturePlainText: participantSignaturePlainText,
signatureHtml: participantSignatureHtml
};

participantArray.value.push(participantData);
Expand Down Expand Up @@ -358,13 +362,15 @@
<div class="flex h-full max-h-full grow flex-col gap-0 overflow-hidden">
<div
class="from-base-1 z-[20000] mb-[-12px] h-[12px] bg-gradient-to-b" />
class="from-base-1 z-[20000] mb-[-12px] h-[12px] bg-gradient-to-b" />
<ConvosConvoMessages
v-model:reply-to-message-public-id="replyToMessagePublicId"
v-model:reply-to-message-metadata="replyToMessageMetadata"
:convo-public-id="convoPublicId"
:participant-public-id="convoDetails?.participantPublicId || ''" />
<div
class="from-base-1 z-[20000] mt-[-12px] h-[12px] bg-gradient-to-t" />
class="from-base-1 z-[20000] mt-[-12px] h-[12px] bg-gradient-to-t" />
</div>
<div class="flex w-full flex-col justify-items-end gap-2">
<div class="flex flex-row items-center gap-2">
Expand Down Expand Up @@ -436,6 +442,8 @@
</div>
</div>

<!-- Context Pane -->

<!-- Context Pane -->
<div
class="border-l-1 border-base-6 flex h-full w-full max-w-full flex-col justify-between gap-8 overflow-hidden border border-b-0 border-r-0 border-t-0 pl-8">
Expand Down Expand Up @@ -463,18 +471,22 @@
@click="convoParticipantsCollapsed = !convoParticipantsCollapsed">
<NuxtUiAvatarGroup>
<template
v-for="participant of participantsAll"
v-for="participant of participantsAll"
:key="participant.participantPublicId">
<ConvosConvoAvatar
:participant="participant"
size="sm"
:ring="true" />
size="sm" :ring="true" />
</template>
</NuxtUiAvatarGroup>
</div>
<div
v-if="!convoParticipantsCollapsed"
class="flex h-fit w-full max-w-full flex-col gap-4 overflow-hidden">
class="flex h-fit w-full max-w-full flex-col gap-4
overflow-hidden">
<div
v-if="participantsAssignedArray.length"
class="flex w-full max-w-full flex-col gap-2 overflow-hidden">
Expand Down
1 change: 1 addition & 0 deletions packages/database/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ export const pendingAttachmentsRelations = relations(
export type ConvoEntryMetadataEmailAddress = {
id: number;
publicId: string;
publicId: string;
type: 'contact' | 'emailIdentity';
email: string;
};
Expand Down