adding dialog import
This commit is contained in:
parent
f5671a716d
commit
6c4f3678fb
|
@ -12,4 +12,4 @@ module.exports = async ({ dir }) => {
|
||||||
server.on("close", () => console.log("Server Closed"))
|
server.on("close", () => console.log("Server Closed"))
|
||||||
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
|
console.log(`Budibase running on ${JSON.stringify(server.address())}`)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { app, BrowserWindow, shell } = require("electron")
|
const { app, BrowserWindow, shell, dialog } = require("electron")
|
||||||
const { join } = require("path")
|
const { join } = require("path")
|
||||||
const isDev = require("electron-is-dev")
|
const isDev = require("electron-is-dev")
|
||||||
const { autoUpdater } = require("electron-updater")
|
const { autoUpdater } = require("electron-updater")
|
||||||
|
@ -72,10 +72,11 @@ autoUpdater.on("update-downloaded", (event, releaseNotes, releaseName) => {
|
||||||
buttons: ["Restart", "Later"],
|
buttons: ["Restart", "Later"],
|
||||||
title: "Budibase Update Available",
|
title: "Budibase Update Available",
|
||||||
message: process.platform === "win32" ? releaseNotes : releaseName,
|
message: process.platform === "win32" ? releaseNotes : releaseName,
|
||||||
detail: "A new version of the budibase builder has been downloaded. Restart the application to apply the updates."
|
detail:
|
||||||
|
"A new version of the budibase builder has been downloaded. Restart the application to apply the updates.",
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.showMessageBox(dialogOpts).then((returnValue) => {
|
dialog.showMessageBox(dialogOpts).then(returnValue => {
|
||||||
if (returnValue.response === 0) autoUpdater.quitAndInstall()
|
if (returnValue.response === 0) autoUpdater.quitAndInstall()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -85,5 +86,4 @@ autoUpdater.on("error", message => {
|
||||||
console.error(message)
|
console.error(message)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
startApp()
|
||||||
startApp();
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
const { resolve, join } = require("path")
|
const { resolve, join } = require("path")
|
||||||
const { homedir } = require("os");
|
const { homedir } = require("os")
|
||||||
const { app } = require("electron");
|
const { app } = require("electron")
|
||||||
|
|
||||||
async function runServer() {
|
async function runServer() {
|
||||||
const homeDir = app ? app.getPath("home") : homedir();
|
const homeDir = app ? app.getPath("home") : homedir()
|
||||||
|
|
||||||
const budibaseDir = join(homeDir, ".budibase")
|
const budibaseDir = join(homeDir, ".budibase")
|
||||||
process.env.BUDIBASE_DIR = budibaseDir
|
process.env.BUDIBASE_DIR = budibaseDir
|
||||||
|
|
||||||
require("dotenv").config({ path: resolve(budibaseDir, ".env") })
|
require("dotenv").config({ path: resolve(budibaseDir, ".env") })
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue