mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Prettified Code!
This commit is contained in:
parent
f8b6fd3dd1
commit
bc2128742e
2 changed files with 11 additions and 16 deletions
|
@ -2087,17 +2087,15 @@ ipcRenderer.on("update-config", (event, data) => {
|
|||
config = data;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// https://stackoverflow.com/a/18650828
|
||||
function formatBytes(bytes, decimals = 2) {
|
||||
if (!+bytes) return '0 Bytes'
|
||||
if (!+bytes) return "0 Bytes";
|
||||
|
||||
const k = 1024
|
||||
const dm = decimals < 0 ? 0 : decimals
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||
const k = 1024;
|
||||
const dm = decimals < 0 ? 0 : decimals;
|
||||
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
||||
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
|
||||
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`
|
||||
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
||||
}
|
|
@ -626,16 +626,13 @@
|
|||
></button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid p-0">
|
||||
<div class="center mb-1">
|
||||
<div class="badge text-bg-info">
|
||||
<i class="bi bi-info"></i> Change folder in settings!
|
||||
</div>
|
||||
<div class="center mb-1">
|
||||
<div class="badge text-bg-info">
|
||||
<i class="bi bi-info"></i> Change folder in settings!
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<!-- START OF TABLE FOR SHARED FOLDER -->
|
||||
<table
|
||||
|
|
Loading…
Reference in a new issue