Skip to content

Commit 6916348

Browse files
authored
Merge pull request #48 from ZeroHost-Code/beta
v1.2.7
2 parents 0fef86f + fef82dd commit 6916348

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zerohost-dashboard",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"private": true,
55
"type": "module",
66
"scripts": {

public/js/app.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
347355
const 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>

services/security.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { readFile } from 'fs/promises';
66
const DISPOSABLE_DOMAINS_URL = 'https://raw.githubusercontent.com/disposable-email-domains/disposable-email-domains/master/disposable_email_blocklist.conf';
77
const LOCAL_DISPOSABLE_DOMAINS = new Set([
88
'ztzt.net',
9+
'besteya.com',
910
]);
1011
let disposableDomainsCache = null;
1112
let disposableDomainsTimestamp = 0;

0 commit comments

Comments
 (0)