Update ashboard (~1)

This commit is contained in:
Echo
2026-02-02 11:12:17 +00:00
parent 39a564b589
commit 9fcd43d0e8

View File

@@ -782,6 +782,43 @@
.todo-source-link { font-size: 11px; color: #3b82f6; text-decoration: none; }
.todo-source-link:hover { text-decoration: underline; }
/* Note Overlay */
.note-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
z-index: 1000;
padding: 20px;
}
.note-overlay.active { display: flex; align-items: center; justify-content: center; }
.note-overlay-content {
background: var(--bg-surface);
border-radius: 12px;
width: 90%;
max-width: 900px;
height: 85vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.note-overlay-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid var(--border-color);
}
.note-overlay-header span { font-weight: 600; color: var(--text-primary); }
#noteOverlayFrame {
flex: 1;
border: none;
width: 100%;
}
/* Button icon only */
.btn-icon {
padding: 6px;
@@ -1129,6 +1166,19 @@
</div>
</main>
<!-- Note Overlay -->
<div class="note-overlay" id="noteOverlay" onclick="if(event.target === this) closeNoteOverlay()">
<div class="note-overlay-content">
<div class="note-overlay-header">
<span id="noteOverlayTitle">Notă</span>
<button class="btn btn-icon" onclick="closeNoteOverlay()">
<i data-lucide="x"></i>
</button>
</div>
<iframe id="noteOverlayFrame" src=""></iframe>
</div>
</div>
<!-- Add Issue Modal -->
<div class="modal-overlay" id="addModal">
<div class="modal">
@@ -1621,7 +1671,7 @@
<span class="todo-domain ${todo.domain}">@${todo.domain}</span>
${todo.dueDate ? `<span class="todo-due ${isOverdue ? 'overdue' : ''}">${formatDate(todo.dueDate)}</span>` : ''}
${todo.source ? (todo.sourceUrl
? `<a href="${todo.sourceUrl}" class="todo-source-link" target="_blank" onclick="event.stopPropagation()">${todo.source}</a>`
? `<a href="${todo.sourceUrl}" class="todo-source-link" onclick="event.stopPropagation(); openNoteOverlay('${todo.sourceUrl}')" style="cursor:pointer">${todo.source}</a>`
: `<span class="todo-source">${todo.source}</span>`) : ''}
</div>
</div>
@@ -1667,6 +1717,31 @@
}
}
function openNoteOverlay(url) {
// Convert files.html URL to the actual file path for iframe
const overlay = document.getElementById('noteOverlay');
const frame = document.getElementById('noteOverlayFrame');
const title = document.getElementById('noteOverlayTitle');
// Extract filename from URL
const match = url.match(/#(.+)$/);
if (match) {
const path = match[1];
const filename = path.split('/').pop().replace('.md', '');
title.textContent = filename;
}
frame.src = url;
overlay.classList.add('active');
}
function closeNoteOverlay() {
const overlay = document.getElementById('noteOverlay');
const frame = document.getElementById('noteOverlayFrame');
overlay.classList.remove('active');
frame.src = '';
}
function showAddTodoModal() {
const text = prompt('Todo (ex: @work Verifică client X)');
if (text && text.trim()) {
@@ -1842,12 +1917,8 @@
body.innerHTML = `
<div class="empty-state">
<i data-lucide="check-circle"></i>
<p>Niciun issue. Adaugă primul!</p>
<p>Niciun issue.</p>
</div>
<button class="add-issue-btn" onclick="showAddModal()">
<i data-lucide="plus"></i>
Adaugă issue
</button>
`;
lucide.createIcons();
return;
@@ -1901,13 +1972,6 @@
`;
});
html += `
<button class="add-issue-btn" onclick="showAddModal()">
<i data-lucide="plus"></i>
Adaugă issue
</button>
`;
body.innerHTML = html;
lucide.createIcons();
}