dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[FEATURE_REQUEST] Allow full offline mode

Open aghybris opened this issue 3 years ago • 10 comments

Is your feature request related to a problem? If so, please describe.

Hi. Thanks for this great dashboard! Could you please add some complete offline or self-hosted mode. Currently it loads some external resources (e.g: kit.fontawesome.com/0821c65656.js) even if no fontawsome icons are used at all. I use it in the lab where many servers have no connection to public internet. The UI is fine. No resoures are missing but the browser is confused about some failing background requests. Should be easy to omit that. Thanks.

Describe the solution you'd like

A config switch / property to disable requests to external URLs like: ka-p.fontawesome.com/releases/v5.15.4/webfonts/pro-fa-solid-900-5.0.0.woff2

The dashbord should be perfectly usable without internet connection.

Priority

Medium (Would be very useful)

Is this something you would be keen to implement

No response

aghybris avatar Mar 01 '22 21:03 aghybris

Yes, as someone who really cares about privacy also, I see the appeal of full offline mode. So I will add this to the todo list, although I have already got the up next feature list planned, so this might have to come after that.

Just a note, that currently Dashy should function totally fine when offline, unless you've configured it to use any widgets, themes or icons that were not feasible to include in the bundle.

Font Awesome shouldn't be loaded unless you're using it. Which theme are you using? You can also manually disable it with enableFontAwesome: false under appConfig

Lissy93 avatar Mar 01 '22 22:03 Lissy93

Thanks for the hint. I have now configured enableFontAwesome: false But still 4 external URLs are loaded. The dashboard looks still great and unchanged with these requests failing.

"appConfig": "theme": "colorful" "layout": "vertical" "iconSize": "small" "enableFontAwesome": false "language": "de"

https://kit.fontawesome.com/0821c65656.js https://ka-p.fontawesome.com/releases/v5.15.4/css/pro-v4-shims.min.css?token=0821c65656 https://ka-p.fontawesome.com/releases/v5.15.4/css/pro-v4-font-face.min.css?token=0821c65656 https://ka-p.fontawesome.com/releases/v5.15.4/webfonts/pro-fa-solid-900-5.0.0.woff2

aghybris avatar Mar 01 '22 22:03 aghybris

Thanks so much for the sponsorship! 💖 It's super kind of you :)

Lissy93 avatar Mar 02 '22 18:03 Lissy93

So I was thinking about this last night, and I think the best option would be for there to be zero external network requests in the default setup, but then if the user chooses to use an icon, widget, theme or feature (like status checking) that requires network connection, then requests will be made. And also for the docs to be really clear about what features make what network requests.

I've submitted a PR, #523 which:

  • Fixes the disableFontAwesome attribute
  • Updated the privacy docs, to list every possible network request the app makes when certain (off by default) features are enabled

It should be merged either tonight or tomorrow night.

There's also another ticket: #435, which will add an option to download and cache any external item icons, allowing them to work fully when offline.

I know your idea was to have a toggle switch, which would disable all network requests, but implementing that isn't quite as easy as it sounds. (But I'm open to suggestions, if you know of an elegant method, without service workers or wrapping every request).

Of course, this could also be done very easily from the user's end, either in firewall settings, browser settings, or using an extension like Work Offline.

Lissy93 avatar Mar 02 '22 18:03 Lissy93

I was about to open an issue more or less for the same request. So glad you already addressed it @Lissy93 and thanks to @aghybris for the request.

One thing: could ALL icons, no matter the source, be cached locally? Sometimes external sites are not reachable and the icons fallback to the broken icon. It would be good if they are always available in a local cache, with a TTL maybe so they get refreshed when possible.

Thanks again for your excellent work.

alexdelprete avatar Mar 16 '22 16:03 alexdelprete

It seems greater minds have preceeded me here. Thank you for already addressing this. I like @alexdelprete 's idea here to cache icons locally. In that way everything works beautifully if the user is online or off.

jg3 avatar Mar 30 '22 13:03 jg3

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Apr 30 '22 01:04 liss-bot

/keep-open

Lissy93 avatar Apr 30 '22 12:04 Lissy93

I also have this problem, I deployed it offline, found it access this url, my server cannot access it: https://fonts.googleapis.com/css2?family=Shrikhand&display=swap

ghost avatar Jun 10 '22 09:06 ghost

@denganliang - Apologies, that appears to have been a mistake on my part. I've removed it in 330d812bfd868c01fd88e564e82232b9256ff5c0.

Lissy93 avatar Jun 10 '22 13:06 Lissy93