mirror of
https://github.com/ohwgiles/laminar.git
synced 2026-03-02 03:40:21 +00:00
committed by
Oliver Giles
parent
bbbef11304
commit
fba2d226ef
@@ -2,6 +2,13 @@
|
||||
* frontend application for Laminar Continuous Integration
|
||||
* https://laminar.ohwg.net
|
||||
*/
|
||||
|
||||
Vue.filter('iecFileSize', function(bytes) {
|
||||
var exp = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
return (bytes / Math.pow(1024, exp)).toFixed(1) + ' ' +
|
||||
['B', 'KiB', 'MiB', 'GiB', 'TiB'][exp];
|
||||
});
|
||||
|
||||
const wsp = function(path) {
|
||||
return new WebSocket((location.protocol === 'https:'?'wss://':'ws://')
|
||||
+ location.host + path);
|
||||
|
||||
Reference in New Issue
Block a user