mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 07:46:15 +08:00
removed mail sending completely
This commit is contained in:
parent
f4dbb14f05
commit
bda619883e
|
@ -255,7 +255,7 @@
|
|||
</div>
|
||||
<div class="section">
|
||||
<h1>bug report or feature request</h1>
|
||||
<p>If you encounter a bug, or have a feature request - join the <a href="https://discord.gg/yENzqcB">Discord server</a>, send me a message on Reddit, create an issue on <a href="https://github.com/Miodec/monkey-type">GitHub</a> or send me a message using the command line <key>esc</key>.</p>
|
||||
<p>If you encounter a bug, or have a feature request - join the <a href="https://discord.gg/yENzqcB">Discord server</a>, send me a message on Reddit or create an issue on <a href="https://github.com/Miodec/monkey-type">GitHub</a>.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h1>credits</h1>
|
||||
|
|
|
@ -165,49 +165,10 @@ let commands = {
|
|||
exec: () => {
|
||||
window.open("https://discord.gg/yENzqcB")
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "sendDevMessage",
|
||||
display: "Send a message ( bug report / feature request / feedback )...",
|
||||
subgroup: true,
|
||||
exec: () => {
|
||||
currentCommands.push(commandsSendDevMessage);
|
||||
showCommandLine();
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
let commandsSendDevMessage = {
|
||||
title: "Send a message...",
|
||||
list: [
|
||||
{
|
||||
id: "sendBugReport",
|
||||
display: "Bug report",
|
||||
input: true,
|
||||
exec: (txt) => {
|
||||
db_addEmailToQueue('bug', txt);
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "sendFeatureRequest",
|
||||
display: "Feature request",
|
||||
input: true,
|
||||
exec: (txt) => {
|
||||
db_addEmailToQueue('feature', txt);
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "sendFeedback",
|
||||
display: "Other feedback",
|
||||
input: true,
|
||||
exec: (txt) => {
|
||||
db_addEmailToQueue('feedback', txt);
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
let commandsDifficulty = {
|
||||
title: "Change difficulty...",
|
||||
list: [
|
||||
|
|
|
@ -71,36 +71,3 @@ async function db_getUserHighestWpm(mode, mode2, punctuation, language, difficul
|
|||
return retval;
|
||||
|
||||
}
|
||||
|
||||
function db_addEmailToQueue(type, body) {
|
||||
|
||||
let from = 'Annonymous';
|
||||
let subject = '';
|
||||
if (type == 'bug') {
|
||||
subject = 'New Bug Report';
|
||||
} else if (type == 'feature') {
|
||||
subject = 'New Feature Request';
|
||||
} else if (type == 'feedback') {
|
||||
subject = 'New Feedback';
|
||||
} else {
|
||||
showNotification('Error: Unsupported type',3000);
|
||||
return;
|
||||
}
|
||||
|
||||
if (firebase.auth().currentUser != null) {
|
||||
from = firebase.auth().currentUser.email + ' (' + firebase.auth().currentUser.uid + ')';
|
||||
}
|
||||
|
||||
db.collection('mail').add({
|
||||
to: "bartnikjack@gmail.com",
|
||||
message: {
|
||||
subject: subject,
|
||||
html: body.replace(/\r\n|\r|\n/g,"<br>") + "<br><br>From: " + from,
|
||||
}
|
||||
}).then(() => {
|
||||
showNotification('Email sent',3000);
|
||||
}).catch((e) => {
|
||||
showNotification('Error while sending email: ' + e,5000);
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in a new issue