panel: git-status von backup abgrenzen + info-tab entdoppeln

- Git-Chips heissen jetzt Gepusht/Nicht gepusht/Nur lokal (statt
  Gesichert/Ungesichert) und nutzen Git-Icons (branch/commit) statt
  Cloud-Icons -> keine Verwechslung mit dem Backup (Hard-Drive) mehr
- gilt app-weit: Kopf-Chip, Karten-Badges, Toolbar-Filter, Attention
- Info-Uebersicht: Status-Zeile raus (steht im Kopf + Bearbeiten),
  nur Prioritaet read-only; Technik-Abschnitt direkt hinter die Uebersicht

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 00:36:31 +01:00
parent 54a6a79158
commit cba85a0306
2 changed files with 17 additions and 17 deletions

View File

@@ -17,7 +17,7 @@ const TECH_ICON = {
React: 'atom', '.NET': 'code-xml', Flutter: 'feather', Android: 'smartphone', 'C++/CMake': 'cpu',
Python: 'square-terminal', Web: 'globe', Arduino: 'circuit-board',
}
const GIT_ICON = { green: 'cloud-check', yellow: 'cloud-upload', red: 'cloud-off' }
const GIT_ICON = { green: 'git-branch', yellow: 'git-commit-horizontal', red: 'git-branch-minus' }
// label/hint/short come from the dictionary (tier.<key>.*); here only style + icon
const TIER = {
Cache: { cls: 'ok', icon: 'recycle' },
@@ -276,9 +276,9 @@ function warnChips(p) {
function attentionOf(p) {
const T = window.I18N.t
const out = []
if (p.git?.level === 'red') out.push({ icon: 'cloud-off', label: T('quick.nobackup'), sev: 3 })
if (p.git?.level === 'red') out.push({ icon: 'git-branch-minus', label: T('quick.nobackup'), sev: 3 })
if (backupDue(p)) out.push({ icon: 'clock-alert', label: T('quick.due'), sev: 3 })
if (p.git?.level === 'yellow') out.push({ icon: 'cloud-upload', label: T('quick.unsaved'), sev: 2 })
if (p.git?.level === 'yellow') out.push({ icon: 'git-commit-horizontal', label: T('quick.unsaved'), sev: 2 })
if (deletableMB(p) >= 100) out.push({ icon: 'brush-cleaning', label: fmtMB(deletableMB(p)), sev: 2 })
if (p.tech?.needsInstall) out.push({ icon: 'download', label: 'npm install', sev: 2 })
if (!p.hasIcon) out.push({ icon: 'image-off', label: T('warn.noIcon'), sev: 1 })
@@ -1384,8 +1384,8 @@ const runAction = async (name, id) => {
// label is a translation key (resolved with t() at render time)
const QUICK = [
{ key: 'all', label: 'quick.all', icon: 'layers', test: () => true },
{ key: 'nobackup', label: 'quick.nobackup', icon: 'cloud-off', test: (p) => p.git.level === 'red' },
{ key: 'unsaved', label: 'quick.unsaved', icon: 'cloud-upload', test: (p) => p.git.level === 'yellow' },
{ key: 'nobackup', label: 'quick.nobackup', icon: 'git-branch-minus', test: (p) => p.git.level === 'red' },
{ key: 'unsaved', label: 'quick.unsaved', icon: 'git-commit-horizontal', test: (p) => p.git.level === 'yellow' },
{ key: 'due', label: 'quick.due', icon: 'clock-alert', test: backupDue },
{ key: 'cleanable', label: 'quick.cleanable', icon: 'brush-cleaning', test: (p) => deletableMB(p) >= 100 },
{ key: 'install', label: 'quick.install', icon: 'download', test: (p) => p.tech?.needsInstall },
@@ -2632,7 +2632,7 @@ function renderInfo(name, d) {
const c = cloudInfo(p)
const overview = `<div class="kv">
<div>${t('info.folder')}</div><div><code>${escapeHtml(d.path)}</code></div>
<div class="adv">${t('panel.status')}</div><div class="adv">${statusHtml(p.status)} <span class="hint">· ${t('prio.titled', { p: p.priority ? t('prio.' + p.priority) : '–' })}</span></div>
<div class="adv">${t('panel.priority')}</div><div class="adv">${p.priority ? t('prio.' + p.priority) : '–'}</div>
<div>${t('info.changed')}</div><div title="${escapeHtml(changeTitle(p))}">${fmtDate(lastActivity(p))} · ${timeAgo(lastActivity(p))}${p.lastChange?.file ? ` <span class="hint">· ${escapeHtml(p.lastChange.file)}</span>` : ''}</div>
<div>${t('btn.backup')}</div><div title="${escapeHtml(c.label)}"><span class="bk ${c.level}">${ic('hard-drive', 'sm')}${escapeHtml(c.short)}</span>${backupDue(p) ? ` <span class="chip warn">${t('info.due')}</span>` : ''}</div>
<div>${t('st.size')}</div><div>${s ? `<b>${fmtMB(s.sizeMB)}</b> <span class="hint">· ${t('info.scannedAgo', { ago: timeAgo(s.at) })}${del >= 1 ? ` · ${fmtMB(del)} ${t('size.cleanableWord')}` : ''}</span>` : `<span class="hint">${t('kpi.notScanned')}</span>`}</div>
@@ -2705,9 +2705,9 @@ function renderInfo(name, d) {
{ id: 'info-desc', right: `<a href="#" class="jump" id="btnDescEdit">${ic('pencil', 'sm')}${desc ? t('desc.edit') : t('desc.write')}</a>` }) +
readmeCard +
section('info', t('info.overview'), overview, { right: del >= 1 ? `<span class="adv">${jumpLink('act-clean', t('info.cleanUp'))}</span>` : '' }) +
section('cpu', t('info.tech'), `<div class="chips">${techChips(d.tech.types) || `<span class="hint">${t('info.notDetected')}</span>`}${d.tech.needsInstall ? `<span class="chip warn">${ic('download', 'sm')}${t('info.npmNeeded')}</span>` : ''}</div>`, { adv: true }) +
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')) })) +
section('cpu', t('info.tech'), `<div class="chips">${techChips(d.tech.types) || `<span class="hint">${t('info.notDetected')}</span>`}${d.tech.needsInstall ? `<span class="chip warn">${ic('download', 'sm')}${t('info.npmNeeded')}</span>` : ''}</div>`, { adv: true }) +
section('activity', t('tab.activity'), `<div id="actMini" class="hmini"><span class="hint">${t('info.loading')}</span></div>`, { right: `<span class="hint" style="font-weight:400" id="actMiniInfo"></span>` }) +
section('file-archive', t('info.releaseArchives'), arcBody, { adv: true, right: jumpLink('act-zip', t('info.makeZip')) }) +
section('wand-sparkles', t('info.generator'), genBody, { adv: true }) +