fix(tracker): uxt fixes
This commit is contained in:
parent
aaf836ad42
commit
2909a9f661
2 changed files with 14 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@openreplay/tracker",
|
"name": "@openreplay/tracker",
|
||||||
"description": "The OpenReplay tracker main package",
|
"description": "The OpenReplay tracker main package",
|
||||||
"version": "11.0.0-beta.4",
|
"version": "11.0.0-beta.5",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"logging",
|
"logging",
|
||||||
"replay"
|
"replay"
|
||||||
|
|
|
||||||
|
|
@ -528,6 +528,7 @@ export default class UserTestManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
showEndSection() {
|
showEndSection() {
|
||||||
|
let isLoading = true
|
||||||
void this.signalTest('done')
|
void this.signalTest('done')
|
||||||
const section = createElement('div', 'end_section_or', styles.endSectionStyle)
|
const section = createElement('div', 'end_section_or', styles.endSectionStyle)
|
||||||
const title = createElement(
|
const title = createElement(
|
||||||
|
|
@ -548,12 +549,20 @@ export default class UserTestManager {
|
||||||
'\n' +
|
'\n' +
|
||||||
'We appreciate your time and valuable input.',
|
'We appreciate your time and valuable input.',
|
||||||
)
|
)
|
||||||
|
const button = createElement(
|
||||||
|
'div',
|
||||||
|
'end_button_or',
|
||||||
|
styles.buttonWidgetStyle,
|
||||||
|
'Uploading session...',
|
||||||
|
)
|
||||||
|
|
||||||
if (this.test?.reqMic || this.test?.reqCamera) {
|
if (this.test?.reqMic || this.test?.reqCamera) {
|
||||||
this.userRecorder.sendToAPI().then(() => {
|
void this.userRecorder.sendToAPI().then(() => {
|
||||||
title.textContent = 'Thank you! 👍'
|
title.textContent = 'Thank you! 👍'
|
||||||
|
button.textContent = 'End Session'
|
||||||
|
isLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const button = createElement('div', 'end_button_or', styles.buttonWidgetStyle, 'End Session')
|
|
||||||
|
|
||||||
if (this.taskSection) {
|
if (this.taskSection) {
|
||||||
this.container.removeChild(this.taskSection)
|
this.container.removeChild(this.taskSection)
|
||||||
|
|
@ -566,6 +575,8 @@ export default class UserTestManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
button.onclick = () => {
|
button.onclick = () => {
|
||||||
|
if (isLoading) return
|
||||||
|
window.close()
|
||||||
document.body.removeChild(this.bg)
|
document.body.removeChild(this.bg)
|
||||||
}
|
}
|
||||||
section.append(title, description, button)
|
section.append(title, description, button)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue