diff --git a/oldshit/resources/functions/splash.js b/oldshit/resources/functions/splash.js index d6e482f1..4ce20375 100644 --- a/oldshit/resources/functions/splash.js +++ b/oldshit/resources/functions/splash.js @@ -20,7 +20,7 @@ const SplashScreen = { } }) this.win.show() - this.win.loadFile('./resources/splash/index.html') + this.win.loadFile('./resources/splash/index_old.html') this.win.on("closed", () => { this.win = null }) diff --git a/oldshit/resources/functions/wsapi.js b/oldshit/resources/functions/wsapi.js index f07bc528..44039ac6 100644 --- a/oldshit/resources/functions/wsapi.js +++ b/oldshit/resources/functions/wsapi.js @@ -310,7 +310,7 @@ const wsapi = { const webRemotePath = path.join(__dirname, '../web-remote'); webapp.use(express.static(webRemotePath)); webapp.get('/', function (req, res) { - res.sendFile(path.join(webRemotePath, 'index.html')); + res.sendFile(path.join(webRemotePath, 'index_old.html')); }); webapp.listen(webRemotePort, function () { console.log(`Web Remote listening on port ${webRemotePort}`); diff --git a/package.json b/package.json index bcdc65dd..dfad6ad3 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "castv2-client": "github:vapormusic/node-castv2-client", "chmodr": "^1.2.0", "discord-rpc": "^4.0.1", + "ejs": "^3.1.6", "electron-acrylic-window": "^0.5.9", "electron-log": "^4.4.1", "electron-store": "^8.0.1", diff --git a/resources/cider-ui-tests/assets/chevron-left.svg b/resources/cider-ui-tests/assets/chevron-left.svg new file mode 100644 index 00000000..d138b3fc --- /dev/null +++ b/resources/cider-ui-tests/assets/chevron-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/cider-ui-tests/index.html b/resources/cider-ui-tests/index_old.html similarity index 100% rename from resources/cider-ui-tests/index.html rename to resources/cider-ui-tests/index_old.html diff --git a/resources/cider-ui-tests/views/main.ejs b/resources/cider-ui-tests/views/main.ejs new file mode 100644 index 00000000..8b56cf83 --- /dev/null +++ b/resources/cider-ui-tests/views/main.ejs @@ -0,0 +1,778 @@ + + + + + + + + + + + + + + + + + Cider + + + + + + + + +
+
+
+
+
+
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + + +
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ Apple Music +
+ + + +
+ Library +
+ + + + +
+ Playlists +
+ +
+ +
+ + + + + +
+
+ +
+
Updating your library...
+
{{ library.songs.meta.progress }} / {{ library.songs.meta.total }}
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+ + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/functions/cider-base.js b/resources/functions/cider-base.js index 334c5366..b8d5ddb8 100644 --- a/resources/functions/cider-base.js +++ b/resources/functions/cider-base.js @@ -113,9 +113,13 @@ const CiderBase = { const webRemotePort = await getPort({port : 9000}); const webapp = express(); const webRemotePath = path.join(__dirname, '../cider-ui-tests/'); + webapp.set("views", path.join(webRemotePath, "views")); + webapp.set("view engine", "ejs"); + webapp.use(express.static(webRemotePath)); webapp.get('/', function (req, res) { - res.sendFile(path.join(webRemotePath, 'index.html')); + //res.sendFile(path.join(webRemotePath, 'index_old.html')); + res.render("main") }); webapp.listen(webRemotePort, function () { console.log(`Web Remote listening on port ${webRemotePort}`);