Skip to content

Commit

Permalink
Updated to electron 11
Browse files Browse the repository at this point in the history
  • Loading branch information
megastary committed Feb 24, 2021
1 parent 6a6b0cb commit 989e9ed
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 39 deletions.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lazy-admin",
"version": "0.6.4",
"version": "0.7.0",
"description": "GUI for PowerShell scripts to simplify day to day IT tasks.",
"productName": "Lazy Admin",
"cordovaId": "eu.houby-studio.lazy-admin",
Expand All @@ -13,11 +13,12 @@
"release": "quasar build --mode electron --publish onTagOrDraft"
},
"dependencies": {
"@electron/remote": "^1.0.4",
"@quasar/extras": "^1.9.17",
"axios": "^0.19.2",
"axios": "^0.21.1",
"csv": "^5.3.2",
"electron-log": "^4.1.1",
"electron-updater": "^4.3.1",
"electron-log": "^4.3.2",
"electron-updater": "^4.3.5",
"lodash": "^4.17.19",
"node-powershell": "^4.0.0",
"quasar": "^1.15.4",
Expand All @@ -34,7 +35,7 @@
"awesome-node-loader": "^1.1.1",
"babel-eslint": "^10.0.1",
"devtron": "^1.4.0",
"electron": "^7.0.0",
"electron": "^11.3.0",
"electron-builder": "^22.4.0",
"electron-debug": "^3.0.0",
"electron-devtools-installer": "^2.2.4",
Expand Down
6 changes: 5 additions & 1 deletion src-electron/main-process/electron-main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { app, BrowserWindow, nativeTheme } from 'electron'
require('@electron/remote/main').initialize()

try {
if (process.platform === 'win32' && nativeTheme.shouldUseDarkColors === true) {
Expand Down Expand Up @@ -28,7 +29,10 @@ function createWindow () {
webPreferences: {
// Change from /quasar.conf.js > electron > nodeIntegration;
// More info: https://quasar.dev/quasar-cli/developing-electron-apps/node-integration
nodeIntegration: QUASAR_NODE_INTEGRATION
nodeIntegration: QUASAR_NODE_INTEGRATION,

// Eanble @electron/remote
enableRemoteModule: true

// More info: /quasar-cli/developing-electron-apps/electron-preload-script
// preload: path.resolve(__dirname, 'electron-preload.js')
Expand Down
2 changes: 1 addition & 1 deletion src/boot/auto-updater.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Electron-updater
const autoUpdater = require('electron').remote.require('electron-updater').autoUpdater
const autoUpdater = require('@electron/remote').require('electron-updater').autoUpdater

// Register Auto Updater as prototype, to access it anywhere
// This allows for easy calling via this.$autoUpdater anywhere in Vue App
Expand Down
8 changes: 4 additions & 4 deletions src/layouts/FullLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
<script>
import { exportFile } from 'quasar'
import { mapGetters } from 'vuex'
const { app, globalShortcut } = require('electron').remote
const { app, globalShortcut } = require('@electron/remote')
const { shell } = require('electron')
const { transports } = require('electron-log')
Expand Down Expand Up @@ -707,17 +707,17 @@ export default {
debugOpenAppDataPath () {
console.log('DEBUG function: Openining Lazy Admin\'s AppData folder.')
shell.openItem(app.getPath('userData'))
shell.openPath(app.getPath('userData'))
},
debugOpenLog () {
console.log('DEBUG function: Opening electron log.')
shell.openItem(transports.file.getFile().path)
shell.openPath(transports.file.getFile().path)
},
debugOpenInstallPath () {
console.log('DEBUG function: Opening install location folder.')
shell.openItem(app.getAppPath().slice(0, (process.env.PROD ? -18 : 0)))
shell.openPath(app.getAppPath().slice(0, (process.env.PROD ? -18 : 0)))
},
debugUpdateMasterDefinition () {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/AboutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default {
...mapGetters('lazystore', ['getLanguage', 'getMenuEntries', 'getMasterDefinition', 'getUpdateInProgress', 'getUpdateProgress', 'getDefinitionsUpdateInProgress', 'getRestartRequired']),
lazyVersion: {
get () {
return require('electron').remote.app.getVersion()
return require('@electron/remote').app.getVersion()
}
},
masterDefinitionVersion: function () {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
},
methods: {
lazyVersion () {
let version = require('electron').remote.app.getVersion()
let version = require('@electron/remote').app.getVersion()
console.log(version)
}
}
Expand Down
50 changes: 24 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,11 @@
global-agent "^2.0.2"
global-tunnel-ng "^2.7.1"

"@electron/remote@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@electron/remote/-/remote-1.0.4.tgz#f1c8cf3560bab762b462bfae9991919cced8bc33"
integrity sha512-kguDJRhL3ZynHrkbX8Tr7xoAzGsNgh4eqXkycXb6cgXbOgehGqkBVe+MnjSVMXz3QJykerGKPy28gqcM7AFGYw==

"@hapi/[email protected]":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
Expand Down Expand Up @@ -2066,12 +2071,12 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==

axios@^0.19.2:
version "0.19.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27"
integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
axios@^0.21.1:
version "0.21.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
dependencies:
follow-redirects "1.5.10"
follow-redirects "^1.10.0"

babel-eslint@^10.0.1:
version "10.1.0"
Expand Down Expand Up @@ -3597,13 +3602,6 @@ [email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
dependencies:
ms "2.0.0"

debug@=3.1.0, debug@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
dependencies:
ms "2.0.0"

debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
version "3.2.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
Expand All @@ -3618,6 +3616,13 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.0:
dependencies:
ms "2.1.2"

debug@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
dependencies:
ms "2.0.0"

decamelize@^1.1.2, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
Expand Down Expand Up @@ -3999,7 +4004,7 @@ electron-localshortcut@^3.1.0:
keyboardevent-from-electron-accelerator "^2.0.0"
keyboardevents-areequal "^0.2.1"

electron-log@^4.1.1:
electron-log@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-4.3.2.tgz#213334c69f0498fac677a7a73eae4a61fb69949e"
integrity sha512-PJPWE8JDzQ137UlxX9K917nI8GTcwgiJpE2PMPXZo+I6C4AaZU+JWQ3lW5NjQ1Lg8Qk8qbze+Ly0yAiqhbmpeA==
Expand Down Expand Up @@ -4074,7 +4079,7 @@ electron-to-chromium@^1.3.649:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.673.tgz#b4f81c930b388f962b7eba20d0483299aaa40913"
integrity sha512-ms+QR2ckfrrpEAjXweLx6kNCbpAl66DcW//3BZD4BV5KhUgr0RZRce1ON/9J3QyA3JO28nzgb5Xv8DnPr05ILg==

electron-updater@^4.3.1:
electron-updater@^4.3.5:
version "4.3.5"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.3.5.tgz#4fb36f593a031c87ea07ee141c9f064d5deffb15"
integrity sha512-5jjN7ebvfj1cLI0VZMdCnJk6aC4bP+dy7ryBf21vArR0JzpRVk0OZHA2QBD+H5rm6ZSeDYHOY6+8PrMEqJ4wlQ==
Expand All @@ -4087,10 +4092,10 @@ electron-updater@^4.3.1:
lodash.isequal "^4.5.0"
semver "^7.3.2"

electron@^7.0.0:
version "7.3.3"
resolved "https://registry.yarnpkg.com/electron/-/electron-7.3.3.tgz#f61502a3d42d85adfecd8e37f98da449b591f8af"
integrity sha512-PrJEsuRiaAhTDHtbH3EM+RIne+nZ6ifGChUadmtmPqHUQ+rIhf4jSi2ZN768IgBDw4SidMJiCrvQRiuDha9+Ew==
electron@^11.3.0:
version "11.3.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-11.3.0.tgz#87e8528fd23ae53b0eeb3a738f1fe0a3ad27c2db"
integrity sha512-MhdS0gok3wZBTscLBbYrOhLaQybCSAfkupazbK1dMP5c+84eVMxJE/QGohiWQkzs0tVFIJsAHyN19YKPbelNrQ==
dependencies:
"@electron/get" "^1.0.1"
"@types/node" "^12.0.12"
Expand Down Expand Up @@ -4870,14 +4875,7 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

[email protected]:
version "1.5.10"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
dependencies:
debug "=3.1.0"

follow-redirects@^1.0.0:
follow-redirects@^1.0.0, follow-redirects@^1.10.0:
version "1.13.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147"
integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==
Expand Down

0 comments on commit 989e9ed

Please sign in to comment.