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();
}