felix-d1strict / AL-JobTracker

Euro Truck Simulator 2 and American Truck Simulator - Jobtracker for Ace Logistics.
https://ace-logistics.uk
GNU General Public License v3.0
3 stars 1 forks source link

Show application icon in tray #9

Closed felix-d1strict closed 3 years ago

felix-d1strict commented 3 years ago

A small icon should be displayed at the bottom of the screen (Windows).

AdyStudios commented 3 years ago

Im going to inploment this thing: https://www.electronjs.org/docs/api/tray

felix-d1strict commented 3 years ago

However, electron is quite large. It would go beyond the scope of the file size.

AdyStudios commented 3 years ago

Okay let me do some more research

felix-d1strict commented 3 years ago

You could use this: https://www.npmjs.com/package/systray

AdyStudios commented 3 years ago

On it

AdyStudios commented 3 years ago

There should be 3 options (I think) when clicking on the tracker on the tray: 1. Restart 2.Stop/Exit 3.Help (should open up the website/discord)

felix-d1strict commented 3 years ago

Be careful when you make a commit, though. Not that you commit in main or in 1.0.0. Use the 1.0.1-alpha for this.

That's exactly how I thought it would be. Maybe the third point should be the first and be called "Ace Logistics" or just "VTC". There you could include a dropdown, which contains several points.

For the restart, we then need a separate "function". Simply opening a new instance is no longer possible with the following commit/issue. https://github.com/D1strict/AL-JobTracker/commit/1b01ee3619acbf44e4d74d0f3a66143e0fa3b297 https://github.com/D1strict/AL-JobTracker/issues/3

AdyStudios commented 3 years ago

Great 👍 I couldnt even comit my pc crashed, also I couldnt get the systray working it just keeps giving me an error for the first line (import SysTray from 'systray')

felix-d1strict commented 3 years ago

Ah, sorry. I just saw: oups

AdyStudios commented 3 years ago

I tried that one but it just popped up as a completely blank tray button, couldnt change anything

felix-d1strict commented 3 years ago

You could try this: https://www.npmjs.com/package/systray

But import systray with: const SysTray = require('systray').default;

felix-d1strict commented 3 years ago

And dont forget to save the systray-files before: npm install --save systray ;-)

AdyStudios commented 3 years ago

Thanks 👍 I will try them as soon as my pc loads back

Also sorry for being a boomer in javaScript

felix-d1strict commented 3 years ago

Thanks 👍 I will try them as soon as my pc loads back

Thank not me, thank stack overflow. Credits to: https://stackoverflow.com/questions/51517121/nodejs-systray-systray-is-not-a-constructor

Also sorry for being a boomer in javaScript

Haha, no problem. What do you think I am? ;D I have never looked at JavaScript. And like HTML, PHP, CSS and so on i am also learn by doing.

AdyStudios commented 3 years ago

Thank not me, thank stack overflow. Credits to: https://stackoverflow.com/questions/51517121/nodejs-systray-systray-is-not-a-constructor

Google is evil: when I search for it google wont show this page 😠

felix-d1strict commented 3 years ago

Google Germany ;D

I just type: import SysTray from 'systray'

AdyStudios commented 3 years ago

Haha, no problem. What do you think I am? ;D I have never looked at JavaScript. And like HTML, PHP, CSS and so on i am also learn by doing.

I think you are probobly doing this for 5-6 years or something, you seem very experienced ❎🅿️

felix-d1strict commented 3 years ago

I didn't start writing JavaScript/NodeJS until we started the tracker. ¯_(ツ)_/¯ But maybe PHP helped a little. After all, the two languages are not that different.

AdyStudios commented 3 years ago

I did eventually (used Js before), I made discord bots. I started with Scratch, then scoolcode (whatever), python, C# (unity) and now Jsc html, css

felix-d1strict commented 3 years ago

Scratch? I was last there in 2016. Since then, I no longer know the email address and password. ;D https://scratch.mit.edu/users/felixwberlin/

AdyStudios commented 3 years ago

Haha time to get back to Js

AdyStudios commented 3 years ago

That's exactly how I thought it would be. Maybe the third point should be the first and be called "Ace Logistics" or just "VTC". There you could include a dropdown, which contains several points.

1b01ee3

3

I think we don't actaully need that extra three options under Ace Logistics because, I think its more user friendly if they found all those buttons on a website. Also I don't know how to do that lol, and the API doesn't tells me

AdyStudios commented 3 years ago

How we should call the Exit button? Exit/Quit/Stop?

AdyStudios commented 3 years ago

I think Exit, but what do you think?

AdyStudios commented 3 years ago

Okay, I'm done with the followings: Ace Logistics button which takes you to: ace-logistics.uk Exit/Quit/Stop button Restart button

one BIG issue: Icon is not working at all

AdyStudios commented 3 years ago

YES I got the icon working, I needed a Base64 string Y E S

felix-d1strict commented 3 years ago

That's exactly how I thought it would be. Maybe the third point should be the first and be called "Ace Logistics" or just "VTC". There you could include a dropdown, which contains several points.

1b01ee3

3

I think we don't actaully need that extra three options under Ace Logistics because, I think its more user friendly if they found all those buttons on a website. Also I don't know how to do that lol, and the API doesn't tells me

Therefore yes as a submenu. So user-friendly, in my opinion, would be to be able to get all the important information (and that is, in my opinion, the reposting of jobs, our website and the help) at a glance.

But I was mistaken earlier, in systray v2 you can create submenus. So maybe this would be something for version 1.0.2 or higher.

felix-d1strict commented 3 years ago

I think Exit, but what do you think?

Quit is a standard for Mac. On Windows "Exit" should be the correct term. So, youre right.

AdyStudios commented 3 years ago

That's exactly how I thought it would be. Maybe the third point should be the first and be called "Ace Logistics" or just "VTC". There you could include a dropdown, which contains several points.

1b01ee3

3

I think we don't actaully need that extra three options under Ace Logistics because, I think its more user friendly if they found all those buttons on a website. Also I don't know how to do that lol, and the API doesn't tells me

Therefore yes as a submenu. So user-friendly, in my opinion, would be to be able to get all the important information (and that is, in my opinion, the reposting of jobs, our website and the help) at a glance.

But I was mistaken earlier, in systray v2 you can create submenus. So maybe this would be something for version 1.0.2 or higher.

Okay, okay I will find a way to do it lel

felix-d1strict commented 3 years ago

That's exactly how I thought it would be. Maybe the third point should be the first and be called "Ace Logistics" or just "VTC". There you could include a dropdown, which contains several points.

1b01ee3

3

I think we don't actaully need that extra three options under Ace Logistics because, I think its more user friendly if they found all those buttons on a website. Also I don't know how to do that lol, and the API doesn't tells me

Therefore yes as a submenu. So user-friendly, in my opinion, would be to be able to get all the important information (and that is, in my opinion, the reposting of jobs, our website and the help) at a glance. But I was mistaken earlier, in systray v2 you can create submenus. So maybe this would be something for version 1.0.2 or higher.

Okay, okay I will find a way to do it lel

https://github.com/felixhao28/node-systray

felix-d1strict commented 3 years ago

https://www.npmjs.com/package/systray2

felix-d1strict commented 3 years ago

To open a link you can use "open" (see app.js of the branch 1.0.1-alpha). Then the respective page opens in the default browser.

AdyStudios commented 3 years ago

Thanks, I already found all the stuff ;)

AdyStudios commented 3 years ago

Done

AdyStudios commented 3 years ago

I'm done with everything, so I will close this one ;)