Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump versions and background.js changes to get books to build. #216

Merged
merged 8 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ yarn link
yarn link frappejs
```

### FAQ

1. Launching electron and nothing displays
https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/24#issuecomment-770165389
```
sudo chown root node_modules/electron/dist/chrome-sandbox && sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
```

## License

[GNU Affero General Public License v3.0](LICENSE)
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"@popperjs/core": "^2.0.3",
"core-js": "^3.4.3",
"electron-store": "^5.1.0",
"frappe-charts": "^1.3.0",
"frappejs": "https://github.com/frappe/frappejs",
"knex": "^0.20.4",
"frappe-charts": "1.6.1",
"knex": "^0.95.11",
"lodash": "^4.17.15",
"luxon": "^1.21.3",
"portal-vue": "^2.1.6",
Expand All @@ -38,7 +38,8 @@
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"electron": "^6.0.0",
"electron": "^8.0.0",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^0.2.1",
"electron-updater": "^4.2.0",
"eslint": "^5.16.0",
Expand All @@ -47,13 +48,16 @@
"lint-staged": "^9.4.3",
"prettier": "^1.19.1",
"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"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,vue}": "vue-cli-service lint"
},
"engines": {
"node": ">=16.4.0"
}
}
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<script>
import './styles/index.css';
import 'frappe-charts/dist/frappe-charts.min.css';
// import 'frappe-charts/dist/frappe-charts.min.css';
import frappe from 'frappejs';
import Desk from './pages/Desk';
import SetupWizard from './pages/SetupWizard/SetupWizard';
Expand Down
11 changes: 6 additions & 5 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import { app, protocol, BrowserWindow, ipcMain } from 'electron';
import { autoUpdater } from 'electron-updater';
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer';
import {
createProtocol,
installVueDevtools
createProtocol
// installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib';
import theme from '@/theme';
import { getMainWindowSize } from './screenSize';
Expand Down Expand Up @@ -34,7 +35,7 @@ function createWindow() {
width,
height,
webPreferences: {
nodeIntegration: true
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
},
frame: isLinux,
resizable: true
Expand Down Expand Up @@ -67,7 +68,7 @@ function createSettingsWindow(tab = 'General') {
height: 577,
backgroundColor: theme.backgroundColor.gray['200'],
webPreferences: {
nodeIntegration: true
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
},
resizable: false
});
Expand Down Expand Up @@ -119,7 +120,7 @@ app.on('ready', async () => {
// 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
try {
await installVueDevtools();
await installExtension(VUEJS_DEVTOOLS);
} catch (e) {
console.error('Vue Devtools failed to install:', e.toString());
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dashboard/ProfitAndLoss.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {

renderChart(res) {
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: '',
animate: false,
type: 'bar',
Expand Down
6 changes: 3 additions & 3 deletions src/pages/ListView/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
</template>
<script>
import frappe from 'frappejs';
import Observable from 'frappejs/utils/observable';
// import Observable from 'frappejs/utils/observable';
import PageHeader from '@/components/PageHeader';
import Button from '@/components/Button';
import SearchBar from '@/components/SearchBar';
import List from './List';
import listConfigs from './listConfig';
import Icon from '@/components/Icon';
// import Icon from '@/components/Icon';
import FilterDropdown from '@/components/FilterDropdown';

export default {
Expand All @@ -43,7 +43,7 @@ export default {
List,
Button,
SearchBar,
Icon,
// Icon,
FilterDropdown
},
activated() {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export function makePDF(html, destination) {
height: 842,
show: false,
webPreferences: {
nodeIntegration: true
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
}
});

Expand Down
5 changes: 5 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ const path = require('path');
const webpack = require('webpack');

module.exports = {
pluginOptions: {
electronBuilder: {
nodeIntegration: true
}
},
pages: {
index: {
entry: 'src/main.js',
Expand Down
Loading