()
| 104 | } |
| 105 | |
| 106 | updateProgressBar() { |
| 107 | // Create a circular progress bar, starting at 12 o'clock. |
| 108 | this.progressNode.style.backgroundImage = `conic-gradient( |
| 109 | var(--primary-color) 0%, |
| 110 | var(--primary-color) ${this.progress * 100}%, |
| 111 | var(--surface-color) ${this.progress * 100}%)`; |
| 112 | this.progressTextNode.innerText = |
| 113 | this.processedBytes ? formatBytes(this.processedBytes, 1) : ''; |
| 114 | if (this.root.className == 'loading') { |
| 115 | window.requestAnimationFrame(() => this.updateProgressBar()); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | readFile(file) { |
| 120 | this.dispatchEvent(new CustomEvent('fileuploadstart', { |
no test coverage detected