-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auto-reload functionality #140
base: dev
Are you sure you want to change the base?
Conversation
From just taking a quick glance at this, it looks really good, thanks :D This PR has a lot of formatting changes to existing files, making the actual change a bit hard to see. Also I didn't test this yet and it might take a bit for me to get around to do so ;c |
localStorage.setItem( | ||
"settings", | ||
JSON.stringify({ interval: this.interval }) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how expandable is this? If this entry is just for autoupdate, maybe the name settings
isn't ideal?
If we ever have any other settings in the future, this would overwrite them
} | ||
}, | ||
updateSettings() { | ||
localStorage.setItem( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, what happens if the user has somehow blocked localstorage?
imo it would be fine if saving just silently failed to persist the settings but autoreload still worked
<div | ||
v-for="service in services_no_group" | ||
v-bind:key="service.id" | ||
class="list-group online_list mb-4" | ||
> | ||
<div class="list-group-item list-group-item-action"> | ||
<router-link class="no-decoration font-3" :to="serviceLink(service)" | ||
>{{ service.name }}</router-link | ||
> | ||
<span | ||
class="badge float-right" | ||
:class="{ | ||
'bg-success': service.online, | ||
'bg-danger': !service.online, | ||
}" | ||
>{{ service.online ? "ONLINE" : "OFFLINE" }}</span | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part has some wonky formatting
Warning, I've not reviewed the code (I'm lazy I know...) What happens for upgrades and the settings isn't yet set, does it default to "Dont Reload"? |
This may address #98
Add dropdown menu at the top right of Index and Dashboard pages to provide simple auto-reload functionality.
Dropdown options are:
Settings will persist in Local Storage
Screenshots
.