forked from FoundKeyGang/FoundKey
parent
756be3217b
commit
5291ba28bc
1 changed files with 4 additions and 4 deletions
|
@ -254,11 +254,11 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
this.onStats = stats => {
|
this.onStats = stats => {
|
||||||
stats.disk.used = stats.disk.available - stats.disk.free;
|
stats.disk.used = stats.disk.total - stats.disk.free;
|
||||||
|
|
||||||
const color = `hsl(${180 - (stats.disk.used / stats.disk.available * 180)}, 80%, 70%)`;
|
const color = `hsl(${180 - (stats.disk.used / stats.disk.total * 180)}, 80%, 70%)`;
|
||||||
const p = (stats.disk.used / stats.disk.available * 100).toFixed(0);
|
const p = (stats.disk.used / stats.disk.total * 100).toFixed(0);
|
||||||
const strokeDashoffset = (1 - (stats.disk.used / stats.disk.available)) * (Math.PI * (this.r * 2));
|
const strokeDashoffset = (1 - (stats.disk.used / stats.disk.total)) * (Math.PI * (this.r * 2));
|
||||||
|
|
||||||
this.update({
|
this.update({
|
||||||
color,
|
color,
|
||||||
|
|
Loading…
Reference in a new issue