Ecosistem multi-agent complet
- SOUL-base.md partajat pentru toți agenții - 5 agenți specializați: work, health, growth, sprijin, scout - Fiecare agent cu SOUL.md, TOOLS.md, USER.md, AGENTS.md proprii - Symlinks pentru resurse partajate (notes/, kanban/, projects/) - Tags de domeniu (@work, @health, etc.) în YouTube notes - Script update_notes_index.py îmbunătățit cu domenii - HEARTBEAT.md cu verificări periodice - Grup sprijin pagină și fișe activități - Cleanup: șters agents/echo/ orfan
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<title>Echo · Files</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<script src="swipe-nav.js"></script>
|
||||
<style>
|
||||
.main {
|
||||
@@ -240,6 +241,40 @@
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#markdownPreview {
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: var(--space-5);
|
||||
overflow-y: auto;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
#markdownPreview h1, #markdownPreview h2, #markdownPreview h3 {
|
||||
color: var(--text-primary);
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#markdownPreview h1 { font-size: 1.8em; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
|
||||
#markdownPreview h2 { font-size: 1.4em; }
|
||||
#markdownPreview h3 { font-size: 1.2em; }
|
||||
|
||||
#markdownPreview p { margin-bottom: 1em; }
|
||||
#markdownPreview ul, #markdownPreview ol { margin-bottom: 1em; padding-left: 2em; }
|
||||
#markdownPreview li { margin-bottom: 0.3em; }
|
||||
#markdownPreview strong { color: var(--text-primary); }
|
||||
#markdownPreview hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
|
||||
#markdownPreview code { background: var(--bg-surface); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); }
|
||||
#markdownPreview pre { background: var(--bg-surface); padding: 1em; border-radius: 8px; overflow-x: auto; }
|
||||
#markdownPreview blockquote { border-left: 3px solid var(--accent); padding-left: 1em; margin-left: 0; color: var(--text-muted); }
|
||||
|
||||
.preview-active #codeEditor { display: none; }
|
||||
.preview-active #markdownPreview { display: block; }
|
||||
|
||||
.btn-preview.active { background: var(--accent); color: white; }
|
||||
|
||||
.editor-footer {
|
||||
padding: var(--space-2) var(--space-5);
|
||||
background: var(--bg-surface);
|
||||
@@ -301,6 +336,10 @@
|
||||
<i data-lucide="folder"></i>
|
||||
<span>Files</span>
|
||||
</a>
|
||||
<a href="grup-sprijin.html" class="nav-item">
|
||||
<i data-lucide="heart-handshake"></i>
|
||||
<span>Grup</span>
|
||||
</a>
|
||||
<button class="theme-toggle" onclick="toggleTheme()" title="Schimbă tema">
|
||||
<i data-lucide="sun" id="themeIcon"></i>
|
||||
</button>
|
||||
@@ -344,6 +383,9 @@
|
||||
<button class="btn btn-ghost" onclick="showBrowse()" title="Înapoi">
|
||||
<i data-lucide="arrow-left"></i>
|
||||
</button>
|
||||
<button class="btn btn-ghost btn-preview" onclick="togglePreview()" id="previewBtn" style="display:none;" title="Preview Markdown">
|
||||
<i data-lucide="eye"></i>
|
||||
</button>
|
||||
<button class="btn btn-ghost" onclick="reloadFile()" id="reloadBtn" disabled title="Reload">
|
||||
<i data-lucide="refresh-cw"></i>
|
||||
</button>
|
||||
@@ -353,8 +395,9 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-body">
|
||||
<div class="editor-body" id="editorBody">
|
||||
<textarea id="codeEditor" placeholder="Selectează un fișier..."></textarea>
|
||||
<div id="markdownPreview"></div>
|
||||
</div>
|
||||
<div class="editor-footer">
|
||||
<span id="statusText">Ready</span>
|
||||
@@ -536,6 +579,14 @@
|
||||
document.getElementById('reloadBtn').disabled = false;
|
||||
document.getElementById('fileInfo').textContent = formatSize(data.size);
|
||||
|
||||
// Show preview button for markdown files
|
||||
const isMarkdown = path.endsWith('.md');
|
||||
document.getElementById('previewBtn').style.display = isMarkdown ? 'flex' : 'none';
|
||||
|
||||
// Reset preview state
|
||||
document.getElementById('editorBody').classList.remove('preview-active');
|
||||
document.getElementById('previewBtn').classList.remove('active');
|
||||
|
||||
if (data.truncated) {
|
||||
setStatus('Fișier trunchiat', 'error');
|
||||
} else {
|
||||
@@ -546,6 +597,26 @@
|
||||
showEditor();
|
||||
}
|
||||
|
||||
function togglePreview() {
|
||||
const editorBody = document.getElementById('editorBody');
|
||||
const previewBtn = document.getElementById('previewBtn');
|
||||
const preview = document.getElementById('markdownPreview');
|
||||
const content = document.getElementById('codeEditor').value;
|
||||
|
||||
if (editorBody.classList.contains('preview-active')) {
|
||||
// Switch to edit mode
|
||||
editorBody.classList.remove('preview-active');
|
||||
previewBtn.classList.remove('active');
|
||||
setStatus('Edit mode', 'saved');
|
||||
} else {
|
||||
// Switch to preview mode
|
||||
preview.innerHTML = marked.parse(content);
|
||||
editorBody.classList.add('preview-active');
|
||||
previewBtn.classList.add('active');
|
||||
setStatus('Preview mode', 'saved');
|
||||
}
|
||||
}
|
||||
|
||||
async function saveFile() {
|
||||
if (!currentFile) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user