Skip to content

Commit

Permalink
fix: mail issue
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Jan 17, 2025
1 parent d70b24a commit ec7c09a
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions packages/Webkul/Admin/src/Resources/views/mail/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="flex flex-col gap-2">
<div class="flex cursor-pointer items-center">
{!! view_render_event('admin.mail.create.breadcrumbs.before') !!}

<!-- breadcrumbs -->
<x-admin::breadcrumbs
name="mail.route"
Expand Down Expand Up @@ -218,11 +218,13 @@ class="flex items-center gap-1 rounded-2xl bg-rose-100 px-2 py-1"
<!-- Subject -->
<p class="line-clamp-1 text-sm text-gray-900 dark:text-gray-100" v-text="record.subject"></p>
<!-- Reply(Content) -->
<p
class="!font-normal"
v-html="truncatedReply(record.reply)"
></p>
<!-- Reply (Content) -->
<p
class="!font-normal"
v-html="truncatedReply(record.reply)"
>
</p>
</div>
</div>
<!-- Time -->
Expand Down Expand Up @@ -283,7 +285,7 @@ class="w-[calc(100%-62px)]"
:label="trans('admin::app.mail.index.mail.to')"
:placeholder="trans('admin::app.mail.index.mail.enter-emails')"
/>
<div class="absolute top-[9px] flex items-center gap-2 ltr:right-2 rtl:left-2">
<span
class="cursor-pointer font-medium hover:underline dark:text-white"
Expand Down Expand Up @@ -489,6 +491,16 @@ class="primary-button"
},
methods: {
truncatedReply(reply) {
const maxLength = 100;
if (reply.length > maxLength) {
return `${reply.substring(0, maxLength)}...`;
}
return reply;
},
toggleModal() {
this.draft.reply_to = [];
Expand Down Expand Up @@ -549,7 +561,7 @@ class="primary-button"
this.showCC = this.draft.cc.length > 0;
this.showBCC = this.draft.bcc.length > 0;
})
.catch(error => {});
},
Expand Down

0 comments on commit ec7c09a

Please sign in to comment.