How to use the progress/remote.js function in progress

To help you get started, we’ve selected a few progress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ondras / cfo / src / js / operation / delete.js View on Github external
async _startDeleting(record) {
		let options = {
			title: "Deletion in progress",
			row1: "Deleting:",
			progress1: "Total:"
		}
		this._progress = new Progress(options);
		this._progress.onClose = () => this.abort();

		super.run(); // schedule progress window

		return this._delete(record);
	}
github ondras / cfo / src / js / operation / copy.js View on Github external
async run() {
		let scan = new Scan(this._sourcePath);
		let root = await scan.run();
		if (!root) { return false; }

		this._stats.total = root.size;

		let options = {
			title: this._texts.title,
			row1: this._texts.row1,
			row2: "To:",
			progress1: "File:",
			progress2: "Total:"
		}
		this._progress = new Progress(options);
		this._progress.update({progress1:0, progress2:0});
		this._progress.onClose = () => this.abort();

		super.run(); // schedule progress window

		let result = await this._copy(root, this._targetPath);

		this._end();
		return result;
	}
github ondras / cfo / src / js / operation / scan.js View on Github external
constructor(path) {
		super();

		this._path = path;

		let options = {
			title: "Directory scan in progress",
			row1: "Scanning:",
			progress1: ""
		}
		this._progress = new Progress(options);
		this._progress.onClose = () => this.abort();
	}