From 972248f26a92c2eed2c05c7df2ad03ebc436ec68 Mon Sep 17 00:00:00 2001 From: Michi Date: Thu, 26 Nov 2026 20:36:29 +0100 Subject: [PATCH] wow-politur: akzentfarbe waehlbar, sanfte ansichtswechsel, freundliche leerzustaende - Einstellungen -> Allgemein: Akzentfarbe (8 Presets + eigener Farbwaehler), per color-mix theme-aware abgeleitet, in localStorage gespeichert - sanfter Fade + einmaliges Karten-Stagger beim View-Wechsel (Guard-Flag, respektiert prefers-reduced-motion) - Leerzustaende: "nichts passt zu deinen Filtern" + Filter zuruecksetzen, sonst "noch keine Projekte" + Neues Projekt (im Demo-Limit ausgeblendet) in Board/Galerie/Liste/Home - README als Markdown im Info-Panel (server: readmeFull-Feld) Co-Authored-By: Claude Opus 4.8 --- public/app.js | 155 +++++++++++++++++++++++++++++++++++++++++++++- public/index.html | 78 +++++++++++++++++++++++ public/lang.js | 30 ++++++++- server.js | 12 ++++ 4 files changed, 271 insertions(+), 4 deletions(-) diff --git a/public/app.js b/public/app.js index 98cd060..1f3323f 100644 --- a/public/app.js +++ b/public/app.js @@ -54,6 +54,39 @@ function escapeHtml(s) { return String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c])) } +// Small, dependency-free Markdown -> HTML for a project's README. Everything is escaped first, so no +// raw HTML from the file can run; then a safe subset is formatted. Links only for http(s), open extern. +function renderMarkdown(src) { + const esc = escapeHtml(String(src ?? '').replace(/\r\n?/g, '\n')) + const inline = (s) => s + .replace(/`([^`]+)`/g, (_, c) => `${c}`) + .replace(/\[([^\]]+)\]\((https?:[^)\s]+)\)/g, (_, txt, url) => `${txt}`) + .replace(/(^|[^*])\*\*([^*\n]+)\*\*/g, '$1$2') + .replace(/(^|[^*_])[*_]([^*_\n]+)[*_]/g, '$1$2') + const lines = esc.split('\n') + let html = '', i = 0 + const closeList = (stack) => { while (stack.length) html += stack.pop() } + const listStack = [] + while (i < lines.length) { + const line = lines[i] + // fenced code block + if (/^\s*```/.test(line)) { closeList(listStack); i++; const buf = []; while (i < lines.length && !/^\s*```/.test(lines[i])) buf.push(lines[i++]); i++; html += `
${buf.join('\n')}
`; continue } + if (/^\s*(---|\*\*\*|___)\s*$/.test(line)) { closeList(listStack); html += '
'; i++; continue } + const h = line.match(/^(#{1,6})\s+(.*)$/) + if (h) { closeList(listStack); html += `${inline(h[2].trim())}`; i++; continue } + const q = line.match(/^\s*>\s?(.*)$/) // '>' was escaped to > + if (q) { closeList(listStack); const buf = []; let m = q; while (i < lines.length && (m = lines[i].match(/^\s*>\s?(.*)$/))) { buf.push(m[1]); i++ } html += `
${inline(buf.join(' '))}
`; continue } + const li = line.match(/^(\s*)([-*+]|\d+\.)\s+(.*)$/) + if (li) { const ordered = /\d/.test(li[2]); const want = ordered ? '' : ''; if (listStack[listStack.length - 1] !== want) { closeList(listStack); html += ordered ? '
    ' : '
      '; listStack.push(want) } html += `
    • ${inline(li[3].trim())}
    • `; i++; continue } + if (!line.trim()) { closeList(listStack); i++; continue } + // paragraph: gather until blank + closeList(listStack); const buf = [line]; i++; while (i < lines.length && lines[i].trim() && !/^\s*(#|>|```|[-*+]\s|\d+\.\s|---|\*\*\*)/.test(lines[i])) buf.push(lines[i++]) + html += `

      ${inline(buf.join(' '))}

      ` + } + closeList(listStack) + return html +} + function timeAgo(iso) { if (!iso) return '' const days = Math.floor((Date.now() - new Date(iso)) / 86400000) @@ -92,6 +125,7 @@ function avatar(p, cls = '') { const deletableMB = (p) => p.storage ? p.storage.deletable.Cache + p.storage.deletable.Release + p.storage.deletable.Output : 0 // last change = newest file in the project (server: lib/activity.js), else last commit / folder date const lastActivity = (p) => p.lastChange?.at ?? p.lastCommit?.date ?? p.mtime +const isToday = (iso) => { if (!iso) return false; const d = new Date(iso), n = new Date(); return d.getFullYear() === n.getFullYear() && d.getMonth() === n.getMonth() && d.getDate() === n.getDate() } function fmtDate(iso, withYear = true) { if (!iso) return '–' @@ -1370,6 +1404,30 @@ function sortProjects(items) { }) } +// is any search / quick-filter / status filter narrowing the list right now? +function filtersActive() { + const status = document.getElementById('fltStatus')?.value ?? 'all' + return !!searchTerm.trim() || quickFilter !== 'all' || status !== 'all' || (activeView === 'home' && homeStatus !== 'all') +} +function clearFilters() { + searchTerm = '' + const s = document.getElementById('search'); if (s) s.value = '' + quickFilter = 'all' + const fs = document.getElementById('fltStatus'); if (fs) fs.value = 'all' + homeStatus = 'all' + render() +} +// friendly empty state: "no matches + reset" when filtering, else "no projects + new" (hidden when demo caps) +function emptyState() { + const T = window.I18N.t + if (filtersActive()) + return `
      ${ic('search-x', 'xl')}
      ${T('empty.noMatch')}
      ` + + `
      ` + const act = demoBlocksNew() ? '' : + `` + return `
      ${ic('folder-open', 'xl')}
      ${T('empty.noProjects')}
      ${act}
      ` +} + /* ── header: KPIs, quick filters ──────────────────────────────────────── */ function renderKpis() { @@ -1555,6 +1613,7 @@ function renderBoard() { const board = document.getElementById('board') board.innerHTML = '' const visible = visibleProjects({ useStatus: false }) + if (!visible.length) { board.innerHTML = `
      ${emptyState()}
      `; return } for (const col of STATUS) { const items = visible @@ -1600,7 +1659,7 @@ function renderBoard() { function renderGallery() { const grid = document.getElementById('galleryGrid') const items = sortProjects(visibleProjects()) - if (!items.length) { grid.innerHTML = `
      ${ic('search-x', 'xl')}
      ${t('empty.noProjects')}
      `; return } + if (!items.length) { grid.innerHTML = emptyState(); return } grid.innerHTML = '' for (const p of items) { const tile = document.createElement('div') @@ -1654,7 +1713,7 @@ function renderList() { - `).join('') || `${t('empty.noProjects')}`}` + `).join('') || `${emptyState()}`}` for (const th of table.querySelectorAll('th[data-sort]')) { th.onclick = () => { document.getElementById('fltSort').value = th.dataset.sort; render() } } @@ -1727,7 +1786,45 @@ function sortHome(items) { } const HL_SEG = [{ k: 'cards', ic: 'layout-grid', key: 'home.cards' }, { k: 'compact', ic: 'grid-2x2', key: 'home.compact' }, { k: 'list', ic: 'list', key: 'home.list' }] const HL_SORT = [{ k: 'mtime', key: 'flt.sort.mtime' }, { k: 'name', key: 'flt.sort.name' }, { k: 'size', key: 'flt.sort.size' }] +// "Today" band on the home page: greeting, continue-where-you-left-off, quick stats. From the loaded +// projects only (no extra request). Shown on the default home (no filter, no search). +let todayOpen = (() => { try { return localStorage.getItem('dash.todayOpen') !== '0' } catch { return true } })() +function renderToday() { + const band = document.getElementById('todayBand') + if (!band) return + if (homeStatus !== 'all' || searchTerm.trim()) { band.innerHTML = ''; return } + const live = projects.filter((p) => p.status !== 'archived') + const recent = [...live].sort((a, b) => new Date(lastActivity(b)) - new Date(lastActivity(a))).slice(0, 3) + const changed = live.filter((p) => isToday(lastActivity(p))).length + const due = projects.filter(backupDue).length + const active = projects.filter((p) => p.status === 'active').length + const h = new Date().getHours() + const greet = t(h < 5 ? 'today.night' : h < 11 ? 'today.morning' : h < 17 ? 'today.day' : h < 22 ? 'today.evening' : 'today.night') + const dateStr = new Date().toLocaleDateString(I18N.locale(), { weekday: 'long', day: 'numeric', month: 'long' }) + const chip = (icon, n, label, q) => n ? `` : '' + const stats = chip('file-pen', changed, t('today.changed'), 'all') + chip('clock-alert', due, t('today.due'), 'due') + chip('rocket', active, t('today.active'), 'active') + const cards = recent.map((p) => `
      + ${avatar(p)}${escapeHtml(p.name)}${statusHtml(p.status)}· ${timeAgo(lastActivity(p))}${qsGroup(p, true, false)}
      `).join('') + band.innerHTML = `
      +
      +
      ${greet}
      ${dateStr}
      +
      ${stats}
      + +
      +
      ${cards}${recent.length ? `${ic('activity', 'sm')}${t('today.activity')}` : ''}
      +
      ` + band.querySelector('.today-toggle').onclick = () => { todayOpen = !todayOpen; try { localStorage.setItem('dash.todayOpen', todayOpen ? '1' : '0') } catch {}; band.querySelector('.today').classList.toggle('closed', !todayOpen) } + for (const b of band.querySelectorAll('.tchip')) b.onclick = () => { homeStatus = b.dataset.q; renderHome() } + band.querySelector('.today-act')?.addEventListener('click', (e) => { e.preventDefault(); setView('activity') }) + for (const b of band.querySelectorAll('.tcard')) { + const p = projects.find((x) => x.name === b.dataset.open) + b.onclick = (e) => { if (!e.target.closest('.qsg')) openEditor(p) } + wireQuickStart(b, p) + } +} + function renderHome() { + renderToday() const base = projects.filter(matchesSearch) const pills = HOME_PILLS.map((q) => { const n = base.filter(pillTest(q)).length @@ -1785,8 +1882,13 @@ const ADV_VIEWS = ['board', 'gallery', 'list'] function setView(view) { if (uiMode === 'simple' && ADV_VIEWS.includes(view)) view = 'home' if (uiMode === 'advanced' && view === 'home') view = lastAdvView() + const changed = activeView !== view activeView = view for (const el of document.querySelectorAll('.view')) el.classList.toggle('active', el.id === view) + if (changed) { // one-shot stagger flag; render() builds the cards, flag clears after the animation + document.body.classList.add('switching') + clearTimeout(setView._t); setView._t = setTimeout(() => document.body.classList.remove('switching'), 500) + } for (const btn of document.querySelectorAll('#tabs button')) btn.classList.toggle('active', btn.dataset.view === view) document.body.classList.toggle('view-wide', WIDE_VIEWS.includes(view)) updateToolbarForView() @@ -2484,10 +2586,19 @@ function renderInfo(name, d) { ` + // README rendered as markdown (collapsible; open by default when short) + const readmeCard = d.readmeFull + ? `
      +

      ${ic('book-open')}README

      ${ic('chevron-down', 'sm')}
      +
      ${renderMarkdown(d.readmeFull)}
      +
      ` + : '' + const el = document.getElementById('sec-info') el.innerHTML = section('notebook-text', t('info.description'), `
      ${descBody}
      ${descEdit}`, { id: 'info-desc', right: `${ic('pencil', 'sm')}${desc ? t('desc.edit') : t('desc.write')}` }) + + readmeCard + section('info', t('info.overview'), overview, { right: del >= 1 ? `${jumpLink('act-clean', t('info.cleanUp'))}` : '' }) + section('git-branch', 'Git', gitBody, { adv: true, right: jumpLink('act-git', g.isRepo ? t('info.pushRemote') : t('set.setup')) }) + (name === '_Tools' || !itchOn() ? '' : section('rocket', 'itch.io', itchBody, { adv: true, right: jumpLink('act-itch', ip.exists ? t('info.view') : t('info.generate')) })) + @@ -3420,6 +3531,45 @@ function applyTheme() { const theme = themeMode === 'system' ? (systemDark.matches ? 'dark' : 'light') : themeMode document.documentElement.dataset.theme = theme for (const b of document.querySelectorAll('#themeSeg button')) b.classList.toggle('active', b.dataset.mode === themeMode) + applyAccent() // accent is derived per theme, so recompute on every theme change +} + +/* ── accent colour (Einstellungen → Allgemein → Darstellung) ──────────── */ +// All accent CSS vars are derived from one chosen base colour via color-mix, theme-aware. Not set = +// the hand-tuned defaults in index.html stay untouched. +const ACCENTS = ['#6366f1', '#3b82f6', '#06b6d4', '#10b981', '#f59e0b', '#ef4444', '#ec4899', '#a855f7'] +let accentBase = (() => { try { return localStorage.getItem('dash.accent') || '' } catch { return '' } })() +function applyAccent() { + const r = document.documentElement, s = r.style + if (!accentBase) { for (const v of ['--accent', '--accent-2', '--accent-soft', '--accent-text']) s.removeProperty(v); return } + const dark = r.dataset.theme === 'dark' + const base = accentBase + const accent = dark ? `color-mix(in srgb, ${base} 78%, #fff)` : base + s.setProperty('--accent', accent) + s.setProperty('--accent-2', `color-mix(in srgb, ${base} 65%, ${dark ? '#c084fc' : '#a855f7'})`) + s.setProperty('--accent-soft', dark ? `color-mix(in srgb, ${base} 30%, #171a23)` : `color-mix(in srgb, ${base} 13%, #fff)`) + s.setProperty('--accent-text', dark ? `color-mix(in srgb, ${base} 45%, #fff)` : `color-mix(in srgb, ${base} 72%, #1e1b4b)`) +} +function setAccent(hex) { + accentBase = /^#[0-9a-f]{6}$/i.test(hex || '') && hex.toLowerCase() !== '#6366f1' ? hex.toLowerCase() : '' + try { accentBase ? localStorage.setItem('dash.accent', accentBase) : localStorage.removeItem('dash.accent') } catch {} + applyAccent() + renderAccentPicker() +} +function renderAccentPicker() { + const box = document.getElementById('accentSwatches') + if (!box) return + const cur = accentBase || '#6366f1' + box.innerHTML = ACCENTS.map((c) => ``).join('') + for (const b of box.querySelectorAll('[data-accent]')) b.onclick = () => setAccent(b.dataset.accent) + const custom = document.getElementById('accentCustom') + if (custom) { custom.value = cur; const lab = custom.closest('.swatch'); if (lab) lab.classList.toggle('active', !ACCENTS.includes(cur)) } +} +function initAccent() { + applyAccent() + renderAccentPicker() + const custom = document.getElementById('accentCustom') + if (custom) custom.oninput = (e) => setAccent(e.target.value) } function setThemeMode(mode) { themeMode = ['light', 'dark', 'system'].includes(mode) ? mode : 'system' @@ -3566,6 +3716,7 @@ document.addEventListener('keydown', (e) => { const [hashView, hashProject, hashSec] = decodeURIComponent(location.hash.slice(1)).split('/') const VIEWS = ['home', 'board', 'gallery', 'list', 'tasks', 'storage', 'activity'] initTheme() +initAccent() initLang() initUiMode() if (VIEWS.includes(hashView)) setView(hashView) diff --git a/public/index.html b/public/index.html index 0edd0e0..7137ec7 100644 --- a/public/index.html +++ b/public/index.html @@ -136,6 +136,20 @@ main { padding: 14px 22px 40px; } .view { display: none; } .view.active { display: block; } + /* soft view switch + one-shot card stagger (only when the body flag is set, not on every render) */ + @keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } } + @keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } } + body.switching .view.active { animation: viewIn .24s ease both; } + body.switching .view.active .card, body.switching .view.active .htile { animation: cardIn .28s ease both; } + body.switching .view.active .card:nth-child(1), body.switching .view.active .htile:nth-child(1) { animation-delay: .02s; } + body.switching .view.active .card:nth-child(2), body.switching .view.active .htile:nth-child(2) { animation-delay: .05s; } + body.switching .view.active .card:nth-child(3), body.switching .view.active .htile:nth-child(3) { animation-delay: .08s; } + body.switching .view.active .card:nth-child(4), body.switching .view.active .htile:nth-child(4) { animation-delay: .11s; } + body.switching .view.active .card:nth-child(5), body.switching .view.active .htile:nth-child(5) { animation-delay: .14s; } + body.switching .view.active .card:nth-child(n+6), body.switching .view.active .htile:nth-child(n+6) { animation-delay: .16s; } + @media (prefers-reduced-motion: reduce) { + body.switching .view.active, body.switching .view.active .card, body.switching .view.active .htile { animation: none; } + } /* ── shared bits ─────────────────────────────────────────────────────── */ .avatar { position: relative; width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; background: var(--c); } @@ -164,6 +178,10 @@ .prio { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); } .prio.high { color: var(--red); } .empty { color: var(--muted); font-size: 13px; padding: 24px; text-align: center; } + .empty.rich { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 24px; } + .empty.rich svg { width: 40px; height: 40px; color: var(--accent); opacity: .55; } + .empty.rich .et { font-size: 14px; font-weight: 600; color: var(--text); } + .boardempty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 50vh; } /* ── board ───────────────────────────────────────────────────────────── */ #board.active { display: grid; grid-template-columns: repeat(5, minmax(260px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; } @@ -260,6 +278,27 @@ .card-sec h4 .i { color: var(--accent); } .dangerzone { border-color: var(--red); background: var(--red-soft); } .dangerzone .hint { color: var(--red); opacity: .95; } + /* README card: collapsible, with rendered-markdown typography */ + .mdcard { padding: 0; } + .mdcard > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 12px 14px; } + .mdcard > summary::-webkit-details-marker { display: none; } + .mdcard > summary h4 { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 7px; flex: 1; } + .mdcard > summary > .i { color: var(--muted); transition: transform .15s; } + .mdcard[open] > summary > .i { transform: rotate(180deg); } + .mdcard .md { padding: 0 14px 14px; max-height: 420px; overflow: auto; } + .md { font-size: 13px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; } + .md h1, .md h2, .md h3, .md h4 { margin: 14px 0 6px; line-height: 1.3; } + .md h1 { font-size: 17px; } .md h2 { font-size: 15px; } .md h3 { font-size: 14px; } .md h4 { font-size: 13px; } + .md > :first-child { margin-top: 0; } + .md p { margin: 7px 0; } + .md a { color: var(--accent-text); } + .md ul, .md ol { margin: 7px 0; padding-left: 22px; } + .md li { margin: 2px 0; } + .md code { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; } + .md pre { background: var(--surface-3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 8px 0; } + .md pre code { background: none; padding: 0; font-size: 12px; } + .md blockquote { margin: 8px 0; padding: 2px 12px; border-left: 3px solid var(--border-strong); color: var(--muted); } + .md hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; } .kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 13px; } .kv > div:nth-child(odd) { color: var(--muted); } .kv > div { word-break: break-word; } @@ -297,6 +336,29 @@ #home.active { display: flex; flex-direction: column; } #home .homebar { flex: 0 0 auto; } #home #homeGrid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; } + #home #todayBand { flex: 0 0 auto; } + /* "Today" welcome band */ + .today { border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface); padding: 14px 16px; margin-bottom: 14px; } + .today-head { display: flex; align-items: center; gap: 14px; } + .today-greet { font-size: 17px; font-weight: 700; letter-spacing: -.01em; } + .today-date { font-size: 12.5px; color: var(--muted); margin-top: 1px; text-transform: capitalize; } + .today-stats { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; } + .tchip { font: inherit; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; } + .tchip:hover { border-color: var(--accent); color: var(--text); } + .tchip b { color: var(--text); font-variant-numeric: tabular-nums; } + .today-toggle { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; } + .today-toggle .i { transition: transform .18s; } + .today.closed .today-toggle .i { transform: rotate(-90deg); } + .today-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; align-items: start; } + .today.closed .today-body { display: none; } + .tcard { font: inherit; text-align: left; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; min-width: 0; transition: transform .12s, border-color .12s, box-shadow .12s; } + .tcard:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); } + .tcard .avatar { width: 38px; height: 38px; flex: 0 0 38px; } + .tcard .tc-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; } + .tcard .tc-name { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .tcard .tc-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; } + .tcard .qsg { margin-left: auto; } + .today-act { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent-text); font-weight: 600; text-decoration: none; width: max-content; } /* activity page */ #activity.active { overflow-y: auto; overflow-x: hidden; padding-right: 4px; } .heatscroll { overflow-x: auto; padding-bottom: 4px; } @@ -849,6 +911,14 @@ .tour-bubble .tb-step { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; } .tour-bubble .btn { padding: 5px 10px; font-size: 12.5px; } .tour-bubble .iconbtn { width: 30px; height: 30px; } + .accentrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } + .swatches { display: flex; gap: 7px; flex-wrap: wrap; } + .swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: var(--sw); cursor: pointer; padding: 0; position: relative; transition: transform .12s; } + .swatch:hover { transform: scale(1.12); } + .swatch.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; } + .swatch.custom { background: conic-gradient(red, orange, yellow, lime, cyan, blue, magenta, red); overflow: hidden; display: grid; place-items: center; } + .swatch.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; } + .swatch.custom.active { border-color: var(--text); } .resetrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; } .resetrow .btn { flex: 0 0 auto; } .resetrow .hint { flex: 1; min-width: 200px; } @@ -1001,6 +1071,7 @@
      +
      @@ -1254,6 +1325,13 @@ +
      + +
      +
      + +
      +

      Data

      diff --git a/public/lang.js b/public/lang.js index 256c6d1..530f0c8 100644 --- a/public/lang.js +++ b/public/lang.js @@ -184,6 +184,7 @@ window.LANG = { 'set.general.p': 'Language, data location, window and features.', 'set.data.h': 'Data', 'set.language': 'Language', + 'set.accent': 'Accent colour', 'set.openData': 'Open data folder', 'set.export': 'Export settings', 'set.import': 'Import settings', @@ -608,7 +609,10 @@ window.LANG = { 'qs.explorer': 'Open folder in Explorer', 'qs.vscode': 'Open in VS Code', 'tasks.openN': '{n} open tasks', - 'empty.noProjects': 'No projects found.', + 'empty.noProjects': 'No projects yet.', + 'empty.noMatch': 'Nothing matches your filters.', + 'empty.resetFilters': 'Reset filters', + 'empty.newProject': 'New project', 'home.noDesc': 'No description', 'home.favorites': 'Favorites', 'home.allProjects': 'All projects', @@ -772,6 +776,15 @@ window.LANG = { 'demo.buy': 'Get the full version', 'demo.newBlocked': 'The demo is limited to {n} projects – click here to get the full version.', 'demo.badge': 'Demo', + 'today.morning': 'Good morning', + 'today.day': 'Good afternoon', + 'today.evening': 'Good evening', + 'today.night': 'Good night', + 'today.changed': 'changed today', + 'today.due': 'backup due', + 'today.active': 'active', + 'today.toggle': 'Collapse / expand', + 'today.activity': 'See full activity', 'help.g.setup': 'Setup', 'tour.setup.welcome': 'Welcome! Let’s set up the dashboard in three short steps: project folders, backup (optional) and general settings. Use “Next” whenever you’re ready.', 'tour.setup.folders': '1 · Project folders – enter the folder that holds your projects (or “Browse…”). Every subfolder becomes a project. You can add several.', @@ -965,6 +978,7 @@ window.LANG = { 'set.general.p': 'Sprache, Datenablage, Fenster und Funktionen.', 'set.data.h': 'Daten', 'set.language': 'Sprache', + 'set.accent': 'Akzentfarbe', 'set.openData': 'Datenordner öffnen', 'set.export': 'Einstellungen exportieren', 'set.import': 'Einstellungen importieren', @@ -1389,7 +1403,10 @@ window.LANG = { 'qs.explorer': 'Ordner im Explorer öffnen', 'qs.vscode': 'In VS Code öffnen', 'tasks.openN': '{n} offene Aufgaben', - 'empty.noProjects': 'Keine Projekte gefunden.', + 'empty.noProjects': 'Noch keine Projekte.', + 'empty.noMatch': 'Nichts passt zu deinen Filtern.', + 'empty.resetFilters': 'Filter zurücksetzen', + 'empty.newProject': 'Neues Projekt', 'home.noDesc': 'Keine Beschreibung', 'home.favorites': 'Favoriten', 'home.allProjects': 'Alle Projekte', @@ -1553,6 +1570,15 @@ window.LANG = { 'demo.buy': 'Vollversion holen', 'demo.newBlocked': 'Die Demo ist auf {n} Projekte begrenzt – hier klicken für die Vollversion.', 'demo.badge': 'Demo', + 'today.morning': 'Guten Morgen', + 'today.day': 'Guten Tag', + 'today.evening': 'Guten Abend', + 'today.night': 'Gute Nacht', + 'today.changed': 'heute geändert', + 'today.due': 'Backup fällig', + 'today.active': 'aktiv', + 'today.toggle': 'Ein-/ausklappen', + 'today.activity': 'Volle Aktivität ansehen', 'help.g.setup': 'Einrichten', 'tour.setup.welcome': 'Willkommen! Wir richten das Dashboard in drei kurzen Schritten ein: Projektordner, Backup (optional) und Allgemein. Klick auf „Weiter“, wenn du bereit bist.', 'tour.setup.folders': '1 · Projektordner – trag den Ordner ein, in dem deine Projekte liegen (oder „Durchsuchen…“). Jeder Unterordner wird ein Projekt. Mehrere sind möglich.', diff --git a/server.js b/server.js index 727f2ba..a6072e7 100644 --- a/server.js +++ b/server.js @@ -130,6 +130,17 @@ function readmeIntro(projectPath) { return out.length > 800 ? out.slice(0, 797).replace(/\s+\S*$/, '') + '…' : out } +// Raw README text (first ~20 KB) for the client's markdown view. Path-confined to the project folder. +function readmeRaw(projectPath) { + for (const f of ['README.md', 'readme.md', 'Readme.md', 'README.txt', 'README']) { + try { + const text = fs.readFileSync(path.join(projectPath, f), 'utf-8').replace(/^/, '') + return text.length > 20000 ? text.slice(0, 20000) : text + } catch {} + } + return '' +} + function readStatusFile(projectPath) { const file = path.join(projectPath, STATUS_FILE) try { @@ -799,6 +810,7 @@ app.get('/api/projects/:name/details', handle(async (req, res) => { archives: archive.listArchives(projectPath), itchPack: settings.itchOn() ? itchpack.summary(projectPath) : null, readme: readmeIntro(projectPath), + readmeFull: readmeRaw(projectPath), }) }))