volumio / Volumio2-UI

Volumio2 Web Based User Interface
http://volumio.org
166 stars 164 forks source link

deploying custom theme on device #758

Open lbm-services opened 4 years ago

lbm-services commented 4 years ago

For deployment, you suggest copying the content of dist directory on Volumio2 device to volumio/http/www. "Classic" theme will be overwritten this way of course. Since you are only checking Volumio3 true/false in index.js , there is no other way, I guess.

// Checking if we use Volumio3 UI
if (fs.existsSync(volumio2UIFlagFile) || !fs.existsSync(volumio3UIFolderPath)) {
  process.env.VOLUMIO_3_UI = 'false';
} else {
  process.env.VOLUMIO_3_UI = 'true';
}

But it would be nice to choose the new theme by theme selector and go back if required. It would require to build a theme selector in the new theme as well, of course.

If a developer wants to preserve out-of-the-box themes, you have to rename theme folders back and forth.