Skip to content

Commit

Permalink
Refactor message component UI and fix modal style
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho committed Sep 5, 2024
1 parent 736ce88 commit 21e4dc7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions web/src/views/chat/components/Message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,22 @@ function handleDelete() {
<!--
<AudioPlayer :text="text || ''" :right="inversion" class="mr-2" />
-->
<HoverButton :tooltip="$t('common.delete')"
class="transition text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-300"
@click="handleDelete">
<SvgIcon icon="ri:delete-bin-line" />
</HoverButton>
<HoverButton :tooltip="$t('common.edit')"
class="transition text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-300" @click="handleEdit">
class="transition text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-300"
@click="handleEdit">
<SvgIcon icon="ri:edit-line" />
</HoverButton>
<HoverButton :tooltip="$t('chat.copy')"
class="transition text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-300" @click="handleCopy">
class="transition text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-300"
@click="handleCopy">
<SvgIcon icon="ri:file-copy-2-line" />
</HoverButton>
<HoverButton :tooltip="$t('common.delete')"
class="transition text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-300" @click="handleDelete">
<SvgIcon icon="ri:delete-bin-line" />
</HoverButton>

</div>
</div>

Expand All @@ -125,7 +129,7 @@ function handleDelete() {
</div>

<!-- Updated modal for editing -->
<NModal v-model:show="showEditModal" :mask-closable="false" style="width: 90%; max-width: 800px;">
<NModal v-model:show="showEditModal" :mask-closable="false" style="width: 90%; max-width: 800px;">
<NCard :bordered="false" size="medium" role="dialog" aria-modal="true" :title="$t('common.edit')">

<NInput v-model:value="editedText" type="textarea" :autosize="{ minRows: 10, maxRows: 20 }" :autofocus="true" />
Expand Down

0 comments on commit 21e4dc7

Please sign in to comment.