@@ -344,6 +344,14 @@ function hideError(form) {
344344 if ( errorEl ) errorEl . classList . remove ( 'show' ) ;
345345}
346346
347+ function renderMarkdown ( text ) {
348+ if ( ! text ) return '' ;
349+ let html = escapeHtml ( text ) ;
350+ html = html . replace ( / \* \* ( .+ ?) \* \* / g, '<strong>$1</strong>' ) ;
351+ html = html . replace ( / \* ( .+ ?) \* / g, '<em>$1</em>' ) ;
352+ return html ;
353+ }
354+
347355const NOTIF_ICONS = {
348356 success : '<i data-lucide="check-circle" class="notif-icon"></i>' ,
349357 error : '<i data-lucide="x-circle" class="notif-icon"></i>' ,
@@ -394,7 +402,7 @@ function showNotifDetailModal(notif) {
394402 < i data-lucide ="x " style ="width:20px;height:20px "> </ i >
395403 </ button >
396404 </ div >
397- < div class ="notif-view-modal-body "> ${ escapeHtml ( notif . message ) } </ div >
405+ < div class ="notif-view-modal-body "> ${ renderMarkdown ( notif . message ) } </ div >
398406 </ div >
399407 ` ;
400408 document . body . appendChild ( overlay ) ;
@@ -428,7 +436,7 @@ function renderNotifications() {
428436 < div class ="notif-item-icon notif- ${ n . type } "> ${ NOTIF_ICONS [ n . type ] || NOTIF_ICONS . info } </ div >
429437 < div class ="notif-item-body ">
430438 < div class ="notif-item-title "> ${ escapeHtml ( n . title ) } </ div >
431- < div class ="notif-item-msg "> ${ escapeHtml ( n . message ) } </ div >
439+ < div class ="notif-item-msg "> ${ renderMarkdown ( n . message ) } </ div >
432440 < div class ="notif-item-time "> ${ timeAgo ( n . created_at ) } </ div >
433441 </ div >
434442 ${ n . is_read ? '' : '<div class="notif-dot"></div>' }
@@ -1654,7 +1662,7 @@ async function renderDashboard() {
16541662 < div style ="padding:8px 12px 0;display:flex;gap:16px;justify-content:center;flex-wrap:wrap ">
16551663
16561664 </ div >
1657- < div style ="padding:4px 0 8px;text-align:center;font-size:0.7rem;color:var(--text-muted);letter-spacing:0.05em "> v1.2.6 </ div >
1665+ < div style ="padding:4px 0 8px;text-align:center;font-size:0.7rem;color:var(--text-muted);letter-spacing:0.05em "> v1.2.7 </ div >
16581666 </ div >
16591667 < div class ="sidebar-resizer " id ="sidebar-resizer "> </ div >
16601668 </ aside >
0 commit comments