mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-14 15:12:48 +01:00
MS Edge hacks
This commit is contained in:
parent
b840173429
commit
da82ef814b
@ -78,10 +78,11 @@ export default class FileSender extends Nanobus {
|
|||||||
this.keychain,
|
this.keychain,
|
||||||
p => {
|
p => {
|
||||||
this.progress = p;
|
this.progress = p;
|
||||||
this.emit('progress', p);
|
this.emit('progress');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.msg = 'fileSizeProgress';
|
this.msg = 'fileSizeProgress';
|
||||||
|
this.emit('progress'); // HACK to kick MS Edge
|
||||||
try {
|
try {
|
||||||
const result = await this.uploadRequest.result;
|
const result = await this.uploadRequest.result;
|
||||||
const time = Date.now() - start;
|
const time = Date.now() - start;
|
||||||
|
@ -7,6 +7,10 @@ const oDiameter = oRadius * 2;
|
|||||||
const circumference = 2 * Math.PI * radius;
|
const circumference = 2 * Math.PI * radius;
|
||||||
|
|
||||||
module.exports = function(progressRatio, indefinite = false) {
|
module.exports = function(progressRatio, indefinite = false) {
|
||||||
|
// HACK - never indefinite for MS Edge
|
||||||
|
if (/edge/i.test(navigator.userAgent)) {
|
||||||
|
indefinite = false;
|
||||||
|
}
|
||||||
const p = indefinite ? 0.2 : progressRatio;
|
const p = indefinite ? 0.2 : progressRatio;
|
||||||
const dashOffset = (1 - p) * circumference;
|
const dashOffset = (1 - p) * circumference;
|
||||||
const progressPercent = html`
|
const progressPercent = html`
|
||||||
|
Loading…
Reference in New Issue
Block a user