feat: ask user to send Discord message on error

This commit is contained in:
Xmader 2021-05-09 14:25:43 -04:00
parent 6d93907df0
commit 9adba49de1
No known key found for this signature in database
GPG Key ID: A20B97FB9EB730E4
1 changed files with 11 additions and 0 deletions

View File

@ -273,6 +273,17 @@ export namespace BtnAction {
setText(name)
} else {
setText(i18n('BTN_ERROR')())
// ask user to send Discord message
alert(
'❌Download Failed!\n\n' +
'Send your URL to the #dataset-bugs channel \n ' +
'in the LibreScore Community Discord server: https://discord.gg/kTyx6nUjMv',
)
// open Discord on 'OK'
const a = document.createElement('a')
a.href = 'https://discord.gg/kTyx6nUjMv'
a.target = '_blank'
a.dispatchEvent(new MouseEvent('click'))
}
}