VulpesOS/gaia/apps/email/js/file_display.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

16 lines
511 B
JavaScript
Executable file

'use strict';
define(function(require) {
var mozL10n = require('l10n!');
return {
/**
* Display a human-readable file size. Currently we always display
* things in kilobytes because we are targeting a mobile device and we
* want bigger sizes (like megabytes) to be obviously large numbers.
*/
fileSize: function(node, sizeInBytes) {
var kilos = Math.ceil(sizeInBytes / 1024);
mozL10n.setAttributes(node, 'attachment-size-kib', { kilobytes: kilos });
}
};
});