aboutsummaryrefslogtreecommitdiff
path: root/static/widgets/upload-bar/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/widgets/upload-bar/index.js')
-rw-r--r--static/widgets/upload-bar/index.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/static/widgets/upload-bar/index.js b/static/widgets/upload-bar/index.js
deleted file mode 100644
index f6d37b5..0000000
--- a/static/widgets/upload-bar/index.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import * as sfw from 'sfw';
-const { Div } = sfw.element.native;
-
-import stylesheet from './index.css';
-
-const css = await sfw.css.sheet(stylesheet);
-
-export default class UploadBar extends sfw.element.Container {
- #files_progress
- #inner_progress
- #container
-
- constructor() {
- super({ css });
-
- this.body.append(
- this.#container = Div.new({
- id: 'container',
- style: { display: 'none' },
- children: [
- this.#files_progress = Div.new({ id: 'files', innerText: 'Uploading...' }),
- Div.new({
- id: 'inner-progress',
- children: [
- this.#inner_progress = Div.new({ id: 'progress' }),
- ]
- })
- ]
- })
- );
- }
-
- set progress(progress) {
- this.#inner_progress.style.width = `${progress * 100}%`
- }
-
- hide() {
- this.#container.style.display = 'none';
- }
-
- show() {
- this.#container.style.display = '';
- }
-}