owntracks / talk

Questions, talk about OwnTracks
32 stars 4 forks source link

Card editor as webapp #66

Closed avanc closed 4 years ago

avanc commented 5 years ago

I wrote a small webapp to edit cards: https://avanc.github.io/owntracks-cards/

It uses websockets to communicate with the broker. Thus, you have to activate websockets in your broker configuration (or use the preconfigured test server). As the webapp is served via https, browsers only allow SSL websocket connections. However, you can also serve the index html as local file an connect to unsecured brokers.

The code can be found at https://github.com/avanc/owntracks-cards/

Your comments and suggestions are highly welcome.

jpmens commented 5 years ago

That's quite nifty and thank you for sharing with us.

A few observations:

  1. Your repository needs a bit of documentation on how to use your webapp
  2. Upon clicking "Connect to server", there is no change in the UI; only by having access to the broker logs did I see that something was happening.
  3. Errors are not surfaced to the user; I had to enable Javascript console to see what I was doing wrong; it would be good to show the user.
  4. the "New Card" button at the top would make more sense to me if it were at the bottom, as I have to first connect to the server anyway.

All in all a good start though. If you add a bit of documentation on how users can get started with it, we will gladly add this to our Booklet (you can also contribute the entry to https://owntracks.org/booklet/guide/clients/ yourself if you like. :-)

avanc commented 5 years ago

Thanks for your feedback. Will check what I can do and come back later.

avanc commented 5 years ago

I added documentation as well as showing the connection state.

However, I'm unsure which errors to catch and inform the user. I tried to inform the user if the host name is wrong. However, the following error cannot be caught with try:

Firefox can’t establish a connection to the server at wss://xyz.

Feel free to tell me your initial setup problems.