Gerold55 / laptop

Introducing the MineTest Laptop Mod
Other
26 stars 14 forks source link

Email System #26

Closed Gerold55 closed 6 years ago

Gerold55 commented 6 years ago

What should be added to the email other than just being able to type and to send it to another player. Have to make sure that if that person doesn't have a PC that it'll say error PC/email not found. Also could we enable actual email address but the mod looks for the players name/PC users email account?

Gerold55 commented 6 years ago

@bell07

bell07 commented 6 years ago

Same thoughts here.

laptop.register_view("mail:newplayer", {
    formspec_func = function(app, os)
        return "label[1,3;No mail account for player "..os.appdata.os.last_player.. " found. Do you like to create a new account?]"..
                "image_button[1,4;3,1;"..os.theme.major_button..';create;Create account]'
    end,

Only if the player activates his account he can send and receive messages. Maybe later there should be a "Delete account" Button, but later, after the basic functionality is working.

PS: As I described security, I check each action if the player on node is the inbox owner. If not, the app will be finished to the launcher. But if you read your mails an other nearly player can look to your screen and disturb you, like in reallife

Gerold55 commented 6 years ago

😂😂😂 is there any pics or are you still working on it?

bell07 commented 6 years ago

Still working on it

v-rob commented 6 years ago

Well, I think that to email another player, you should have to email account be the player's name plus a @mail.com. For example, if the player's name is FooBar, then his email account would be FooBar@mail.com

I don't think making an email account name is a good idea. If I know a person's name, then I can email them, but this way, their email could be Qwerty@blabla.org when their name is actually FooBar, which is confusing.

bell07 commented 6 years ago

I avoid additional logic. The receiver name is just his minetest player name. Maybe it can be hard-coded an "@minetestserver or @game I suggest to not use email-addresses like FooBar@mail.com because of miss-understanding is possible and players try to use it in real world. The Account is identified and authentificated by Minetest player name. There is just 1 Server in the cloud. Therefore the mail will be sent to "playername". Maybe some adjustments can be done later, if the app is working.

Gerold55 commented 6 years ago

Yeah as long as it's functional and you can send emails to other players. Thing is that there's actually a mail.com that you can use for personal emails. How are we gonna test the email app without a server though?

Gerold55 commented 6 years ago

Should we name the email app eventually?

bell07 commented 6 years ago

I called the app just

laptop.register_app("mail", {
    app_name = "Mail",
    app_icon = "laptop_email_letter.png",
    app_info = "Write mails to other players",
Gerold55 commented 6 years ago

Oh OK 👍😊

Gerold55 commented 6 years ago

We don't really need a name for it was just a suggestion

bell07 commented 6 years ago

THe app_name can be changed anytime. It is a task for visual/colors/formspec adjustments after the functionality is done

Gerold55 commented 6 years ago

Yup 👍 do you need help creating a design (concept) for it?

bell07 commented 6 years ago

At the first I follow the https://github.com/cheapie/mail (WTFPL too) with some modifications as needed

Gerold55 commented 6 years ago

OK 👍 take a look back at it. I had downloaded it a while ago and haven't used it for a while now.

bell07 commented 6 years ago

I pushed the version mail-app to my repo. Already full working, but without any UI concept. The buttons are "MT-Standard" without themes and so on. Feel free to get it eye-candy. The next days I am not available so I do not disturb you in visual creativity. If bugs found they have to wait till I am back

Gerold55 commented 6 years ago

Alright 👍

bell07 commented 6 years ago

Forgotten to implement a view to the "sentbox" Maybe next week :-(

Gerold55 commented 6 years ago

Ok 👍

Gerold55 commented 6 years ago

Crashes when clicking on certain buttons and when you click the back or the exit button it doesn't work while in the email text area. Is it possible to do a drafts area?

bell07 commented 6 years ago

Which buttons crashes? Anything What is the crash message? The exit-button does right for me. For draft there is a button "Continue write last mail" So if you start to write mail you can go to other app and then back and resume writing mail

Gerold55 commented 6 years ago

If you click on apply it shows up as a gray screen and then the game crashed on me

bell07 commented 6 years ago

Grr. was a bug with the last custom_launcher changes. Should be solved in my master

Gerold55 commented 6 years ago

A couple of buttons cause the game to crash. @bell07

v-rob commented 6 years ago

Good. I was hoping that you would make the email address the same as the player name. That's basically what I was suggesting.

Gerold55 commented 6 years ago

@bell07 have you looked into the crashing when clicking certain buttons?

bell07 commented 6 years ago

A couple of buttons cause the game to crash

Please be more specific. This info does not help me to find any issue. Any Logs? Did you tried with the last version after the "custom_launcher" bug was fixed?

Gerold55 commented 6 years ago

@bell07 2017-12-06 18:33:29: ACTION[Server]: singleplayer [127.0.0.1] joins game. 2017-12-06 18:33:29: ACTION[Server]: singleplayer joins game. List of players: singleplayer 2017-12-06 18:33:30: WARNING[Main]: Map::getNodeMetadata(): Block not found 2017-12-06 18:33:30: WARNING[Main]: Map::removeNodeMetadata(): Block not found

Gerold55 commented 6 years ago

I don't know if that's part of it or not I'm doing a redownload of the mod to see if it happens again.

bell07 commented 6 years ago

Please try a redownload from full mod from my master. Or use from your master (I fixed the bug already too) and just the mail app from my repo. The bug was in framework so all buttons was crashing in all apps

bell07 commented 6 years ago

THe lines are ACTION and WARNING's no ERROR's :-(

Gerold55 commented 6 years ago

@bell07 2017-12-07 00:04:28: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'laptop' in callback node_on_receive_fields(): ...netest-0.4.16-win64\bin..\mods\laptop/apps/mail_app.lua:99: attempt to index field 'selectedmessage' (a nil value) 2017-12-07 00:04:28: ERROR[Main]: stack traceback: 2017-12-07 00:04:28: ERROR[Main]: ...netest-0.4.16-win64\bin..\mods\laptop/apps/mail_app.lua:99: in function 'receive_fields_func' 2017-12-07 00:04:28: ERROR[Main]: H:\minetest-0.4.16-win64\bin..\mods\laptop/app_fw.lua:35: in function 'receive_fields' 2017-12-07 00:04:28: ERROR[Main]: H:\minetest-0.4.16-win64\bin..\mods\laptop/os.lua:139: in function 'receive_fields' 2017-12-07 00:04:28: ERROR[Main]: H:\minetest-0.4.16-win64\bin..\mods\laptop/node_fw.lua:64: in function <H:\minetest-0.4.16-win64\bin..\mods\laptop/node_fw.lua:62> 2017-12-07 00:04:28: ACTION[Server]: singleplayer leaves game. List of players:

Gerold55 commented 6 years ago

Is that because there's no messages to be selected? But shouldn't the button do nothing if you click on it with nothing selected?

Gerold55 commented 6 years ago

also when I click the reply button it goes gray.

bell07 commented 6 years ago

I see, yes it is a selection issue if the inbox is empty. Please send a mail to yourself for further tests. I fix it if I find time

Gerold55 commented 6 years ago

Some more edits like making it so you can't edit/delete what was wrote previously by someone and when you open the email it automatically says that it has been read.

bell07 commented 6 years ago
  1. There is no formspec way to show multiline text read only without handling the line endings byself. If yes, let me know. Therefore the displayed message is editable but the changes arent saved.
  2. Set automatically to read: In the chaepie's version the mail was opened in separate screen on double-click and then set to readed. To set it to readed by one touch is me to fast for me, therefore I leaved it by double-click. I think about a delayed way: The messasge is readed if selected for 1 second...
Gerold55 commented 6 years ago

Oh ok 👍

Gerold55 commented 6 years ago

@bell07

test_email

Gerold55 commented 6 years ago

@v-rob @tobyplowy

tobyplowy commented 6 years ago

@Gerold55 please don't ping me unless you need my help explicitly :)

Gerold55 commented 6 years ago

Sorry was trying to get some feedback on the concept :)

tobyplowy commented 6 years ago

@Gerold55 it Looks good bdw :)

bell07 commented 6 years ago

Looks nice! How I can get the file so I can do the bugfixing on this version?

Gerold55 commented 6 years ago

I didn't put the icons for buttons in at least not yet. I'll upload the images soon though.

bell07 commented 6 years ago

Need an additional textures for open and closed envelop to be shown in table each line at left, to display if mail is read or unread

Gerold55 commented 6 years ago

I'm gonna be uploading the email button icons.

Gerold55 commented 6 years ago

@bell07 done

bell07 commented 6 years ago

Fixed bugs, added the outbox view. Looks still not eye-candy. Anyone with more graphics skills needs to look into the app formspecs.

Gerold55 commented 6 years ago

Can we have the email section (right hand side) have a color other than white? So that it's easier to read.