Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions unitylibs/core/workflow/workflow-upload/action-binder.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,7 @@ export default class ActionBinder {
}
const finalResults = await Promise.allSettled(this.promiseStack);
if (finalResults.some((result) => result.status === 'rejected')) return;
requestAnimationFrame(() => {
requestAnimationFrame(() => {
window.location.href = response.url;
});
});
window.location.href = response.url;
} catch (e) {
if (e.message === 'Operation termination requested.') return;
await this.transitionScreen.showSplashScreen();
Expand Down Expand Up @@ -499,20 +495,7 @@ export default class ActionBinder {
});
},
INPUT: (el, key) => {
let isFilePickerOpen = false;
el.addEventListener('click', (e) => {
if (isFilePickerOpen) {
e.preventDefault();
return;
}
isFilePickerOpen = true;
const releaseFilePickerLock = () => { isFilePickerOpen = false; };
window.addEventListener('focus', releaseFilePickerLock, { once: true });
document.addEventListener('visibilitychange', function onPageVisible() {
if (document.visibilityState !== 'visible') return;
releaseFilePickerLock();
document.removeEventListener('visibilitychange', onPageVisible);
});
el.addEventListener('click', () => {
this.canvasArea.forEach((element) => {
const errHolder = element.querySelector('.alert-holder');
if (errHolder?.classList.contains('show')) {
Expand All @@ -522,7 +505,6 @@ export default class ActionBinder {
});
});
el.addEventListener('change', async (e) => {
isFilePickerOpen = false;
const files = this.extractFiles(e);
this.filesData = { count: files.length, size: files[0].size, type: files[0].type };
this.logAnalyticsinSplunk('Click Drag and drop|UnityWidget', { assetId: this.assetId, fileMetaData: this.filesData });
Expand Down
13 changes: 1 addition & 12 deletions unitylibs/scripts/transition-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ export default class TransitionScreen {
this.isDesktop = isDesktop;
this.headingElements = [];
this.progressText = '';
this._progressBarTimeout = null;
}

cancelProgressBar() {
if (this._progressBarTimeout !== null) {
clearTimeout(this._progressBarTimeout);
this._progressBarTimeout = null;
}
}

setProgressTextFromDOM() {
Expand Down Expand Up @@ -77,8 +69,7 @@ export default class TransitionScreen {
if (currentValue === 100 || currentValue >= this.LOADER_LIMIT) return;
}

this._progressBarTimeout = setTimeout(() => {
this._progressBarTimeout = null;
setTimeout(() => {
const v = initialize ? 0 : parseInt(progressBar.getAttribute('value'), 10);
if (v === 100) return;
this.updateProgressBar(s, v + newI);
Expand Down Expand Up @@ -216,7 +207,6 @@ export default class TransitionScreen {

splashVisibilityController(displayOn) {
if (!displayOn) {
this.cancelProgressBar();
this.LOADER_LIMIT = 95;
this.splashScreenEl.parentElement?.classList.remove('hide-splash-overflow');
this.splashScreenEl.classList.remove('show');
Expand All @@ -225,7 +215,6 @@ export default class TransitionScreen {
document.querySelector('footer').removeAttribute('aria-hidden');
return;
}
this.cancelProgressBar();
this.progressBarHandler(this.splashScreenEl, this.LOADER_DELAY, this.LOADER_INCREMENT, true);
this.resetSplashVideos();
this.splashScreenEl.classList.add('show');
Expand Down
Loading