feat: Verlauf löschbar, Lösch-Bestätigung, HEX/RGB/HSL Tooltips
- Verlauf: neuer Button 'Verlauf löschen' mit Bestätigungsdialog - Löschen von Favoriten und Schemata erfordert jetzt Bestätigung - HEX, RGB und HSL Labels in Picker- und Eingabe-Tab mit ℹ Tooltip Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -287,7 +287,10 @@ function renderSchemaCard(node, container, allSchemata, depth) {
|
||||
delBtn.className = 'action-btn';
|
||||
delBtn.textContent = 'Löschen';
|
||||
delBtn.style.fontSize = '0.75rem';
|
||||
delBtn.addEventListener('click', () => deleteSchema(node.name));
|
||||
delBtn.addEventListener('click', () => {
|
||||
if (!confirm('"' + node.name + '" wirklich löschen?')) return;
|
||||
deleteSchema(node.name);
|
||||
});
|
||||
|
||||
btnGroup.appendChild(editBtn);
|
||||
btnGroup.appendChild(delBtn);
|
||||
@@ -352,7 +355,10 @@ export function renderSammlung() {
|
||||
del.className = 'action-btn';
|
||||
del.textContent = 'Löschen';
|
||||
del.style.fontSize = '0.7rem';
|
||||
del.addEventListener('click', () => removeFavorit(hex));
|
||||
del.addEventListener('click', () => {
|
||||
if (!confirm('Favorit wirklich löschen?')) return;
|
||||
removeFavorit(hex);
|
||||
});
|
||||
cell.appendChild(del);
|
||||
favContainer.appendChild(cell);
|
||||
});
|
||||
@@ -369,9 +375,19 @@ export function renderSammlung() {
|
||||
msg.textContent = 'Noch kein Verlauf.';
|
||||
histContainer.appendChild(msg);
|
||||
} else {
|
||||
data.history.forEach(hsl => {
|
||||
histContainer.appendChild(makeSwatch(hsl));
|
||||
const clearBtn = document.createElement('button');
|
||||
clearBtn.className = 'action-btn';
|
||||
clearBtn.textContent = 'Verlauf löschen';
|
||||
clearBtn.style.cssText = 'font-size:0.75rem;margin-bottom:0.75rem;display:block';
|
||||
clearBtn.addEventListener('click', () => {
|
||||
if (!confirm('Verlauf wirklich löschen?')) return;
|
||||
const d = load();
|
||||
d.history = [];
|
||||
save(d);
|
||||
renderSammlung();
|
||||
});
|
||||
histContainer.appendChild(clearBtn);
|
||||
data.history.forEach(hsl => histContainer.appendChild(makeSwatch(hsl)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user