Skip to content

Commit

Permalink
Merge pull request #3 from ultracodez/dev
Browse files Browse the repository at this point in the history
Add Toasts, Review & Share UI, Automatic Updates, etc.
  • Loading branch information
ultracodez authored Aug 4, 2023
2 parents 9345a86 + a5839aa commit f3dcc06
Show file tree
Hide file tree
Showing 28 changed files with 2,507 additions and 11,337 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ A fork of MVL that cleans up the code and reworks the UI.
- Added "Server online/offline" indicator
- Added favoriting
- Added custom update directory
- Added swift Review & Share drawer
- Cleanup up code, especially Electron code, into separate files so it is more organized

## Screenshots

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/1dd6ca13-3e99-4947-9cb2-891ed2fc8e36)

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/70317fbe-07c9-4abd-85f8-35e9561b91ab)
![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/213f874a-18ce-45fc-9f69-4900f883c220)

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/7d54a06c-b896-4bca-bfc8-6ca8344067a4)

Expand All @@ -28,6 +29,12 @@ A fork of MVL that cleans up the code and reworks the UI.

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/6ae50ce2-cd0f-4400-97f2-ec8646abf303)

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/f7c31b72-0ae3-4ce1-b932-f130e5d157c3)

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/49490e42-a467-43cc-b97d-d87b4bcc3031)

![image](https://github.com/ultracodez/MetaVoiceLiveRework/assets/80412399/5dd93909-a22c-447b-9e90-233c9944a716)


## Setup

Expand Down
11 changes: 8 additions & 3 deletions electron/BrowserWindow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { BrowserWindow } = require("electron");
const path = require("path");

function createWindow(dev, port) {
function createWindow(dev, port, opt = {}) {
const win = new BrowserWindow({
show: false,
webPreferences: {
Expand All @@ -11,8 +11,13 @@ function createWindow(dev, port) {
win.maximize();
win.show();

console.log("Loading:", "http://localhost:" + port);
win.loadURL("http://localhost:" + port);
if (opt.mvmlUpdate && opt.mvmlUpdate.needsNewVersion) {
console.log("Loading:", "http://localhost:" + port + "/mvml-update");
win.loadURL("http://localhost:" + port + "/mvml-update");
} else {
console.log("Loading:", "http://localhost:" + port);
win.loadURL("http://localhost:" + port);
}

return win;
}
Expand Down
5 changes: 4 additions & 1 deletion electron/FrontendServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ var serveStatic = require("serve-static");

function setupFrontendServer(servePath) {
// Serve up public/ftp folder
var serve = serveStatic(servePath, { index: ["index.html", "index.htm"] });
var serve = serveStatic(servePath, {
index: ["index.html", "index.htm"],
extensions: ["html", "htm"],
});

// Create server
var server = http.createServer(function onRequest(req, res) {
Expand Down
2 changes: 1 addition & 1 deletion electron/IpcHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const path = require("path");
const fs = require("fs/promises");
const fsSync = require("fs");

function setupIpcHooks(app, window) {
function setupIpcHooks(app, window, opt = {}) {
ipcMain.handle("show-update-directory-picker", async (event) => {
return await dialog
.showOpenDialog(window, {
Expand Down
3 changes: 2 additions & 1 deletion electron/Lifecycle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function setupLifecycles(app, options) {
app.on("window-all-closed", () => {
if (options.backendServerKillCommand) options.backendServerKillCommand();
if (options && options.backendServerKillCommand)
options.backendServerKillCommand();
if (process.platform !== "darwin") app.quit();
});

Expand Down
Loading

0 comments on commit f3dcc06

Please sign in to comment.