diff --git a/new-client/src/widgets/chat/api/qChatMessages.ts b/new-client/src/widgets/chat/api/qChatMessages.ts index b4738d1..cdf2625 100644 --- a/new-client/src/widgets/chat/api/qChatMessages.ts +++ b/new-client/src/widgets/chat/api/qChatMessages.ts @@ -16,15 +16,7 @@ export function qChatMessages() { const response = await api.chad.chatMessages({ cursor: pageParam, limit: 25 }) return response.data - // return { - // messages: response.data.messages.reverse(), - // nextCursor: response.data.nextCursor, - // } }, - // select: data => ({ - // pages: [...data.pages].reverse(), - // pageParams: [...data.pageParams].reverse(), - // }), select: (data) => { return data.pages.flatMap(page => page.messages).toReversed() }, diff --git a/new-client/src/widgets/chat/ui/ChatAttachment.vue b/new-client/src/widgets/chat/ui/ChatAttachment.vue new file mode 100644 index 0000000..0333b48 --- /dev/null +++ b/new-client/src/widgets/chat/ui/ChatAttachment.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/new-client/src/widgets/chat/ui/ChatInput.vue b/new-client/src/widgets/chat/ui/ChatInput.vue index f266429..72a5a96 100644 --- a/new-client/src/widgets/chat/ui/ChatInput.vue +++ b/new-client/src/widgets/chat/ui/ChatInput.vue @@ -17,39 +17,50 @@ Send - + :name="file.name" + @click="removeFile(file)" + /> + @@ -125,14 +171,11 @@ function reset() { margin-top: var(--space-2); outline: var(--border-w) dashed var(--ink); outline-offset: calc(var(--border-w) * -1); - } + overflow: hidden; - &__attachment { - padding: var(--space-1) var(--space-2); - background-color: var(--grey-1); - outline: 1px solid var(--ink); - outline-offset: -1px; - cursor: pointer; + > * { + max-width: 300px; + } } } diff --git a/new-client/src/widgets/chat/ui/ChatMessageAttachment.vue b/new-client/src/widgets/chat/ui/ChatMessageAttachment.vue index 6c0143c..49ef3e6 100644 --- a/new-client/src/widgets/chat/ui/ChatMessageAttachment.vue +++ b/new-client/src/widgets/chat/ui/ChatMessageAttachment.vue @@ -1,5 +1,5 @@