show next/dev versiosn

pull/1364/head^2
Cory LaViska 2023-06-08 15:33:36 -04:00
rodzic 4b2a62f660
commit b8a3952153
1 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -243,3 +243,20 @@
document.addEventListener('turbo:load', updateActiveLinks);
document.addEventListener('turbo:load', observeLinks);
})();
//
// Show custom versions in the sidebar
//
(() => {
function updateVersion() {
const el = document.querySelector('.sidebar-version');
if (!el) return;
if (location.hostname === 'next.shoelace.style') el.textContent = 'Next';
if (location.hostname === 'localhost') el.textContent = 'Development';
}
updateVersion();
document.addEventListener('turbo:load', updateVersion);
})();