mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 19:23:31 +00:00
f53550fc6c
- Remove confusing "preview mode" - channels switch and save immediately - Eliminate complex localStorage channel persistence logic - Reduce update reload time from 10+ seconds to 3 seconds - Remove redundant "Switch to X & Update" buttons - Make channel switching instant with immediate feedback Users can now simply change the dropdown to switch channels instantly, then click Apply Update for a fast 3-second reload experience. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
393 B
JavaScript
20 lines
393 B
JavaScript
(function setupHotReload() {
|
|
const socket = io();
|
|
|
|
socket.on('hotReload', function() {
|
|
window.location.reload();
|
|
});
|
|
|
|
let wasConnected = false;
|
|
socket.on('connect', function() {
|
|
if (wasConnected) {
|
|
setTimeout(() => window.location.reload(), 500);
|
|
}
|
|
wasConnected = true;
|
|
});
|
|
|
|
socket.on('disconnect', function(reason) {
|
|
wasConnected = false;
|
|
});
|
|
|
|
})();
|