Skip to content

Commit 5af053f

Browse files
Update settings.js
1 parent aba0637 commit 5af053f

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

assets/gurapp/intl/settings/settings.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ function initializeSettingsApp() {
280280
licenseBtn.addEventListener('click', loadLicenses);
281281
}
282282

283+
const aboutBtn = document.querySelector('.nav-item[data-page="page-about"]');
284+
if (aboutBtn) {
285+
aboutBtn.addEventListener('click', updateVersionDisplay);
286+
}
287+
283288
backBtn.addEventListener('click', navigateBack);
284289

285290
document.querySelectorAll('.toggle-switch, .styled-select, .styled-slider, .color-picker, .form-input').forEach(control => {
@@ -452,6 +457,15 @@ function initializeSettingsApp() {
452457
});
453458
});
454459
}
460+
461+
function updateVersionDisplay() {
462+
const versionLabel = document.querySelector('#page-about .setting-info .setting-label');
463+
const parentVersion = window.parent.systemVersion;
464+
465+
if (versionLabel && parentVersion) {
466+
versionLabel.textContent = `Polygol ${parentVersion}`;
467+
}
468+
}
455469

456470
// --- Real-time Syncing ---
457471
window.addEventListener('message', (event) => {
@@ -648,12 +662,6 @@ function initializeSettingsApp() {
648662
bindEventListeners();
649663
updateHeader();
650664

651-
// Version Info
652-
const versionLabel = document.querySelector('#page-about .setting-info .setting-label');
653-
if (versionLabel && window.parent.systemVersion) {
654-
versionLabel.textContent = `Polygol ${window.parent.systemVersion}`;
655-
}
656-
657665
// Announce readiness to the parent, which will trigger the initial settings sync.
658666
if (window.parent) {
659667
window.parent.postMessage({ type: 'gurapp-ready' }, window.location.origin);

0 commit comments

Comments
 (0)