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:
@@ -17,7 +17,7 @@ const TECH_ICON = {
|
|||||||
React: 'atom', '.NET': 'code-xml', Flutter: 'feather', Android: 'smartphone', 'C++/CMake': 'cpu',
|
React: 'atom', '.NET': 'code-xml', Flutter: 'feather', Android: 'smartphone', 'C++/CMake': 'cpu',
|
||||||
Python: 'square-terminal', Web: 'globe', Arduino: 'circuit-board',
|
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
|
// label/hint/short come from the dictionary (tier.<key>.*); here only style + icon
|
||||||
const TIER = {
|
const TIER = {
|
||||||
Cache: { cls: 'ok', icon: 'recycle' },
|
Cache: { cls: 'ok', icon: 'recycle' },
|
||||||
@@ -276,9 +276,9 @@ function warnChips(p) {
|
|||||||
function attentionOf(p) {
|
function attentionOf(p) {
|
||||||
const T = window.I18N.t
|
const T = window.I18N.t
|
||||||
const out = []
|
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 (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 (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.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 })
|
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)
|
// label is a translation key (resolved with t() at render time)
|
||||||
const QUICK = [
|
const QUICK = [
|
||||||
{ key: 'all', label: 'quick.all', icon: 'layers', test: () => true },
|
{ key: 'all', label: 'quick.all', icon: 'layers', test: () => true },
|
||||||
{ key: 'nobackup', label: 'quick.nobackup', icon: 'cloud-off', test: (p) => p.git.level === 'red' },
|
{ key: 'nobackup', label: 'quick.nobackup', icon: 'git-branch-minus', test: (p) => p.git.level === 'red' },
|
||||||
{ key: 'unsaved', label: 'quick.unsaved', icon: 'cloud-upload', test: (p) => p.git.level === 'yellow' },
|
{ 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: 'due', label: 'quick.due', icon: 'clock-alert', test: backupDue },
|
||||||
{ key: 'cleanable', label: 'quick.cleanable', icon: 'brush-cleaning', test: (p) => deletableMB(p) >= 100 },
|
{ 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 },
|
{ 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 c = cloudInfo(p)
|
||||||
const overview = `<div class="kv">
|
const overview = `<div class="kv">
|
||||||
<div>${t('info.folder')}</div><div><code>${escapeHtml(d.path)}</code></div>
|
<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('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('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>
|
<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>` }) +
|
{ id: 'info-desc', right: `<a href="#" class="jump" id="btnDescEdit">${ic('pencil', 'sm')}${desc ? t('desc.edit') : t('desc.write')}</a>` }) +
|
||||||
readmeCard +
|
readmeCard +
|
||||||
section('info', t('info.overview'), overview, { right: del >= 1 ? `<span class="adv">${jumpLink('act-clean', t('info.cleanUp'))}</span>` : '' }) +
|
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')) }) +
|
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')) })) +
|
(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('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('file-archive', t('info.releaseArchives'), arcBody, { adv: true, right: jumpLink('act-zip', t('info.makeZip')) }) +
|
||||||
section('wand-sparkles', t('info.generator'), genBody, { adv: true }) +
|
section('wand-sparkles', t('info.generator'), genBody, { adv: true }) +
|
||||||
|
|||||||
@@ -261,9 +261,9 @@ window.LANG = {
|
|||||||
'size.unscanned': 'Folder size: not scanned yet (“Scan all” above)',
|
'size.unscanned': 'Folder size: not scanned yet (“Scan all” above)',
|
||||||
'size.scanned': 'Folder size: {size} (scanned {ago})',
|
'size.scanned': 'Folder size: {size} (scanned {ago})',
|
||||||
'size.cleanable': '{size} of it cleanable',
|
'size.cleanable': '{size} of it cleanable',
|
||||||
'git.green': 'Backed up',
|
'git.green': 'Pushed',
|
||||||
'git.yellow': 'Not backed up',
|
'git.yellow': 'Not pushed',
|
||||||
'git.red': 'No remote',
|
'git.red': 'Local only',
|
||||||
'gitl.noGit': 'no Git',
|
'gitl.noGit': 'no Git',
|
||||||
'gitl.notInstalled': 'Git not installed',
|
'gitl.notInstalled': 'Git not installed',
|
||||||
'gitl.changed': '{n} changed',
|
'gitl.changed': '{n} changed',
|
||||||
@@ -591,8 +591,8 @@ window.LANG = {
|
|||||||
'kpi.scanError': 'Scan error',
|
'kpi.scanError': 'Scan error',
|
||||||
'kpi.scanHint': 'Measure size & deletable folders',
|
'kpi.scanHint': 'Measure size & deletable folders',
|
||||||
'quick.all': 'All',
|
'quick.all': 'All',
|
||||||
'quick.nobackup': 'No remote',
|
'quick.nobackup': 'Local only',
|
||||||
'quick.unsaved': 'Not backed up',
|
'quick.unsaved': 'Not pushed',
|
||||||
'quick.due': 'Backup due',
|
'quick.due': 'Backup due',
|
||||||
'quick.cleanable': 'Cleanable',
|
'quick.cleanable': 'Cleanable',
|
||||||
'quick.install': 'npm install',
|
'quick.install': 'npm install',
|
||||||
@@ -1065,9 +1065,9 @@ window.LANG = {
|
|||||||
'size.unscanned': 'Ordnergröße: noch nicht gescannt („Alle scannen“ oben)',
|
'size.unscanned': 'Ordnergröße: noch nicht gescannt („Alle scannen“ oben)',
|
||||||
'size.scanned': 'Ordnergröße: {size} (gescannt {ago})',
|
'size.scanned': 'Ordnergröße: {size} (gescannt {ago})',
|
||||||
'size.cleanable': 'davon {size} aufräumbar',
|
'size.cleanable': 'davon {size} aufräumbar',
|
||||||
'git.green': 'Gesichert',
|
'git.green': 'Gepusht',
|
||||||
'git.yellow': 'Ungesichert',
|
'git.yellow': 'Nicht gepusht',
|
||||||
'git.red': 'Kein Remote',
|
'git.red': 'Nur lokal',
|
||||||
'gitl.noGit': 'kein Git',
|
'gitl.noGit': 'kein Git',
|
||||||
'gitl.notInstalled': 'Git nicht installiert',
|
'gitl.notInstalled': 'Git nicht installiert',
|
||||||
'gitl.changed': '{n} geändert',
|
'gitl.changed': '{n} geändert',
|
||||||
@@ -1395,8 +1395,8 @@ window.LANG = {
|
|||||||
'kpi.scanError': 'Scan-Fehler',
|
'kpi.scanError': 'Scan-Fehler',
|
||||||
'kpi.scanHint': 'Größe & löschbare Ordner messen',
|
'kpi.scanHint': 'Größe & löschbare Ordner messen',
|
||||||
'quick.all': 'Alle',
|
'quick.all': 'Alle',
|
||||||
'quick.nobackup': 'Ohne Remote',
|
'quick.nobackup': 'Nur lokal',
|
||||||
'quick.unsaved': 'Ungesichert',
|
'quick.unsaved': 'Nicht gepusht',
|
||||||
'quick.due': 'Backup fällig',
|
'quick.due': 'Backup fällig',
|
||||||
'quick.cleanable': 'Aufräumbar',
|
'quick.cleanable': 'Aufräumbar',
|
||||||
'quick.install': 'npm install',
|
'quick.install': 'npm install',
|
||||||
|
|||||||
Reference in New Issue
Block a user