App Island
Clone an app into a separate space, freeze it while you are not using it, and remove it when you are done. This is a simulation of how Island-style apps keep a second copy of your apps apart from the first.
App Island
How this app works
The whole app is one JavaScript object plus a few small functions, the same ideas you used in Python with dictionaries and functions.
const island = {
notes: { frozen: false },
chat: { frozen: true }
};
function cloneApp(id) {
island[id] = { frozen: false };
render();
}
function toggleFreeze(id) {
island[id].frozen = !island[id].frozen;
render();
}
function removeApp(id) {
delete island[id];
render();
}
- island is like a Python dictionary. Each key is an app, each value says if it is frozen.
- render() redraws the screen from that data, so the screen always matches the object.
- Your changes are saved in the browser, so the apps stay after you close the page.