feat(Nav): Refactor navigation structure to support nested items and improve visibility logic
feat(Radio): - Redesigned Queue modal, added drag & drop capabilities - Added stream quality selector, currently offering: AAC @ 128kbps, AAC @ 320kbps & FLAC (lossless) fix(middleware): Import API_URL from config and remove hardcoded API_URL definition security(api): Enhance discord image and video caching with improved signature verification and error handling, updated image proxy to include production checks for signing secret
This commit is contained in:
@@ -23,27 +23,49 @@ const envBadge = ENVIRONMENT === 'Dev' ? 'DEV' : null;
|
||||
<span class="version-pill">
|
||||
{envBadge && <span class="env-dot" title="Development build"></span>}
|
||||
{!envBadge && <span class="version-dot"></span>}
|
||||
{versionDisplay}:{buildNumber}
|
||||
<span class="version-text">{versionDisplay}:{buildNumber}</span>
|
||||
<span class="build-time-text" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updateBuildTooltip() {
|
||||
function initBuildTooltip() {
|
||||
const el = document.querySelector('.footer-version[data-build-time]');
|
||||
if (el) {
|
||||
const iso = el.getAttribute('data-build-time');
|
||||
if (iso) {
|
||||
const local = new Date(iso).toLocaleString(undefined, {
|
||||
dateStyle: 'medium',
|
||||
timeStyle: 'short',
|
||||
});
|
||||
el.setAttribute('title', `Built: ${local}`);
|
||||
}
|
||||
if (!el) return;
|
||||
|
||||
const iso = el.getAttribute('data-build-time');
|
||||
if (!iso) return;
|
||||
|
||||
const local = new Date(iso).toLocaleString(undefined, {
|
||||
dateStyle: 'medium',
|
||||
timeStyle: 'short',
|
||||
});
|
||||
el.setAttribute('title', `Built: ${local}`);
|
||||
|
||||
// Set build time text for mobile tap display
|
||||
const buildTimeText = el.querySelector('.build-time-text');
|
||||
if (buildTimeText) {
|
||||
buildTimeText.textContent = local;
|
||||
}
|
||||
|
||||
// Handle tap on mobile to toggle build time display
|
||||
const pill = el.querySelector('.version-pill') as HTMLElement | null;
|
||||
if (pill && !pill.dataset.initialized) {
|
||||
pill.dataset.initialized = 'true';
|
||||
pill.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
pill.classList.toggle('show-build-time');
|
||||
});
|
||||
}
|
||||
}
|
||||
updateBuildTooltip();
|
||||
document.addEventListener('astro:page-load', updateBuildTooltip);
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', initBuildTooltip);
|
||||
} else {
|
||||
initBuildTooltip();
|
||||
}
|
||||
document.addEventListener('astro:page-load', initBuildTooltip);
|
||||
</script>
|
||||
|
||||
<style is:global>
|
||||
@@ -73,6 +95,24 @@ const envBadge = ENVIRONMENT === 'Dev' ? 'DEV' : null;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.build-time-text {
|
||||
display: none;
|
||||
font-size: 0.68rem;
|
||||
opacity: 0.7;
|
||||
padding-left: 0.4rem;
|
||||
border-left: 1px solid rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.version-pill.show-build-time .build-time-text {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .build-time-text {
|
||||
border-left-color: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
|
||||
.version-pill:hover {
|
||||
|
||||
Reference in New Issue
Block a user