-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Times shows as "started" in other tabs after you have stopped it #4865
Comments
Brave! Now tell me how to achieve that with thousands of open tabs/sessions. Closing, duplicate of #3620 |
This is NOT a duplicate of #3620. That addresses when you have one session open on one device and the same customer logged in on another device. Instead, this issue addresses when the same person has two tabs open and logged in on the same browser. I assume your question is being facetious. But I'll provide an answer.
The above is the facetious part. Now is the important part:
I think you can also do this for push notifications between tabs: // Listen for storage changes
window.addEventListener('storage', function(event) {
if (event.key === 'timerstatus-user1234') {
console.log('New value: ', event.newValue);
}
}); Please note that setting and getting this value causes zero network traffic to your server. And it does not leak any information during other page requests. It is NOT a cookie. This approach above and/or |
No, I didn't see the localstorage part.
That's patronising. Your communication is at the edge of being rude. Please try to work on that.
That only covers 80% of the use-cases, but that's likely enough... I am just not sure if the idea is feasible. What if someone has two tabs open deliberately. Say, currently writing down some new tasks or updating customer data in a modal. |
Describe the issue
Test case:
Expected:
The time tracking widget shows that time is not tracking.
Actual:
The time tracking widget shows that time is still tracking.
Proposed solution:
A local storage, or possibly session storage, is a way for the application to communicate with itself between different tabs. This can be polled once per second without any performance impact.
I already tried
Kimai version
2
How do you run Kimai?
KIMAI CLOUD
Which PHP version are you using?
8.1
Logfile
No response
Screenshots
The text was updated successfully, but these errors were encountered: