Skip to content

Commit 7a73019

Browse files
committed
Remove SPA mode toggle and update router initialization
1 parent 475d577 commit 7a73019

File tree

7 files changed

+1527
-94
lines changed

7 files changed

+1527
-94
lines changed

bin/generate-crypto-logos.sh

Lines changed: 0 additions & 63 deletions
This file was deleted.

public/js/main.js

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,8 @@ document.addEventListener('DOMContentLoaded', () => {
1818
* Initialize the application
1919
*/
2020
function initApp() {
21-
// Check if we're using SPA mode
22-
const useSPA = localStorage.getItem('use_spa') !== 'false';
23-
24-
if (useSPA) {
25-
// Initialize the router
26-
initRouter();
27-
} else {
28-
// Initialize components for non-SPA mode
29-
initComponents();
30-
}
21+
// Initialize the router for SPA mode
22+
initRouter();
3123
}
3224

3325
/**
@@ -37,8 +29,7 @@ function initRouter() {
3729
// Define routes
3830
const routes = {
3931
'/': {
40-
view: () => loadPage('/views/home.html'),
41-
afterRender: () => initComponents()
32+
view: () => loadPage('/views/home.html')
4233
},
4334
'/login': {
4435
view: () => loadPage('/views/login.html'),
@@ -49,8 +40,7 @@ function initRouter() {
4940
afterRender: () => initRegisterPage()
5041
},
5142
'/api-docs': {
52-
view: () => loadPage('/views/api-docs.html'),
53-
afterRender: () => initComponents()
43+
view: () => loadPage('/views/api-docs.html')
5444
},
5545
'/api-keys': {
5646
view: () => loadPage('/views/api-keys.html'),
@@ -129,21 +119,7 @@ async function loadPage(url) {
129119
}
130120
}
131121

132-
/**
133-
* Initialize components for non-SPA mode
134-
*/
135-
function initComponents() {
136-
// Add header and footer if they don't exist
137-
if (!document.querySelector('pf-header')) {
138-
const header = document.createElement('pf-header');
139-
document.body.insertBefore(header, document.body.firstChild);
140-
}
141-
142-
if (!document.querySelector('pf-footer')) {
143-
const footer = document.createElement('pf-footer');
144-
document.body.appendChild(footer);
145-
}
146-
}
122+
// No longer needed since we're using SPA mode exclusively
147123

148124
/**
149125
* Initialize login page
@@ -357,6 +333,5 @@ function initSubscriptionPage() {
357333
// Expose functions globally
358334
window.app = {
359335
initApp,
360-
initRouter,
361-
initComponents
336+
initRouter
362337
};

0 commit comments

Comments
 (0)