Fix #114: use presetColors(t.id) for theme card swatches
t.colors was removed by #113; rendering threw on first iteration and the theme grid rendered empty. Use the colors returned by presetColors(t.id) instead. Verified in headless chromium: 5 theme-card elements render on /settings.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
btn.className = 'theme-card';
|
||||
btn.setAttribute('aria-pressed', current === t.id ? 'true' : 'false');
|
||||
btn.innerHTML = '<strong>' + t.name + '</strong>' +
|
||||
'<span class="swatches">' + t.colors.map(function (c) {
|
||||
'<span class="swatches">' + colors.map(function (c) {
|
||||
return '<span class="swatch" style="background:' + c + '"></span>';
|
||||
}).join('') + '</span>';
|
||||
btn.addEventListener('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user