Add mode READMEs and move Bigscreen app
Add comprehensive READMEs for Bigscreen and Desktop modes, and relocate the Tauri frontend prototype into a new Bigscreen/ subdirectory. This moves package.json/package-lock, src, src-tauri, assets, views, styles and related files into Bigscreen/ to separate the controller-first shell from top-level docs. Update the root README.md to reframe the project as "NebulaOS", describe Bigscreen/Desktop modes, the vision, tech stack and development notes. This reorganizes the repo layout for clearer mode separation and documentation.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
export const createRouter = (outlet) => {
|
||||
const views = new Map();
|
||||
let current = null;
|
||||
|
||||
const register = (view) => {
|
||||
views.set(view.id, view);
|
||||
};
|
||||
|
||||
const navigate = (id) => {
|
||||
const view = views.get(id);
|
||||
if (!view) {
|
||||
throw new Error(`Unknown view: ${id}`);
|
||||
}
|
||||
|
||||
current = id;
|
||||
outlet.innerHTML = view.render();
|
||||
const nextView = outlet.querySelector(".view");
|
||||
if (nextView) {
|
||||
requestAnimationFrame(() => {
|
||||
nextView.classList.add("view-entered");
|
||||
});
|
||||
}
|
||||
view.mount?.(outlet);
|
||||
return view.getNavigationContract();
|
||||
};
|
||||
|
||||
const getCurrent = () => current;
|
||||
|
||||
return {
|
||||
register,
|
||||
navigate,
|
||||
getCurrent,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user