some initial design changes

This commit is contained in:
Andrew Gundersen 2022-01-20 08:58:49 -06:00
commit 664a9d06f9
5 changed files with 10 additions and 14 deletions

View file

@ -38,6 +38,3 @@ window.mainApi.on("set-account", (account_) => {
export default App;
export { account };
// Is called when window is about to close or reload
window.onbeforeunload = () => console.log("beforeUnload");

View file

@ -28,22 +28,18 @@ const Messenger = {
{
person.value = update;
}
else if (typeof update == Array)
{
messages.value.push(...update);
}
else if (message.content)
{
messages.value.push(update);
}
else if (update.new)
else
{
messages.value.at(-1)[update.new] = update.val;
messages.value.at(-1).content.push(update);
}
});
window.mainApi.send("message", "win");
window.mainApi.send("message", {route: "window", open: true});
});
return { person, messages, onDrop };
@ -71,3 +67,6 @@ const Messenger = {
}
export default Messenger;
// Is called when window is about to close or reload
window.onbeforeunload = () => window.mainApi.send("message", {route: "window", open: true});