mirror of
https://github.com/frappe/books.git
synced 2024-11-08 23:00:56 +00:00
upgrade electron to 8 and update vue cli electron builder
This commit is contained in:
parent
c3b1338039
commit
7c3af79ecc
@ -38,7 +38,8 @@
|
|||||||
"@vue/cli-service": "^4.1.0",
|
"@vue/cli-service": "^4.1.0",
|
||||||
"@vue/eslint-config-prettier": "^5.0.0",
|
"@vue/eslint-config-prettier": "^5.0.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"electron": "^7.0.0",
|
"electron": "^8.0.0",
|
||||||
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-notarize": "^0.2.1",
|
"electron-notarize": "^0.2.1",
|
||||||
"electron-updater": "^4.2.0",
|
"electron-updater": "^4.2.0",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^5.16.0",
|
||||||
@ -47,7 +48,7 @@
|
|||||||
"lint-staged": "^9.4.3",
|
"lint-staged": "^9.4.3",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "^1.19.1",
|
||||||
"raw-loader": "^4.0.0",
|
"raw-loader": "^4.0.0",
|
||||||
"vue-cli-plugin-electron-builder": "https://github.com/netchampfaris/vue-cli-plugin-electron-builder",
|
"vue-cli-plugin-electron-builder": "^2.0.0",
|
||||||
"vue-template-compiler": "^2.6.10"
|
"vue-template-compiler": "^2.6.10"
|
||||||
},
|
},
|
||||||
"gitHooks": {
|
"gitHooks": {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { app, protocol, BrowserWindow, ipcMain } from 'electron';
|
import { app, protocol, BrowserWindow, ipcMain } from 'electron';
|
||||||
import { autoUpdater } from 'electron-updater';
|
import { autoUpdater } from 'electron-updater';
|
||||||
|
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
|
||||||
import {
|
import {
|
||||||
createProtocol
|
createProtocol
|
||||||
// installVueDevtools
|
// installVueDevtools
|
||||||
@ -34,7 +35,7 @@ function createWindow() {
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
|
||||||
},
|
},
|
||||||
frame: isLinux,
|
frame: isLinux,
|
||||||
resizable: true
|
resizable: true
|
||||||
@ -67,7 +68,7 @@ function createSettingsWindow(tab = 'General') {
|
|||||||
height: 577,
|
height: 577,
|
||||||
backgroundColor: theme.backgroundColor.gray['200'],
|
backgroundColor: theme.backgroundColor.gray['200'],
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
|
||||||
},
|
},
|
||||||
resizable: false
|
resizable: false
|
||||||
});
|
});
|
||||||
@ -118,11 +119,11 @@ app.on('ready', async () => {
|
|||||||
// Electron will not launch with Devtools extensions installed on Windows 10 with dark mode
|
// Electron will not launch with Devtools extensions installed on Windows 10 with dark mode
|
||||||
// If you are not using Windows 10 dark mode, you may uncomment these lines
|
// If you are not using Windows 10 dark mode, you may uncomment these lines
|
||||||
// In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines
|
// In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines
|
||||||
// try {
|
try {
|
||||||
// await installVueDevtools();
|
await installExtension(VUEJS_DEVTOOLS);
|
||||||
// } catch (e) {
|
} catch (e) {
|
||||||
// console.error('Vue Devtools failed to install:', e.toString());
|
console.error('Vue Devtools failed to install:', e.toString());
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
createWindow();
|
createWindow();
|
||||||
});
|
});
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
|
|
||||||
renderChart(res) {
|
renderChart(res) {
|
||||||
let totalRow = res.rows[res.rows.length - 1];
|
let totalRow = res.rows[res.rows.length - 1];
|
||||||
const chart = new Chart(this.$refs['profit-and-loss'], {
|
new Chart(this.$refs['profit-and-loss'], {
|
||||||
title: '',
|
title: '',
|
||||||
animate: false,
|
animate: false,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import frappe from 'frappejs';
|
import frappe from 'frappejs';
|
||||||
import Observable from 'frappejs/utils/observable';
|
// import Observable from 'frappejs/utils/observable';
|
||||||
import PageHeader from '@/components/PageHeader';
|
import PageHeader from '@/components/PageHeader';
|
||||||
import Button from '@/components/Button';
|
import Button from '@/components/Button';
|
||||||
import SearchBar from '@/components/SearchBar';
|
import SearchBar from '@/components/SearchBar';
|
||||||
import List from './List';
|
import List from './List';
|
||||||
import listConfigs from './listConfig';
|
import listConfigs from './listConfig';
|
||||||
import Icon from '@/components/Icon';
|
// import Icon from '@/components/Icon';
|
||||||
import FilterDropdown from '@/components/FilterDropdown';
|
import FilterDropdown from '@/components/FilterDropdown';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -43,7 +43,7 @@ export default {
|
|||||||
List,
|
List,
|
||||||
Button,
|
Button,
|
||||||
SearchBar,
|
SearchBar,
|
||||||
Icon,
|
// Icon,
|
||||||
FilterDropdown
|
FilterDropdown
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
|
@ -211,7 +211,7 @@ export function makePDF(html, destination) {
|
|||||||
height: 842,
|
height: 842,
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@ const path = require('path');
|
|||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
pluginOptions: {
|
||||||
|
electronBuilder: {
|
||||||
|
nodeIntegration: true
|
||||||
|
}
|
||||||
|
},
|
||||||
pages: {
|
pages: {
|
||||||
index: {
|
index: {
|
||||||
entry: 'src/main.js',
|
entry: 'src/main.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user