Skip to content

Commit

Permalink
Added a new message action: delete
Browse files Browse the repository at this point in the history
  • Loading branch information
WongSaang committed Mar 19, 2023
1 parent bd9e8bf commit 3866591
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 10 additions & 5 deletions components/MessageActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const props = defineProps({
usePrompt: {
type: Function,
required: true
},
deleteMessage: {
type: Function,
required: true
}
})
Expand Down Expand Up @@ -71,11 +75,12 @@ const deleteMessage = async () => {
prepend-icon="edit"
>
</v-list-item>
<!-- <v-list-item-->
<!-- @click="deleteMessage()"-->
<!-- >-->
<!-- <v-list-item-title>{{ $t('delete') }}</v-list-item-title>-->
<!-- </v-list-item>-->
<v-list-item
@click="deleteMessage()"
:title="$t('delete')"
prepend-icon="delete"
>
</v-list-item>
</v-list>
</v-menu>

Expand Down
2 changes: 2 additions & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const deleteMessage = (index) => {
:message="message"
:message-index="index"
:use-prompt="usePrompt"
:delete-message="deleteMessage"
/>
<v-card
:color="message.is_bot ? '' : 'primary'"
Expand All @@ -197,6 +198,7 @@ const deleteMessage = (index) => {
:message="message"
:message-index="index"
:use-prompt="usePrompt"
:delete-message="deleteMessage"
/>
</div>
</v-col>
Expand Down

0 comments on commit 3866591

Please sign in to comment.