Add click handler for refresh button in portal
The refresh button in the top bar had no click handler attached. Now it reloads the current page data when clicked. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
802d48f049
commit
57ef40f737
1 changed files with 13 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ const Portal = {
|
|||
// Setup sidebar toggle
|
||||
this.setupSidebarToggle();
|
||||
|
||||
// Setup refresh button
|
||||
this.setupRefreshButton();
|
||||
|
||||
// Load initial data
|
||||
await this.loadDashboard();
|
||||
|
||||
|
|
@ -240,6 +243,16 @@ const Portal = {
|
|||
});
|
||||
},
|
||||
|
||||
// Setup refresh button
|
||||
setupRefreshButton() {
|
||||
const btn = document.getElementById('refreshBtn');
|
||||
if (btn) {
|
||||
btn.addEventListener('click', () => {
|
||||
this.loadPageData(this.currentPage);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// Handle hash change
|
||||
handleHashChange() {
|
||||
const hash = window.location.hash.slice(1) || 'dashboard';
|
||||
|
|
|
|||
Reference in a new issue