ItsSim / fsolauncher

Official FreeSO Launcher made with Electron

Home Page:https://beta.freeso.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Windows/Mac] Home refresh button

ItsSim opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
There is currently no way to refresh the home page content (RSS, Twitter).

Describe the solution you'd like
Allow the user to refresh the home page content with a "Refresh" button in the header.

Describe alternatives you've considered
There is no other way to do this right now.

Additional context
Should be implemented as a button in the header that, when clicked, refreshes the RSS feed and Twitter feed.
There are functions in the src/fsolauncher_ui/client.js file that already do this, these functions should be called upon user request.
This feature is client-side only, meaning that only the fsolauncher.pug/client.js files should be modified.

Example of how the button could be made (I don't have a high-res homepage screenshot right now, but this button would be ON THE HOMEPAGE, not Settings): Icon is material-icons, already included in the pug file.

launcher-refresh
A tooltip should be displayed "Refreshing content..." or something similar, while processing.

commented

+Spamming the button should be prevented, 1 req/s limit maybe.

Just submitted a pull request for this one.

commented

Thanks for the PR @tomgrice! Merged it and works great.

Reopening though because I feel like there's too many default buttons already. Playing around with some other options, trying to decide on one.

image

I did consider this as the default looks a bit clunky for something as simple as refresh.
Options could be to use material icons without a button (just an icon), or use an SVG image like the Simitone icon.

Other option would be to poll for updates every minute (hopefully be able to get that from page metadata) or so and do a full refresh if the page has been updated.

Or could have individual smaller icons next to each section?

refresh

Just a mockup, I would probably have the refresh icons slightly smaller, and slightly faded and become more visible on hover.

commented

The two smaller buttons option does seem nicest, but I'm not sure if a user would want to individually update both sections. I think of it more as a "give me any FreeSO news" feature.
Also, I've been wanting to put something on the right side of that header for the longest time because it seemed too empty.
The polling option is not possible, I've agreed to the launcher hitting the website the least it can.
So, a nice icon in the header instead of a button would be the best option. Probably a smaller icon than the one I posted.

Cool - i've given it a shot. Should be easy to change icon to whatever style is needed.

Just noticed it gives some weird results when theme is changed. I will fix shortly.

commented

Just noticed it gives some weird results when theme is changed. I will fix shortly.

I merged and fixed the appearance for all themes. Closing!

commented

Screenshot 2022-04-26 at 14 41 28

Looks awesome :)