Get 95% of the way through the stats tab

This commit is contained in:
Oliver-Akins 2024-03-01 23:28:18 -07:00
parent 7516e7b42b
commit c1ee1a9ef8
7 changed files with 91 additions and 46 deletions

View file

@ -1,3 +1,5 @@
import { localizer } from "../utils/localizer.mjs";
/**
* @typedef {object} Option
* @property {string} [label]
@ -9,7 +11,8 @@
* @param {string | number} selected
* @param {Array<Option | string>} opts
*/
export function options(selected, opts) {
export function options(selected, opts, meta) {
const { localize = false } = meta.hash;
selected = Handlebars.escapeExpression(selected);
const htmlOptions = [];
@ -24,7 +27,7 @@ export function options(selected, opts) {
${selected === opt.value ? "selected" : ""}
${opt.disabled ? "disabled" : ""}
>
${opt.label}
${localize ? localizer(opt.label) : opt.label}
</option>`
);
};