switch field names to new format

This commit is contained in:
BuckarooBanzay 2020-09-20 13:06:30 +02:00
parent 2e2108dadf
commit 2d1ca4869e
3 changed files with 6 additions and 4 deletions

View File

@ -33,7 +33,8 @@ const Compose = {
m("button[type=submit]", {
class:"btn btn-sm btn-block btn-primary",
onclick: sendMail,
disabled: !state.compose.body || !state.compose.subject || !state.compose.recipient
disabled: !state.compose.body || !state.compose.subject || !state.compose.recipient,
onsubmit: function(e) { e.preventDefault(); }
}, "Submit")
])
];

View File

@ -9,7 +9,8 @@ var LoginButton = function(){
return m("button", {
class:"btn btn-sm btn-block btn-primary",
disabled: !state.loginState.username || !state.loginState.password,
onclick: function(){ login(state.loginState.username, state.loginState.password); }
onclick: function(){ login(state.loginState.username, state.loginState.password); },
onsubmit: function(e){ e.preventDefault(); }
}, [spinner, " Login ", infoText]);
};

View File

@ -7,8 +7,8 @@ module.exports = (playername, recipient, subject, text) => new Promise(function(
events.emit("channel-send", {
type: "send",
data: {
src: playername,
dst: recipient,
from: playername,
to: recipient,
subject: subject || "",
body: text || ""
}