fix: restrict comments in notifications to 3 lines
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
class="flex space-x-2 px-2 py-4"
|
||||
:class="{
|
||||
'cursor-pointer': log.link,
|
||||
'items-center': !showDetails(log) && !isMention(log),
|
||||
'items-center': !showDetails(log) && !isMentionOrComment(log),
|
||||
}"
|
||||
@click="navigateToPage(log)"
|
||||
>
|
||||
@@ -56,9 +56,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="isMention(log)"
|
||||
v-if="isMentionOrComment(log)"
|
||||
v-html="log.email_content"
|
||||
class="bg-surface-gray-2 rounded-md px-3 py-2"
|
||||
class="bg-surface-gray-2 rounded-md px-3 py-2 line-clamp-3 overflow-hidden"
|
||||
></div>
|
||||
<div
|
||||
v-else-if="showDetails(log)"
|
||||
@@ -260,7 +260,7 @@ const navigateToPage = (log) => {
|
||||
}
|
||||
}
|
||||
|
||||
const isMention = (log) => {
|
||||
const isMentionOrComment = (log) => {
|
||||
if (log.type == 'Mention') {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
plugins: [require('@tailwindcss/line-clamp')],
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ def get_batch_details_for_notification(topic):
|
||||
users = []
|
||||
batch_title = frappe.db.get_value("LMS Batch", topic.reference_docname, "title")
|
||||
subject = _("New comment in batch {0}").format(batch_title)
|
||||
link = f"/lms/batches/{topic.reference_docname}"
|
||||
link = f"/lms/batches/{topic.reference_docname}#discussions"
|
||||
instructors = frappe.db.get_all(
|
||||
"Course Instructor",
|
||||
{"parenttype": "LMS Batch", "parent": topic.reference_docname},
|
||||
|
||||
Reference in New Issue
Block a user