564 lines
18 KiB
HTML
564 lines
18 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>TrueGrowth - 版本日志 · AI应用平台演进</title>
|
|
<meta
|
|
name="description"
|
|
content="查看 TrueGrowth 的版本日志与重要更新记录。该页面主要用于发布追踪与历史查阅,不作为产品能力落地页。"
|
|
/>
|
|
<meta name="robots" content="noindex,follow" />
|
|
<link rel="canonical" href="https://TrueGrowth.ai/versions.html" />
|
|
<style>
|
|
:root {
|
|
--primary-color: #4f46e5;
|
|
--primary-hover: #4338ca;
|
|
--bg-color: #f3f4f6;
|
|
--card-bg: #ffffff;
|
|
--text-main: #111827;
|
|
--text-secondary: #6b7280;
|
|
--border-color: #e5e7eb;
|
|
--details-bg: #f9fafb;
|
|
--tag-bg: #e0e7ff;
|
|
--tag-text: #4338ca;
|
|
--success-color: #10b981;
|
|
--warning-color: #2563eb;
|
|
--timeline-line: #d1d5db;
|
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--bg-color: #111827;
|
|
--card-bg: #1f2937;
|
|
--text-main: #f9fafb;
|
|
--text-secondary: #9ca3af;
|
|
--border-color: #374151;
|
|
--details-bg: #111827;
|
|
--tag-bg: #312e81;
|
|
--tag-text: #e0e7ff;
|
|
--timeline-line: #4b5563;
|
|
}
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: var(--bg-color);
|
|
color: var(--text-main);
|
|
min-height: 100vh;
|
|
padding: 40px 20px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.container { max-width: 800px; margin: 0 auto; position: relative; }
|
|
|
|
header { text-align: center; margin-bottom: 60px; }
|
|
|
|
h1 {
|
|
font-size: 32px; margin-bottom: 12px; font-weight: 800;
|
|
display: flex; align-items: center; justify-content: center; gap: 12px;
|
|
color: var(--text-main);
|
|
}
|
|
h1 .icon { font-size: 36px; }
|
|
.subtitle { color: var(--text-secondary); font-size: 16px; }
|
|
|
|
.loading { text-align: center; padding: 60px; color: var(--text-secondary); }
|
|
.loading .spinner {
|
|
width: 40px; height: 40px; border: 3px solid var(--border-color);
|
|
border-top-color: var(--primary-color); border-radius: 50%;
|
|
animation: spin 1s linear infinite; margin: 0 auto 20px;
|
|
}
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
.error {
|
|
background: #fee2e2; border: 1px solid #fecaca; color: #b91c1c;
|
|
padding: 24px; border-radius: 12px; text-align: center;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
.error { background: #7f1d1d; border-color: #991b1b; color: #fca5a5; }
|
|
}
|
|
|
|
/* Timeline styles */
|
|
.timeline {
|
|
position: relative;
|
|
padding-left: 30px;
|
|
}
|
|
.timeline::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 14px;
|
|
width: 2px;
|
|
background: var(--timeline-line);
|
|
border-radius: 1px;
|
|
}
|
|
|
|
.version-group { margin-bottom: 40px; position: relative; }
|
|
|
|
.group-label {
|
|
position: sticky;
|
|
top: 20px;
|
|
display: inline-block;
|
|
background: var(--primary-color);
|
|
color: white;
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
margin-bottom: 24px;
|
|
margin-left: -44px;
|
|
z-index: 10;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.version-item {
|
|
position: relative;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.version-dot {
|
|
position: absolute;
|
|
left: -36px;
|
|
top: 24px;
|
|
width: 14px;
|
|
height: 14px;
|
|
border-radius: 50%;
|
|
background: var(--bg-color);
|
|
border: 3px solid var(--primary-color);
|
|
z-index: 2;
|
|
}
|
|
|
|
.version-item:hover .version-dot {
|
|
background: var(--primary-color);
|
|
transform: scale(1.2);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.version-card {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 16px;
|
|
transition: all 0.2s ease;
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.version-card:hover {
|
|
border-color: var(--primary-color);
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.version-header {
|
|
padding: 20px 24px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.version-info { flex: 1; }
|
|
|
|
.version-title-row {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.version-number {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.version-tag {
|
|
font-size: 12px;
|
|
padding: 2px 10px;
|
|
border-radius: 999px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.version-tag.major { background: #7c3aed; color: white; } /* Violet 600 */
|
|
.version-tag.minor { background: var(--tag-bg); color: var(--tag-text); }
|
|
.version-tag.patch { background: #e5e7eb; color: #374151; }
|
|
|
|
.version-date {
|
|
font-size: 14px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.version-highlights {
|
|
font-size: 15px;
|
|
color: var(--text-secondary);
|
|
margin-top: 8px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.expand-icon {
|
|
color: var(--text-secondary);
|
|
transition: transform 0.3s ease;
|
|
margin-left: 16px;
|
|
margin-top: 4px;
|
|
opacity: 0.6;
|
|
}
|
|
.version-card:hover .expand-icon { opacity: 1; }
|
|
.expand-icon.expanded { transform: rotate(180deg); }
|
|
|
|
.version-details {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height 0.3s ease-out;
|
|
background: var(--details-bg);
|
|
border-top: 1px solid transparent;
|
|
}
|
|
|
|
.version-details.open {
|
|
max-height: 5000px;
|
|
border-top-color: var(--border-color);
|
|
}
|
|
|
|
.version-details-inner { padding: 24px; }
|
|
|
|
.change-category { margin-bottom: 24px; }
|
|
.change-category:last-child { margin-bottom: 0; }
|
|
|
|
.category-header {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
margin-bottom: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.category-icon { font-size: 18px; }
|
|
|
|
.change-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
}
|
|
|
|
.change-list li {
|
|
padding-left: 20px;
|
|
position: relative;
|
|
margin-bottom: 8px;
|
|
font-size: 14px;
|
|
color: var(--text-main);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.change-list li::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 6px;
|
|
top: 10px;
|
|
width: 4px;
|
|
height: 4px;
|
|
border-radius: 50%;
|
|
background-color: var(--text-secondary);
|
|
}
|
|
|
|
.load-more-container {
|
|
margin-top: 40px;
|
|
text-align: center;
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.load-more {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border-color);
|
|
padding: 12px 32px;
|
|
border-radius: 999px;
|
|
color: var(--primary-color);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
box-shadow: var(--shadow-sm);
|
|
font-size: 15px;
|
|
}
|
|
|
|
.load-more:hover {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
border-color: var(--primary-color);
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.version-link {
|
|
font-size: 13px;
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px 10px;
|
|
border-radius: 999px;
|
|
background: rgba(79, 70, 229, 0.1);
|
|
transition: all 0.2s;
|
|
margin-left: auto;
|
|
}
|
|
.version-link:hover {
|
|
background: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.loading-more {
|
|
text-align: center;
|
|
padding: 30px;
|
|
color: var(--text-secondary);
|
|
display: none;
|
|
}
|
|
.loading-more .spinner {
|
|
width: 30px; height: 30px; border: 3px solid var(--border-color);
|
|
border-top-color: var(--primary-color); border-radius: 50%;
|
|
animation: spin 1s linear infinite; margin: 0 auto 10px;
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 60px;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
padding-top: 40px;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
.footer a {
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
margin: 0 8px;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.footer a:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<header>
|
|
<h1>
|
|
<span class="icon">🚀</span>
|
|
TrueGrowth 版本日志
|
|
</h1>
|
|
<p class="subtitle">回顾 TrueGrowth AI应用平台与 canvas workspace 的演进</p>
|
|
</header>
|
|
|
|
<div id="versionList" class="timeline">
|
|
<div class="loading">
|
|
<div class="spinner"></div>
|
|
<p>正在加载版本日志...</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="loading-sentinel" class="loading-more">
|
|
<div class="spinner"></div>
|
|
<p>加载更多...</p>
|
|
</div>
|
|
|
|
<footer class="footer">
|
|
<p>
|
|
<a href="/" target="_blank">工作台</a>
|
|
</p>
|
|
<p style="margin-top: 8px; font-size: 12px; opacity: 0.6;">© <span id="copyright-year">2024</span> TrueGrowth Team. All rights reserved.</p>
|
|
</footer>
|
|
</div>
|
|
<script>
|
|
function groupByMinor(versions) {
|
|
const groups = {};
|
|
for (const v of versions) {
|
|
const parts = v.version.split('.');
|
|
const key = parts[0] + '.' + parts[1]; // e.g., "0.6"
|
|
if (!groups[key]) groups[key] = [];
|
|
groups[key].push(v);
|
|
}
|
|
return groups;
|
|
}
|
|
|
|
function renderChangeDetails(changelog) {
|
|
if (!changelog || !changelog.changes) return '';
|
|
const categories = [
|
|
{ key: 'features', emoji: '✨', label: '新功能', color: '#10b981' },
|
|
{ key: 'fixes', emoji: '🐛', label: '问题修复', color: '#ef4444' },
|
|
{ key: 'improvements', emoji: '⚡', label: '体验优化', color: '#2563eb' },
|
|
];
|
|
|
|
let html = '';
|
|
for (const cat of categories) {
|
|
const items = changelog.changes[cat.key];
|
|
if (!items || items.length === 0) continue;
|
|
|
|
html += `<div class="change-category">
|
|
<div class="category-header" style="color: ${cat.color}">
|
|
<span class="category-icon">${cat.emoji}</span>
|
|
${cat.label}
|
|
</div>
|
|
<ul class="change-list">
|
|
${items.map(item => `<li>${item}</li>`).join('')}
|
|
</ul>
|
|
</div>`;
|
|
}
|
|
return html;
|
|
}
|
|
|
|
function toggleDetails(cardId) {
|
|
var details = document.getElementById('details-' + cardId);
|
|
var icon = document.getElementById('icon-' + cardId);
|
|
if (!details) return;
|
|
|
|
details.classList.toggle('open');
|
|
if (icon) icon.classList.toggle('expanded');
|
|
}
|
|
|
|
var PAGE_SIZE = 20;
|
|
var allVersions = [];
|
|
var currentDisplayCount = 0;
|
|
|
|
function renderVersionList(versions) {
|
|
var container = document.getElementById('versionList');
|
|
|
|
// If it's the first load (container has loading class), clear it
|
|
if (container.querySelector('.loading')) {
|
|
container.innerHTML = '';
|
|
} else {
|
|
// Remove existing load-more button if any
|
|
const existingBtn = container.querySelector('.load-more-container');
|
|
if (existingBtn) existingBtn.remove();
|
|
}
|
|
|
|
var groups = groupByMinor(versions);
|
|
var isFirst = currentDisplayCount === 0;
|
|
var html = '';
|
|
|
|
for (var groupKey in groups) {
|
|
var groupVersions = groups[groupKey];
|
|
|
|
// Only add group label if this is a new group or we are rendering from scratch
|
|
// But here we are appending, so we need to be careful.
|
|
// For simplicity, we re-render everything for now or just append.
|
|
// Let's re-render everything to be safe with the grouping logic.
|
|
}
|
|
|
|
// Re-implementing logic: we will just regenerate the whole HTML for simplicity
|
|
html = '';
|
|
|
|
for (var groupKey in groups) {
|
|
var groupVersions = groups[groupKey];
|
|
html += `<div class="version-group">
|
|
<div class="group-label">v${groupKey}.x</div>`;
|
|
|
|
for (var i = 0; i < groupVersions.length; i++) {
|
|
var entry = groupVersions[i];
|
|
var hasDetails = entry.changes && Object.values(entry.changes).some(function(a) { return a && a.length > 0; });
|
|
var cardId = entry.version.replace(/\./g, '-');
|
|
|
|
var tagClass = 'patch';
|
|
var tagText = '更新';
|
|
if (entry.type === 'major') { tagClass = 'major'; tagText = '大版本'; }
|
|
else if (entry.type === 'minor') { tagClass = 'minor'; tagText = '新功能'; }
|
|
|
|
var dateStr = entry.date || '';
|
|
var highlights = entry.highlights || '';
|
|
var detailsHtml = hasDetails ? renderChangeDetails(entry) : '';
|
|
var defaultOpen = isFirst && hasDetails;
|
|
|
|
html += `
|
|
<div class="version-item">
|
|
<div class="version-dot"></div>
|
|
<div class="version-card" onclick="${hasDetails ? `toggleDetails('${cardId}')` : ''}">
|
|
<div class="version-header">
|
|
<div class="version-info">
|
|
<div class="version-title-row">
|
|
<span class="version-number">v${entry.version}</span>
|
|
<span class="version-tag ${tagClass}">${tagText}</span>
|
|
${dateStr ? `<span class="version-date">· ${dateStr}</span>` : ''}
|
|
<a href="/releases/${entry.version}/" target="_blank" class="version-link" onclick="event.stopPropagation()">
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
|
|
<polyline points="15 3 21 3 21 9"></polyline>
|
|
<line x1="10" y1="14" x2="21" y2="3"></line>
|
|
</svg>
|
|
进入版本
|
|
</a>
|
|
</div>
|
|
${highlights ? `<div class="version-highlights">${highlights}</div>` : ''}
|
|
</div>
|
|
${hasDetails ? `
|
|
<svg id="icon-${cardId}" class="expand-icon ${defaultOpen ? 'expanded' : ''}" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
</svg>` : ''}
|
|
</div>
|
|
${hasDetails ? `
|
|
<div id="details-${cardId}" class="version-details ${defaultOpen ? 'open' : ''}" onclick="event.stopPropagation()">
|
|
<div class="version-details-inner">
|
|
${detailsHtml}
|
|
</div>
|
|
</div>` : ''}
|
|
</div>
|
|
</div>`;
|
|
|
|
isFirst = false;
|
|
}
|
|
html += '</div>';
|
|
}
|
|
|
|
container.innerHTML = html;
|
|
|
|
var sentinel = document.getElementById('loading-sentinel');
|
|
if (sentinel) {
|
|
sentinel.style.display = (versions.length < allVersions.length) ? 'block' : 'none';
|
|
}
|
|
}
|
|
|
|
function setupInfiniteScroll() {
|
|
var sentinel = document.getElementById('loading-sentinel');
|
|
if (!sentinel) return;
|
|
|
|
var observer = new IntersectionObserver(function(entries) {
|
|
if (entries[0].isIntersecting && currentDisplayCount < allVersions.length) {
|
|
currentDisplayCount += PAGE_SIZE;
|
|
renderVersionList(allVersions.slice(0, currentDisplayCount));
|
|
}
|
|
}, { rootMargin: '200px' });
|
|
|
|
observer.observe(sentinel);
|
|
}
|
|
|
|
async function init() {
|
|
try {
|
|
var response = await fetch('./changelog.json', { cache: 'no-cache' });
|
|
if (!response.ok) throw new Error('Failed to fetch changelog');
|
|
var data = await response.json();
|
|
allVersions = data.versions || [];
|
|
currentDisplayCount = PAGE_SIZE;
|
|
renderVersionList(allVersions.slice(0, currentDisplayCount));
|
|
setupInfiniteScroll();
|
|
} catch (error) {
|
|
console.error(error);
|
|
document.getElementById('versionList').innerHTML =
|
|
'<div class="error"><h3>无法加载版本日志</h3><p>请检查网络连接或稍后重试</p></div>';
|
|
}
|
|
}
|
|
|
|
// Update copyright year
|
|
document.getElementById('copyright-year').textContent = new Date().getFullYear();
|
|
|
|
init();
|
|
</script>
|
|
</body>
|
|
</html>
|