mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 03:04:03 +00:00
fix: make RC indicator dynamic based on actual version
- Remove hardcoded RC badge from HTML - Add dynamic version detection to show RC badge only for release candidates - Update page title dynamically based on version type - RC badge now only appears for versions containing -rc, -alpha, or -beta 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Pulse RC</title>
|
||||
<title>Pulse</title>
|
||||
<link rel="icon" href="/logo.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="/output.css">
|
||||
<style>
|
||||
@@ -491,7 +491,7 @@
|
||||
<circle class="pulse-logo-inner pulse-logo-circle" cx="50" cy="50" r="25"/>
|
||||
</svg>
|
||||
<span class="text-lg font-medium text-gray-800 dark:text-gray-200">Pulse</span>
|
||||
<span class="text-xs font-bold text-orange-600 dark:text-orange-400 bg-orange-100 dark:bg-orange-900 px-1 py-0.5 rounded ml-1">RC</span>
|
||||
<span id="version-badge" class="text-xs font-bold text-orange-600 dark:text-orange-400 bg-orange-100 dark:bg-orange-900 px-1 py-0.5 rounded ml-1 hidden"></span>
|
||||
</div>
|
||||
<div class="header-controls flex justify-end items-center gap-4 md:flex-1">
|
||||
<button id="settings-button" type="button" class="p-1 h-11 w-11 sm:h-auto sm:w-auto rounded-md text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700 focus:outline-none" title="Settings" aria-label="Open settings">
|
||||
|
||||
@@ -178,6 +178,24 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
if (data.version) {
|
||||
versionSpan.textContent = data.version;
|
||||
|
||||
// Check if this is a release candidate
|
||||
const versionBadge = document.getElementById('version-badge');
|
||||
if (versionBadge && data.version) {
|
||||
const isRC = data.version.includes('-rc') ||
|
||||
data.version.includes('-alpha') ||
|
||||
data.version.includes('-beta');
|
||||
if (isRC) {
|
||||
versionBadge.textContent = 'RC';
|
||||
versionBadge.classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
// Also update the page title
|
||||
const isRC = data.version && (data.version.includes('-rc') ||
|
||||
data.version.includes('-alpha') ||
|
||||
data.version.includes('-beta'));
|
||||
document.title = isRC ? 'Pulse RC' : 'Pulse';
|
||||
|
||||
// Check if update is available
|
||||
if (data.updateAvailable && data.latestVersion) {
|
||||
// Check if update indicator already exists
|
||||
|
||||
Reference in New Issue
Block a user