go-astilectron icon indicating copy to clipboard operation
go-astilectron copied to clipboard

Can I use the tray?

Open deepch opened this issue 8 years ago • 14 comments

https://electron.atom.io/docs/api/tray/

deepch avatar Jul 15 '17 14:07 deepch

@deepch For now this is not available but I/Somebody could add it.

Would you mind showing me a little example of what you're trying to do? That would help for testing the implementation.

Cheers

asticode avatar Jul 16 '17 09:07 asticode

I make the program a server for working with IP cameras. It will ask the user to specify the rtsp / onvif camera and add it to the cloud via NAT using the socket.

Since it should be running constantly and is designed for servers, I would like to minimize it to the tray.

I have not yet completed the main functionality, I need a few weeks after which I can post it for demonstration.

I'll post the implementation in this thread a little later.

2017-07-16 13 02 44

I use go-astilectron bootstrap and twitter bootstrap UI Theme admin admin mini version

deepch avatar Jul 16 '17 10:07 deepch

Maybe someone will have a question how to make it work jquery

I fond solution

<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>

<script src="../static/plugins/bower_components/jquery/dist/jquery.min.js"></script>

<script>if (window.module) module = window.module;</script>

deepch avatar Jul 16 '17 10:07 deepch

@deepch I've just added basic Tray handling:

  • doc: https://github.com/asticode/go-astilectron#tray
  • example: https://github.com/asticode/go-astilectron/blob/master/examples/9.tray/main.go

Let me know if that fix your issue.

PS: Your design is awesome! Would love for you to post it for demonstration!

Cheers

asticode avatar Jul 16 '17 12:07 asticode

Thank you, I test it.

Well, this is not my design, I just collect different items to get a good result.

I will certainly give examples of how to create such design programs for other developers.

Now I am engaged in the integration of table solutions.

https://datatables.net

It would be convenient to use the golang struct for json for the data table

When I finish I'll make examples.

PS. You did a very good job. This is the first project that really allows you to easily run the gui program very quickly and beautifully.

deepch avatar Jul 16 '17 12:07 deepch

@deepch did you have the chance to test the Tray? Is it working fine for you?

asticode avatar Jul 22 '17 09:07 asticode

I have not had time to check everything yet. I build mac

2017-07-22 14 35 26

and build for windows

2017-07-22 14 50 13

It seems to me that something is wrong with the picture

I will check it.

deepch avatar Jul 22 '17 11:07 deepch

@deepch Seems like there's a problem in the image path in the windows example: is C:\src\github.com\asticode\go-astilectron... a valid path?

asticode avatar Jul 30 '17 07:07 asticode

@deepch is your issue resolved?

asticode avatar Aug 25 '17 17:08 asticode

Hi @asticode, I think I am facing this issue on Windows. Tried several image formats, but on Windows it still causes problems, Linux is fine.

image

agajdosi avatar May 16 '18 20:05 agajdosi

@agajdosi I will try new things such as https://github.com/electron/electron/issues/7657 in the coming days. I'll keep you posted

asticode avatar May 17 '18 17:05 asticode

@agajdosi I know it's been a while, but do you still have the image that was causing problems ?

asticode avatar Nov 28 '19 08:11 asticode

Hi @asticode, what do you mean by image? Old code which had that error?

agajdosi avatar Nov 30 '19 11:11 agajdosi

if you still have it, yes

asticode avatar Dec 02 '19 16:12 asticode