Initial commit: Clean DSS implementation
Migrated from design-system-swarm with fresh git history.
Old project history preserved in /home/overbits/apps/design-system-swarm
Core components:
- MCP Server (Python FastAPI with mcp 1.23.1)
- Claude Plugin (agents, commands, skills, strategies, hooks, core)
- DSS Backend (dss-mvp1 - token translation, Figma sync)
- Admin UI (Node.js/React)
- Server (Node.js/Express)
- Storybook integration (dss-mvp1/.storybook)
Self-contained configuration:
- All paths relative or use DSS_BASE_PATH=/home/overbits/dss
- PYTHONPATH configured for dss-mvp1 and dss-claude-plugin
- .env file with all configuration
- Claude plugin uses ${CLAUDE_PLUGIN_ROOT} for portability
Migration completed: $(date)
🤖 Clean migration with full functionality preserved
This commit is contained in:
36
team-portal/src/js/core/router.js
Normal file
36
team-portal/src/js/core/router.js
Normal file
@@ -0,0 +1,36 @@
|
||||
// SPA Router using History API
|
||||
let routeHandler = null;
|
||||
|
||||
export function initRouter(handler) {
|
||||
routeHandler = handler;
|
||||
|
||||
// Handle browser back/forward
|
||||
window.addEventListener('popstate', () => {
|
||||
if (routeHandler) {
|
||||
routeHandler(window.location.pathname);
|
||||
}
|
||||
});
|
||||
|
||||
// Handle initial load
|
||||
const path = window.location.pathname;
|
||||
if (routeHandler && path !== '/') {
|
||||
routeHandler(path);
|
||||
}
|
||||
}
|
||||
|
||||
export function navigate(path) {
|
||||
if (window.location.pathname !== path) {
|
||||
window.history.pushState({}, '', path);
|
||||
if (routeHandler) {
|
||||
routeHandler(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getCurrentRoute() {
|
||||
return window.location.pathname;
|
||||
}
|
||||
|
||||
export function goBack() {
|
||||
window.history.back();
|
||||
}
|
||||
Reference in New Issue
Block a user