diff --git a/static/js/kds.js b/static/js/kds.js index bc0980d..ab4f0cc 100644 --- a/static/js/kds.js +++ b/static/js/kds.js @@ -25,10 +25,16 @@ window.app = Vue.createApp({ }, cardClass(order) { // Visually escalate as orders age. >5min = highlight; >15min = alarm. + // + // Pair every pale `bg-{color}-1` with an explicit dark text color + // — otherwise on LNbits dark mode the q-card inherits light text + // and renders white-on-cream, which is unreadable. The non- + // highlighted branch (default theme) returns '' so the q-card + // keeps its theme-aware defaults. const ageSec = (Date.now() - new Date(order.time).getTime()) / 1000 - if (order.status === 'ready') return 'bg-amber-1' - if (ageSec > 900) return 'bg-red-1' - if (ageSec > 300) return 'bg-orange-1' + if (order.status === 'ready') return 'bg-amber-1 text-grey-9' + if (ageSec > 900) return 'bg-red-1 text-grey-9' + if (ageSec > 300) return 'bg-orange-1 text-grey-9' return '' }, async fetchActive() {