feat(signage): venue badges, widgets' own look, widgets placed inside stacks, Save and leave, shared controls (owner review 5)

- Badges: the venue's list (setting signage.badges: names el/en, colours, an icon from a food and
  drink set) edited under Signage -> "Message & settings"; sent with the venue to screens and
  previews; several badges per product (MenuList.badges lists, a single one still read) in the
  shared multiple Dropdown; a board's badge colour / text colour override them (None = each own).
- Widgets: colour, background plate, font, bold / italic / underline, text size, QR colours;
  widgets in a stack's part get every setting, vertical alignment, and a custom box inside their
  place, picked (stack, then widget) and dragged on the preview (selection by path "2.1.0").
- Menu slides: vertical alignment of the list (board_valign); "Where the list sits" is now
  "Horizontal alignment".
- Message of the day: one component in the settings tab, on the Overview and from its widget.
- Leaving a slide with changes: "Save and leave" (ConfirmDialog altLabel).
- @xenia/ui: ColourField (with colour.js helpers), FieldRow (framed only while wrapped), Slider,
  IconPicker, Segmented multiple; native selects on the Overview and signage replaced by Dropdown,
  the device settings' colour input by ColourField.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 14:17:27 +02:00
co-authored by Claude Opus 5.5
parent aaa0914778
commit aa3fe85053
51 changed files with 1378 additions and 432 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ function EmbeddedSlide({ slide, media, venue, now }) {
const pages = slide.kind === 'menu' && size ? boardPages(slide, 0, size.w || 16, size.h || 9) : null
const page = pages ? pageAt(pages.length, slide.content?.page_seconds, now.getTime()) : 0
return (
<div ref={ref} style={{ position: 'absolute', inset: 0, overflow: 'hidden', containerType: 'size' }} data-testid="signage-embedded" data-kind={slide.kind} data-id={slide.id}>
<div ref={ref} style={{ position: 'absolute', inset: 0, overflow: 'hidden', containerType: 'size' }} data-testid="signage-embedded" data-embedded="" data-kind={slide.kind} data-id={slide.id}>
{size && <SlideView slide={{ ...slide, video_to_end: false }} media={media} venue={venue} now={now} pages={pages} page={page} />}
</div>
)
+59 -25
View File
@@ -4,8 +4,9 @@
// same on any TV.
import { Cloud, CloudFog, CloudLightning, CloudMoon, CloudRain, CloudSnow, CloudSun, Moon, Sun } from 'lucide-react'
import { QRCodeSVG } from 'qrcode.react'
import { BADGE_ICONS } from './badges'
import { useFormat, useTranslation } from '@xenia/i18n'
import { cellWidgets, fitUnit, FONTS, menuLook, menuPages, pageAt, priceChars, textWidth, visibleGroups, weatherIcon, widgetAlign } from './logic'
import { badgeColours, badgeName, cellWidgets, fitUnit, FONTS, itemBadges, menuLook, menuPages, pageAt, priceChars, textWidth, visibleGroups, weatherIcon, widgetAlign } from './logic'
/** A slide's background: a colour, or a photo (cover / contain) with a darkening layer. */
export function Background({ bg, media }) {
@@ -63,12 +64,15 @@ export function MenuSlide({ slide, media, venue, now, page, pages, extras, embed
data-testid="signage-menu" data-page={page} data-pages={pages.length}>
{/* the list: the whole width, or narrower and placed left / centre / right (2026-11-21) */}
<div style={{ flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column', width: `${c.board_width || 100}%`,
alignSelf: BOARD_ALIGN[c.board_align] || 'flex-start' }} data-testid="signage-menu-board" data-align={c.board_align || 'left'}>
alignSelf: BOARD_ALIGN[c.board_align] || 'flex-start', justifyContent: VSELF[c.board_valign] || 'flex-start' }}
data-testid="signage-menu-board" data-align={c.board_align || 'left'} data-valign={c.board_valign || 'top'}>
{c.title && <h1 style={{ fontSize: `${7 * scale}cqmin`, fontWeight: 800, margin: '0 0 2cqmin', color: c.heading_style?.colour || accent, lineHeight: 1.1,
textAlign: c.board_align || 'left' }}>{c.title}</h1>}
<div style={{ columnCount: c.columns || 2, columnGap: '5cqmin', fontSize: `${3.2 * scale}cqmin`, flex: 1, minHeight: 0, overflow: 'hidden', columnFill: 'auto', ...listSpacing(c) }}
{/* top: the list takes the height (columns fill one after the other); middle / bottom: as tall as it is, placed (owner review 5) */}
<div style={{ columnCount: c.columns || 2, columnGap: '5cqmin', fontSize: `${3.2 * scale}cqmin`, flex: (c.board_valign || 'top') === 'top' ? 1 : '0 1 auto',
minHeight: 0, overflow: 'hidden', columnFill: 'auto', ...listSpacing(c) }}
data-testid="signage-menu-list">
<MenuGroups c={c} groups={groups} />
<MenuGroups c={c} groups={groups} badges={venue?.badges} />
</div>
{pages.length > 1 && (
<div style={{ display: 'flex', gap: '1cqmin', justifyContent: 'center', paddingTop: '1cqmin' }} aria-hidden="true">
@@ -96,8 +100,9 @@ const listSpacing = c => {
return { lineHeight: look.lineHeight, letterSpacing: look.letterSpacing }
}
export function MenuGroups({ c, groups }) {
const { t } = useTranslation('terminal')
export function MenuGroups({ c, groups, badges }) {
const { t, i18n } = useTranslation('terminal')
const lang = c.language || (String(i18n.language || '').startsWith('el') ? 'el' : 'en')
const { formatMoney } = useFormat()
const look = menuLook(c)
const priceW = `${(priceChars(groups, formatMoney) * 0.62).toFixed(2)}em`
@@ -121,10 +126,16 @@ export function MenuGroups({ c, groups }) {
<div style={{ display: 'flex', alignItems: 'baseline', gap: '0.3em' }}>
<span style={{ ...look.item, textDecoration: it.available ? look.item.textDecoration : 'line-through',
...(nameFills ? { flex: 1, minWidth: 0, textAlign: look.itemAlign } : {}) }} data-testid="signage-menu-name">{it.name}</span>
{it.badge && (
<span style={{ ...look.badge, fontSize: '0.55em', fontWeight: 800, padding: '0.1em 0.5em', borderRadius: '99em',
textTransform: 'uppercase', letterSpacing: '0.05em', whiteSpace: 'nowrap', lineHeight: 1.4 }} data-testid="signage-badge">{t(`signage.badges.${it.badge}`)}</span>
)}
{itemBadges(it, badges).map(d => {
const Icon = BADGE_ICONS[d.icon]
return (
<span key={d.key} style={{ ...badgeColours(d, c), fontSize: '0.55em', fontWeight: 800, padding: '0.1em 0.55em', borderRadius: '99em',
textTransform: 'uppercase', letterSpacing: '0.05em', whiteSpace: 'nowrap', lineHeight: 1.4, display: 'inline-flex', alignItems: 'center', gap: '0.3em',
alignSelf: 'center' }} data-testid="signage-badge" data-key={d.key}>
{Icon && <Icon style={{ width: '1.15em', height: '1.15em', flexShrink: 0 }} strokeWidth={2.5} aria-hidden="true" />}{badgeName(d, lang)}
</span>
)
})}
{!it.available && <span style={{ fontSize: '0.6em', whiteSpace: 'nowrap' }} data-testid="signage-sold-out">{t('signage.soldOut')}</span>}
{it.price != null && <>
<span style={{ ...look.dots, ...(nameFills ? { flex: '0 0 2em' } : { flex: 1, minWidth: '0.6em' }) }} data-testid="signage-menu-dots" />
@@ -154,6 +165,12 @@ const CORNER = {
'bottom-right': { bottom: '3cqmin', right: '3cqmin', alignItems: 'flex-end' },
}
const SELF = { left: 'flex-start', center: 'center', right: 'flex-end' }
const VSELF = { top: 'flex-start', middle: 'center', bottom: 'flex-end', auto: 'center' }
/** A widget's own colour and the plate behind it (owner review 5); `pad`: a plate that hugs it. */
const plate = (w, pad) => ({
...(w.colour ? { color: w.colour } : {}),
...(w.background_colour ? { background: w.background_colour, borderRadius: '1.2cqmin', ...(pad ? { padding: '0.8cqmin 1.6cqmin' } : {}) } : {}),
})
// a menu or a stack in a corner or a bar has no box of its own: it gets one of this size (cqmin)
const BOXED = { menu: [48, 56], stack: [60, 36] }
@@ -179,7 +196,7 @@ export function Widgets({ widgets, media, venue, now, colour, extras, embed }) {
style={{ ...pos, display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '3cqmin', padding: '2cqmin 4cqmin',
background: 'rgba(0,0,0,0.35)', color: colour || '#fff', minHeight: '9cqmin' }}>
{bar(where).map(([w, i, body]) => (
<div key={i} data-widget={i} style={{ display: 'flex', flexDirection: 'column', alignItems: SELF[widgetAlign(w)], textAlign: widgetAlign(w) }}>{body}</div>
<div key={i} data-widget={i} style={{ display: 'flex', flexDirection: 'column', alignItems: SELF[widgetAlign(w)], textAlign: widgetAlign(w), ...plate(w, true) }}>{body}</div>
))}
</div>
))}
@@ -188,7 +205,7 @@ export function Widgets({ widgets, media, venue, now, colour, extras, embed }) {
return (
<div key={i} data-widget={i} className="absolute" data-testid="signage-w-box"
style={{ left: `${w.box.x}%`, top: `${w.box.y}%`, width: `${w.box.w}%`, height: `${w.box.h}%`, containerType: 'size', color: colour || '#fff' }}>
<div style={{ width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: SELF[widgetAlign(w)], textAlign: widgetAlign(w) }}>
<div style={{ width: '100%', height: '100%', display: 'flex', alignItems: VSELF[w.vertical] || 'center', justifyContent: SELF[widgetAlign(w)], textAlign: widgetAlign(w), ...plate(w) }}>
{body}
</div>
</div>
@@ -196,7 +213,7 @@ export function Widgets({ widgets, media, venue, now, colour, extras, embed }) {
}
const own = w.align && w.align !== 'auto' ? { alignItems: SELF[w.align], textAlign: w.align } : {}
return (
<div key={i} data-widget={i} className="absolute" style={{ ...CORNER[w.position], ...own, display: 'flex', flexDirection: 'column', color: colour || '#fff' }}>
<div key={i} data-widget={i} className="absolute" style={{ ...CORNER[w.position], ...own, display: 'flex', flexDirection: 'column', color: colour || '#fff', ...plate(w, true) }}>
{body}
</div>
)
@@ -216,10 +233,17 @@ function widgetBody(w, ctx, fit, path) {
const { media, venue, now, fmt, extras } = ctx
const { formatDate, formatTime } = fmt
const x = extras[path] || {}
const s = SIZE[w.size] || 1
const unit = (height, width) => (fit ? fitUnit(height, width) : n => `${+(n * s).toFixed(3)}cqmin`)
const text = (u, size, weight = 700) => ({ fontSize: u(size), fontWeight: weight, lineHeight: 1.15,
textShadow: '0 0.2cqmin 0.8cqmin rgba(0,0,0,0.35)', whiteSpace: fit ? 'nowrap' : undefined })
const ts = (w.text_size || 100) / 100 // its own text size (owner review 5)
const s = (SIZE[w.size] || 1) * ts
// in a box of its own the box sets the size: its text size can only make it smaller there
const unit = (height, width) => {
if (!fit) return n => `${+(n * s).toFixed(3)}cqmin`
const f = fitUnit(height, width)
return n => f(n * Math.min(1, ts))
}
const text = (u, size, weight = 700) => ({ fontSize: u(size), fontWeight: w.bold === false ? 400 : w.bold ? Math.max(weight, 800) : weight, lineHeight: 1.15,
textShadow: w.background_colour ? undefined : '0 0.2cqmin 0.8cqmin rgba(0,0,0,0.35)', whiteSpace: fit ? 'nowrap' : undefined,
...(w.font ? { fontFamily: FONTS[w.font] } : {}), ...(w.italic ? { fontStyle: 'italic' } : {}), ...(w.underline ? { textDecoration: 'underline' } : {}) })
const line = (str, testid, weight) => {
const u = unit(3.4 * 1.15, textWidth(str.length, 3.4))
return <span style={text(u, 3.4, weight)} data-testid={testid}>{str}</span>
@@ -257,15 +281,15 @@ function widgetBody(w, ctx, fit, path) {
const u = unit(16 + caption, Math.max(16, w.qr_caption ? textWidth(w.qr_caption.length, 2.4) : 0))
return (
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: u(0.8) }} data-testid="signage-w-qr" data-link={link}>
<div style={{ background: '#fff', padding: u(1), borderRadius: u(1), lineHeight: 0 }}>
<QRCodeSVG value={link} size={256} style={{ width: u(14), height: u(14) }} />
<div style={{ background: w.qr_background || '#fff', padding: u(1), borderRadius: u(1), lineHeight: 0 }}>
<QRCodeSVG value={link} size={256} fgColor={w.qr_colour || '#000000'} bgColor={w.qr_background || '#ffffff'} style={{ width: u(14), height: u(14) }} />
</div>
{w.qr_caption && <span style={text(u, 2.4)}>{w.qr_caption}</span>}
</div>
)
}
if (w.kind === 'weather') return weatherBody(w, venue?.weather, unit, text, formatDate)
if (w.kind === 'menu') return boxed(<MenuWidget board={w.board || {}} menu={x.menu} now={now} />, 'menu')
if (w.kind === 'menu') return boxed(<MenuWidget board={w.board || {}} menu={x.menu} now={now} badges={venue?.badges} />, 'menu')
if (w.kind === 'stack') return boxed(<Stack w={w} path={path} ctx={ctx} />, 'stack')
return null
}
@@ -311,7 +335,7 @@ function weatherBody(w, wx, unit, text, formatDate) {
* A menu widget (2026-11-21): a board's list in the widget's box (inside an element with
* `container-type: size`), its pages turning on the clock; the text sized so a page fills the box.
*/
function MenuWidget({ board: b, menu, now }) {
function MenuWidget({ board: b, menu, now, badges }) {
const groups = visibleGroups(menu?.groups)
const per = b.page_size || 8
const headings = b.category_titles !== false
@@ -328,7 +352,7 @@ function MenuWidget({ board: b, menu, now }) {
data-testid="signage-w-menu" data-page={page} data-pages={pages.length}>
{b.title && <div style={{ fontSize: '1.5em', fontWeight: 800, color: b.heading_style?.colour || accent, lineHeight: 1.15, marginBottom: '0.3em' }}>{b.title}</div>}
<div style={{ columnCount: cols, columnGap: '1.2em', columnFill: 'auto', ...listSpacing(b) }} data-testid="signage-menu-list">
<MenuGroups c={b} groups={pages[page] || []} />
<MenuGroups c={b} groups={pages[page] || []} badges={badges} />
</div>
</div>
)
@@ -354,11 +378,21 @@ function Stack({ w, path, ctx }) {
<div key={j} style={{ flex: `${c.share || 1} 1 0%`, minWidth: 0, minHeight: 0, position: 'relative', overflow: 'hidden', containerType: 'size',
display: 'flex', flexDirection: across }} data-testid="signage-stack-cell" data-share={c.share}>
{ws.map((cw, k) => {
const wp = `${cp}.${k}`
const own = cw.position === 'custom' && cw.box
const align = cw.align && cw.align !== 'auto' ? cw.align : 'center'
const body = widgetBody(cw, ctx, true, wp)
return (
<div key={k} style={{ flex: '1 1 0%', minWidth: 0, minHeight: 0, overflow: 'hidden', containerType: 'size',
display: 'flex', alignItems: 'center', justifyContent: SELF[align], textAlign: align }} data-testid="signage-stack-place">
{widgetBody(cw, ctx, true, `${cp}.${k}`)}
<div key={k} style={{ flex: '1 1 0%', minWidth: 0, minHeight: 0, overflow: 'hidden', containerType: 'size', position: 'relative',
...(own ? {} : { display: 'flex', alignItems: VSELF[cw.vertical] || 'center', justifyContent: SELF[align], textAlign: align }) }}
data-testid="signage-stack-place" data-place={wp}>
{body && (own ? (
<div data-widget={wp} style={{ position: 'absolute', left: `${cw.box.x}%`, top: `${cw.box.y}%`, width: `${cw.box.w}%`, height: `${cw.box.h}%`,
containerType: 'size', display: 'flex', alignItems: VSELF[cw.vertical] || 'center', justifyContent: SELF[align], textAlign: align, ...plate(cw) }}
data-testid="signage-w-box">{body}</div>
) : (
<div data-widget={wp} style={{ display: 'flex', maxWidth: '100%', maxHeight: '100%', ...(cw.kind === 'menu' || cw.kind === 'stack' ? { width: '100%', height: '100%' } : {}), ...plate(cw, true) }}>{body}</div>
))}
</div>
)
})}
+16
View File
@@ -0,0 +1,16 @@
// The icons a menu badge can have (owner review 5, 2026-11-21): the same names as the server's
// list (local_backend/services/signage_badges.py ICONS), drawn on the TV and offered in the editor.
import {
Apple, Award, Beef, Beer, CakeSlice, Carrot, ChefHat, Cherry, Citrus, Clock, Coffee, Croissant, Crown, CupSoda, Drumstick, Egg,
Fish, Flame, Gift, GlassWater, Hamburger, Heart, IceCreamCone, Leaf, Martini, Milk, Nut, Percent, Pizza, Salad, Sandwich, Shrimp,
Snowflake, Soup, Sparkles, Sprout, Star, Tag, ThumbsUp, Vegan, Wheat, WheatOff, Wine, Zap,
} from 'lucide-react'
export const BADGE_ICONS = {
sparkles: Sparkles, 'chef-hat': ChefHat, tag: Tag, star: Star, flame: Flame, sprout: Sprout, leaf: Leaf, vegan: Vegan, wheat: Wheat,
'wheat-off': WheatOff, fish: Fish, shrimp: Shrimp, beef: Beef, drumstick: Drumstick, egg: Egg, milk: Milk, nut: Nut, carrot: Carrot,
salad: Salad, pizza: Pizza, hamburger: Hamburger, sandwich: Sandwich, soup: Soup, croissant: Croissant, 'ice-cream-cone': IceCreamCone,
'cake-slice': CakeSlice, coffee: Coffee, 'cup-soda': CupSoda, wine: Wine, beer: Beer, martini: Martini, 'glass-water': GlassWater,
citrus: Citrus, cherry: Cherry, apple: Apple, heart: Heart, award: Award, 'thumbs-up': ThumbsUp, clock: Clock, percent: Percent,
gift: Gift, crown: Crown, zap: Zap, snowflake: Snowflake,
}
+1
View File
@@ -2,5 +2,6 @@
// player (terminal/src/apps/signage) and in the manager's live previews. Sizes are container
// units (cqmin): put a slide inside an element with `container-type: size` (frameStyle() does).
export * from './logic.js'
export { BADGE_ICONS } from './badges.js'
export { Background, BlankSlide, MenuSlide, TextSlide, Widgets } from './Slides.jsx'
export { SlideView } from './SlideView.jsx'
+35 -4
View File
@@ -321,8 +321,8 @@ const DOTS = { dotted: 'dotted', dashed: 'dashed', solid: 'solid' }
* board's text size): headings, names and prices each their own size, colour, font, bold / italic /
* underline and alignment (empty: the board's text size and font, the text colour for names and the
* accent colour for headings and prices); the dots between name and price; line and letter spacing
* (auto: 1.25 and normal; set on the list, never inherited from the page); photos' size and shape;
* the badges' colours (2026-11-21: their text the venue's, or white / black to read on them).
* (auto: 1.25 and normal; set on the list, never inherited from the page); photos' size and shape.
* Badges: badgeColours (owner review 5).
*/
export function menuLook(c = {}) {
const base = c.text_size || 100
@@ -346,8 +346,6 @@ export function menuLook(c = {}) {
dots: d.style === 'none'
? { borderBottom: 'none' }
: { borderBottom: `${+(0.08 * (d.size || 100) / 100).toFixed(3)}em ${DOTS[d.style] || 'dotted'} ${d.colour || 'currentColor'}`, opacity: d.colour ? 1 : 0.35 },
// badges: the accent (also the page dots), their text the venue's or one that reads on it
badge: { background: accent, color: c.badge_text_colour || readableOn(accent) },
title: c.heading_style?.colour || accent,
lineHeight: c.line_height || 1.25,
letterSpacing: c.letter_spacing != null ? `${c.letter_spacing}em` : 'normal',
@@ -358,6 +356,39 @@ export function menuLook(c = {}) {
}
}
/**
* The badges a venue has until it edits its own (owner review 5; the server's DEFAULTS in
* services/signage_badges.py): a screen that hasn't heard of the venue's list draws these.
*/
export const DEFAULT_BADGES = [
{ key: 'new', names: { el: 'Νέο', en: 'New' }, colour: '#22c55e', text_colour: null, icon: 'sparkles' },
{ key: 'chef', names: { el: 'Πρόταση σεφ', en: "Chef's pick" }, colour: '#f59e0b', text_colour: null, icon: 'chef-hat' },
{ key: 'offer', names: { el: 'Προσφορά', en: 'Offer' }, colour: '#ef4444', text_colour: null, icon: 'tag' },
{ key: 'popular', names: { el: 'Δημοφιλές', en: 'Popular' }, colour: '#f472b6', text_colour: null, icon: 'star' },
{ key: 'spicy', names: { el: 'Καυτερό', en: 'Spicy' }, colour: '#dc2626', text_colour: null, icon: 'flame' },
{ key: 'vegetarian', names: { el: 'Χορτοφαγικό', en: 'Vegetarian' }, colour: '#16a34a', text_colour: null, icon: 'sprout' },
{ key: 'vegan', names: { el: 'Vegan', en: 'Vegan' }, colour: '#15803d', text_colour: null, icon: 'vegan' },
]
/** A product's badges as their definitions (unknown keys left out; one badge stored as `badge` too). */
export function itemBadges(it, defs) {
const list = defs?.length ? defs : DEFAULT_BADGES
const keys = it?.badges?.length ? it.badges : it?.badge ? [it.badge] : []
return keys.map(k => list.find(d => d.key === k)).filter(Boolean)
}
/** A badge's colours on a board: the board's own for all its badges, else the badge's; text that reads. */
export function badgeColours(def, c = {}) {
const background = c.badge_colour || def?.colour || '#f59e0b'
return { background, color: c.badge_text_colour || def?.text_colour || readableOn(background) }
}
/** A badge's name in a language (the board's, else the screen's), else in the other one. */
export function badgeName(def, lang) {
const n = def?.names || {}
return n[lang] || n.el || n.en || def?.key || ''
}
/** A stack part's widgets (a part stored before owner review 4 has one `widget`). */
export function cellWidgets(c) {
return c?.widgets?.length ? c.widgets : c?.widget ? [c.widget] : []
+12 -2
View File
@@ -202,7 +202,17 @@ test('owner review 4: a part\'s widgets (one stored as `widget` too), badges tha
assert.equal(readableOn('#1e3a8acc'), '#ffffff')
assert.equal(readableOn('#f59e0b'), '#111111')
assert.equal(readableOn('#fff'), '#111111')
assert.deepEqual(menuLook({ accent_colour: '#1e3a8a' }).badge, { background: '#1e3a8a', color: '#ffffff' })
assert.deepEqual(menuLook({ accent_colour: '#1e3a8a', badge_text_colour: '#fde68a' }).badge, { background: '#1e3a8a', color: '#fde68a' })
assert.equal(menuLook({ accent_colour: '#123456', heading_style: { colour: '#ff0000' } }).title, '#ff0000')
})
test('owner review 5: the venue badges, several per product; a board with its own badge colours', async () => {
const { badgeColours, badgeName, DEFAULT_BADGES, itemBadges } = await import('../src/logic.js')
const mine = [{ key: 'gf', names: { en: 'Gluten free' }, colour: '#0ea5e9', text_colour: null, icon: 'wheat-off' }, DEFAULT_BADGES[1]]
assert.deepEqual(itemBadges({ badges: ['chef', 'gf', 'gone'] }, mine).map(d => d.key), ['chef', 'gf'])
assert.deepEqual(itemBadges({ badge: 'new' }, null).map(d => d.key), ['new']) // stored before: one badge; no list yet: the defaults
assert.deepEqual(badgeColours(mine[0]), { background: '#0ea5e9', color: '#111111' })
assert.deepEqual(badgeColours(mine[0], { badge_colour: '#1e3a8a' }), { background: '#1e3a8a', color: '#ffffff' })
assert.deepEqual(badgeColours(mine[0], { badge_text_colour: '#fde68a' }), { background: '#0ea5e9', color: '#fde68a' })
assert.equal(badgeName(mine[0], 'el'), 'Gluten free')
assert.equal(badgeName(DEFAULT_BADGES[1], 'el'), 'Πρόταση σεφ')
})