- Add `formatBrowserTime()` and include ISO-8601 `expires_at` in box status JSON and `ExpiresAtISO` in the box view for browser-friendly rendering. - Refresh UI styling (switch to MonoCraft/PixelOperatorMono, tweak base font size) and treat `aria-disabled="true"` like `disabled` for consistent button states. - Introduce a clear-queue action with confirmation to reset upload state, unlock controls, and provide user feedback.feat(ui): add clear queue flow and expose ISO expiry - Add `formatBrowserTime()` and include ISO-8601 `expires_at` in box status JSON and `ExpiresAtISO` in the box view for browser-friendly rendering. - Refresh UI styling (switch to MonoCraft/PixelOperatorMono, tweak base font size) and treat `aria-disabled="true"` like `disabled` for consistent button states. - Introduce a clear-queue action with confirmation to reset upload state, unlock controls, and provide user feedback.
12 lines
431 B
JavaScript
12 lines
431 B
JavaScript
window.WBUtils = (() => {
|
|
function renderTemplate(template, data = {}) {
|
|
return window.WarpBoxUI?.renderTemplate
|
|
? window.WarpBoxUI.renderTemplate(template, data)
|
|
: String(template).replace(/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g, (_, key) => {
|
|
return Object.prototype.hasOwnProperty.call(data, key) ? String(data[key]) : "";
|
|
});
|
|
}
|
|
|
|
return { renderTemplate };
|
|
})();
|