Skip to content

Commit 3ffdb52

Browse files
authored
Fixes & tweaks to gh-boards generator
1 parent c0c8584 commit 3ffdb52

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

archive/web-tools/gh-boards/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ document.addEventListener('DOMContentLoaded', () => {
228228

229229
function toggleRepoInputs() {
230230
if (state.selectMethod === 'manual') {
231-
ui.limitGroup.classList.add('hidden');
232-
ui.manualReposGroup.classList.remove('hidden');
231+
if (ui.limitGroup) ui.limitGroup.classList.add('hidden');
232+
if (ui.manualReposGroup) ui.manualReposGroup.classList.remove('hidden');
233233
} else {
234-
ui.limitGroup.classList.remove('hidden');
235-
ui.manualReposGroup.classList.add('hidden');
234+
if (ui.limitGroup) ui.limitGroup.classList.remove('hidden');
235+
if (ui.manualReposGroup) ui.manualReposGroup.classList.add('hidden');
236236
}
237237
}
238238

@@ -635,7 +635,7 @@ document.addEventListener('DOMContentLoaded', () => {
635635
};
636636
img.onerror = () => {
637637
ui.svgPreview.classList.remove('loading');
638-
ui.svgPreview.innerHTML = '<div style="color:red">Failed to load preview. Ensure API is running.</div>';
638+
ui.svgPreview.innerHTML = '<div style="color:red">Failed to load preview. Make sure the values are correct.</div>';
639639
};
640640

641641
ui.svgPreview.appendChild(img);

archive/web-tools/gh-boards/index.html

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ <h2>3. Artifacts</h2>
6464
<div class="artifacts-list" id="artifacts-list">
6565
<!-- Dynamic artifacts will appear here -->
6666
</div>
67-
<div style="display: flex; gap: 0.75rem; margin-top: 0.5rem;">
68-
<button class="btn btn-secondary" id="add-artifact-btn" style="flex: 1;">+ Add Artifact</button>
69-
<button class="btn btn-secondary" id="import-btn" style="flex: 0 0 auto;">Import JSON</button>
70-
</div>
67+
<button class="btn btn-secondary" id="add-artifact-btn">+ Add Artifact</button>
7168
<input type="file" id="import-file-input" accept=".json" style="display: none;">
7269
</section>
7370

@@ -85,7 +82,7 @@ <h2>Live Preview</h2>
8582
style="margin-bottom: 1rem; padding: 1rem; background: rgba(0,0,0,0.2); border-radius: 8px;">
8683
<label
8784
style="font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 0.5rem;">Direct
88-
Link (for README)</label>
85+
link of the preview</label>
8986
<div style="display: flex; gap: 0.5rem;">
9087
<input type="text" id="direct-link-input" readonly
9188
style="flex: 1; padding: 0.5rem; border-radius: 4px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.3); color: var(--text-main); font-family: monospace;">
@@ -99,7 +96,13 @@ <h2>Live Preview</h2>
9996
<div class="placeholder-text">Preview will appear here</div>
10097
</div>
10198

102-
<h3>Manifest JSON</h3>
99+
<div class="preview-header">
100+
<h3>Manifest JSON</h3>
101+
<div class="actions">
102+
<button class="btn btn-primary" id="import-btn"
103+
style="background: #2ea44f;">Import JSON</button>
104+
</div>
105+
</div>
103106
<div style="position: relative;">
104107
<pre><code id="json-preview" class="language-json">...</code></pre>
105108
<div class="actions" style="position: absolute; top: 10px; right: 10px;">
@@ -111,17 +114,17 @@ <h3>Manifest JSON</h3>
111114
<div class="instructions">
112115
<h3>How it works</h3>
113116
<ol>
114-
<li><strong>Instant:</strong> Use the "Direct Link" above for immediate results (powered by
115-
Vercel).</li>
116-
<li><strong>Hourly:</strong> Click "Add to Hourly Updates" to let our GitHub Bot manage a
117-
persistent, high-performance copy in the repo.</li>
117+
<li><strong>Instant:</strong> Use the "Direct Link" above for an immediate preview. <u> Previews update only once every 24 hours.</u></li>
118+
<li><strong>Hourly:</strong> Click "Add to Hourly Updates" to let the GitHub Bot manage a
119+
persistent, hourly updated version of all your badges and boards.</li>
120+
<li><button class="btn btn-primary" type="button" style="background: #2ea44f;" onclick="location.href='/gh-boards/'">View all generated artifacts and use yours</button></li>
118121
</ol>
119122
</div>
120123
</section>
121124

122125
</div>
123126

124-
<!-- Import Modal (outside grid to avoid breaking layout) -->
127+
<!-- Import Modal -->
125128
<div class="import-modal-overlay hidden" id="import-modal">
126129
<div class="import-modal glass-panel">
127130
<h2>Import Configuration</h2>
@@ -138,4 +141,4 @@ <h2>Import Configuration</h2>
138141
</div>
139142
</div>
140143

141-
<script src="app.js"></script>
144+
<script src="app.js"></script>

0 commit comments

Comments
 (0)