Skip to content

Commit 429390a

Browse files
Copilotdorkmo
andcommitted
Add PIN setup screenshot generation for client console
Co-authored-by: dorkmo <[email protected]>
1 parent 0c69cd7 commit 429390a

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

.github/workflows/html-render.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,30 @@ jobs:
243243
sample_json = json.dumps(sample_clients_data)
244244
html_content = html_content.replace('refreshData();', f'applyServerData({sample_json});')
245245
246-
# For client console, inject sample data
246+
# For client console, inject sample data and create TWO versions
247247
elif const_name == 'CLIENT_CONSOLE_HTML':
248248
sample_json = json.dumps(sample_clients_data)
249-
html_content = html_content.replace('refreshData();', f'applyServerData({sample_json}, "dev:client001");')
249+
250+
# Version 1: With PIN modal showing (PIN setup view)
251+
html_with_pin = html_content.replace('refreshData();', f'''
252+
// Inject sample data
253+
applyServerData({sample_json}, "dev:client001");
254+
255+
// Show PIN setup modal immediately for preview
256+
setTimeout(() => {{
257+
pinState.configured = false;
258+
pinState.value = '';
259+
showPinModal('setup');
260+
}}, 100);
261+
''')
262+
263+
# Version 2: Without PIN modal (unlocked view)
264+
html_unlocked = html_content.replace('refreshData();', f'''
265+
// Inject sample data and simulate unlocked state
266+
pinState.configured = true;
267+
pinState.value = '1234'; // Simulated unlocked state
268+
applyServerData({sample_json}, "dev:client001");
269+
''')
250270
251271
# For serial monitor, inject sample log data
252272
elif const_name == 'SERIAL_MONITOR_HTML':
@@ -284,11 +304,26 @@ jobs:
284304
# Just render the page without API calls
285305
html_content = html_content.replace('loadData();', '// Sample data mode - loadData() disabled for static preview')
286306

307+
# Write the primary version
287308
output_file = f'{output_dir}/{file_name}.html'
288309
with open(output_file, 'w', encoding='utf-8') as out:
289310
out.write(html_content)
290311

291312
print(f'Extracted {file_name} HTML: {len(html_content)} bytes')
313+
314+
# For CLIENT_CONSOLE_HTML, also write the additional versions
315+
if const_name == 'CLIENT_CONSOLE_HTML':
316+
# Write the PIN setup version
317+
output_file_pin = f'{output_dir}/client-console-pin-setup.html'
318+
with open(output_file_pin, 'w', encoding='utf-8') as out:
319+
out.write(html_with_pin)
320+
print(f'Extracted client-console-pin-setup HTML: {len(html_with_pin)} bytes')
321+
322+
# Write the unlocked version (overwrite the main one)
323+
output_file_unlocked = f'{output_dir}/{file_name}.html'
324+
with open(output_file_unlocked, 'w', encoding='utf-8') as out:
325+
out.write(html_unlocked)
326+
print(f'Extracted client-console (unlocked) HTML: {len(html_unlocked)} bytes')
292327
EOF
293328

294329
- name: Extract and render HTML for 112025 Viewer
@@ -577,8 +612,13 @@ jobs:
577612
578613
![Dashboard](screenshots/dashboard.png)
579614
615+
## Client Console - PIN Setup
616+
PIN setup modal shown on first access to secure the configuration interface.
617+
618+
![Client Console - PIN Setup](screenshots/client-console-pin-setup.png)
619+
580620
## Client Console
581-
Configuration management interface for remote clients with PIN-protected controls.
621+
Configuration management interface for remote clients with PIN-protected controls (unlocked view).
582622
583623
![Client Console](screenshots/client-console.png)
584624

0 commit comments

Comments
 (0)