-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
237 lines (214 loc) · 8.82 KB
/
index.html
File metadata and controls
237 lines (214 loc) · 8.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Disguise Release Notes</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: #f5f5f5; color: #222; line-height: 1.5;
}
.container { max-width: 1400px; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.controls {
display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
margin-bottom: 1rem;
}
.controls input, .controls select {
padding: 0.4rem 0.6rem; border: 1px solid #ccc; border-radius: 4px;
font-size: 0.9rem; background: #fff;
}
.controls input { flex: 1 1 250px; min-width: 200px; }
.controls select { min-width: 140px; }
.status { font-size: 0.85rem; color: #666; margin-left: auto; white-space: nowrap; }
.version-group {
background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.1);
margin-bottom: 1rem; overflow: hidden;
}
.version-header {
background: #2c3e50; color: #fff; padding: 0.6rem 0.8rem;
display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem;
cursor: pointer;
}
.version-header:hover { background: #34495e; }
.version-header a { color: #fff; text-decoration: none; }
.version-header a:hover { text-decoration: underline; }
.version-name { font-weight: 700; font-size: 1rem; }
.version-meta { font-size: 0.8rem; opacity: 0.85; }
.version-meta span { margin-right: 1rem; }
.version-group table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.version-group th {
background: #3d5266; color: #fff; padding: 0.5rem 0.8rem;
text-align: left; font-weight: 600; font-size: 0.8rem;
text-transform: uppercase; letter-spacing: 0.03em;
}
.version-group td { padding: 0.5rem 0.8rem; border-bottom: 1px solid #e4e4e4; vertical-align: top; }
.version-group tbody tr { cursor: pointer; }
.version-group tbody tr:hover td { background: #e3edfa; }
.version-group tbody tr:last-child td { border-bottom: none; }
.col-category { width: 130px; }
.col-dsof { width: 130px; font-family: monospace; font-size: 0.82rem; }
.no-changes { padding: 0.6rem 0.8rem; font-size: 0.85rem; color: #888; font-style: italic; }
mark { background: #fff3a8; padding: 0 1px; border-radius: 2px; }
.loading { text-align: center; padding: 3rem; color: #999; }
.error { text-align: center; padding: 3rem; color: #c0392b; }
@media (max-width: 700px) {
.controls { flex-direction: column; }
.controls input, .controls select { width: 100%; }
.status { margin-left: 0; }
.version-header { flex-direction: column; gap: 0.2rem; }
td, th { padding: 0.4rem; font-size: 0.8rem; }
}
</style>
</head>
<body>
<div class="container">
<h1>Disguise Designer Release Notes</h1>
<p style="font-size:0.82rem;color:#888;margin-bottom:0.75rem;">This is an unofficial aggregation. Changes are extracted using AI and may be inaccurate, missing, or miscategorised. Always refer to the <a href="https://help.disguise.one/designer/release-notes/release-notes" style="color:#888;">official release notes</a> for authoritative details.</p>
<div class="controls">
<input type="text" id="search" placeholder="Search across all columns...">
<select id="versionFilter"><option value="">All Versions</option></select>
<select id="categoryFilter"><option value="">All Categories</option></select>
<span class="status" id="status"></span>
</div>
<div id="groups"></div>
<div class="loading" id="loading">Loading release data...</div>
<div class="error" id="error" hidden></div>
</div>
<script>
(function () {
let releases = [];
let sortCol = "category";
let sortAsc = true;
const groupsEl = document.getElementById("groups");
const searchEl = document.getElementById("search");
const versionEl = document.getElementById("versionFilter");
const categoryEl = document.getElementById("categoryFilter");
const statusEl = document.getElementById("status");
const loadingEl = document.getElementById("loading");
const errorEl = document.getElementById("error");
function parseVersion(v) {
const m = v.match(/r?(\d+(?:\.\d+)*)/i);
if (!m) return [0];
return m[1].split(".").map(Number);
}
function cmpVersion(a, b) {
const pa = parseVersion(a), pb = parseVersion(b);
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
const na = pa[i] || 0, nb = pb[i] || 0;
if (na !== nb) return na - nb;
}
return 0;
}
function applyFilters() {
const q = searchEl.value.toLowerCase();
const vf = versionEl.value;
const cf = categoryEl.value;
let totalChanges = 0;
let shownChanges = 0;
const parts = [];
for (const rel of releases) {
totalChanges += rel.changes.length;
if (vf && rel.version !== vf) continue;
const matchedChanges = rel.changes.filter(c => {
if (cf && c.category !== cf) return false;
if (q) {
const hay = `${rel.version} ${c.category} ${c.dsof} ${c.description}`.toLowerCase();
if (!hay.includes(q)) return false;
}
return true;
});
// If searching/filtering by category, skip versions with no matching changes
if ((q || cf) && matchedChanges.length === 0) continue;
shownChanges += matchedChanges.length;
parts.push('<div class="version-group">');
parts.push('<div class="version-header" data-url="', esc(rel.url || ''), '">');
parts.push('<span class="version-name">', esc(rel.version), '</span>');
parts.push('<span class="version-meta">');
if (rel.released) parts.push('<span>Released: ', esc(rel.released), '</span>');
if (rel.build) parts.push('<span>Build: ', esc(rel.build), '</span>');
if (rel.starter_build) parts.push('<span>Starter: ', esc(rel.starter_build), '</span>');
parts.push('</span>');
parts.push('</div>');
if (matchedChanges.length > 0) {
parts.push('<table><thead><tr>');
parts.push('<th class="col-category">Category</th>');
parts.push('<th class="col-dsof">DSOF</th>');
parts.push('<th>Description</th>');
parts.push('</tr></thead><tbody>');
for (const c of matchedChanges) {
parts.push(
'<tr data-url="', esc(rel.url || ''), '">',
'<td>', highlight(c.category, q),
'</td><td>', highlight(c.dsof, q),
'</td><td>', highlight(c.description, q),
'</td></tr>'
);
}
parts.push('</tbody></table>');
} else {
parts.push('<div class="no-changes">No documented changes for this release.</div>');
}
parts.push('</div>');
}
statusEl.textContent = `${shownChanges} changes across ${releases.length} releases`;
groupsEl.innerHTML = parts.join("");
}
function esc(s) {
if (!s) return "";
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
}
function highlight(s, q) {
if (!q || !s) return esc(s);
const escaped = esc(s);
const qEsc = esc(q).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
return escaped.replace(new RegExp(qEsc, "gi"), m => `<mark>${m}</mark>`);
}
function populateFilters() {
const versions = releases.map(r => r.version).filter(Boolean);
for (const v of versions) {
const opt = document.createElement("option");
opt.value = v; opt.textContent = v;
versionEl.appendChild(opt);
}
const categories = [...new Set(releases.flatMap(r => r.changes.map(c => c.category)))].filter(Boolean).sort();
for (const c of categories) {
const opt = document.createElement("option");
opt.value = c; opt.textContent = c;
categoryEl.appendChild(opt);
}
}
// Event listeners
searchEl.addEventListener("input", applyFilters);
versionEl.addEventListener("change", applyFilters);
categoryEl.addEventListener("change", applyFilters);
groupsEl.addEventListener("click", (e) => {
const header = e.target.closest(".version-header[data-url]");
if (header && header.dataset.url) {
window.open(header.dataset.url, "_blank");
return;
}
const tr = e.target.closest("tr[data-url]");
if (tr && tr.dataset.url) window.open(tr.dataset.url, "_blank");
});
// Load data
fetch("data/releases.json")
.then(r => { if (!r.ok) throw new Error(`HTTP ${r.status}`); return r.json(); })
.then(data => {
loadingEl.hidden = true;
// Data is already sorted newest-first in releases.json; preserve that order
releases = data;
populateFilters();
applyFilters();
})
.catch(err => {
loadingEl.hidden = true;
errorEl.hidden = false;
errorEl.textContent = `Failed to load data: ${err.message}`;
});
})();
</script>
</body>
</html>