From 9adba49de1f9ccc17c0b67c341b03694575178df Mon Sep 17 00:00:00 2001 From: Xmader Date: Sun, 9 May 2021 14:25:43 -0400 Subject: [PATCH] feat: ask user to send Discord message on error --- src/btn.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/btn.ts b/src/btn.ts index 35f90a2..e8800e3 100644 --- a/src/btn.ts +++ b/src/btn.ts @@ -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')) } }