Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #93 from ecnordbund/dev
Browse files Browse the repository at this point in the history
Release 0.2.0
  • Loading branch information
ecnordbund authored Jul 22, 2018
2 parents 5546179 + 9886623 commit e6a5ec3
Show file tree
Hide file tree
Showing 48 changed files with 2,860 additions and 1,627 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
title: 'EC-Nordbund',
description: 'Hilfe und Dokumentation',
themeConfig: {
repo: 'ecnordbund/ec-verwaltung',
repo: 'ecnordbund/ec-verwaltungs-app',
docsDir: 'docs',
locales: {
'/': {
Expand Down Expand Up @@ -30,4 +30,4 @@ module.exports = {
lineNumbers: true
},
port: 8081
};
}
2 changes: 1 addition & 1 deletion electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ec-verwaltungs-app",
"version": "0.1.5",
"version": "0.2.0",
"description": "EC-Verwaltungs Application",
"keywords": [],
"homepage": "https://ec-nordbund.de",
Expand Down
10 changes: 2 additions & 8 deletions electron/src/main/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,15 @@ require('electron').app.once('ready', () => {
.default(installExtension.VUEJS_DEVTOOLS)
.then(() => {})
.catch(err => {
console.log(
'Unable to install `vue-devtools`: \n',
err
)
throw err
})

//Install ApolloDevtools
installExtension
.default(installExtension.APOLLO_DEVELOPER_TOOLS)
.then(() => {})
.catch(err => {
console.log(
'Unable to install `apollo-devtools`: \n',
err
)
throw err
})
})

Expand Down
26 changes: 23 additions & 3 deletions electron/src/main/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
//@ts-check

// Import Electron
const { app, BrowserWindow, Tray } = require('electron')

app.setAsDefaultProtocolClient('ec', process.execPath)

function handleProto(args) {
if (args.length > 1) {
const splitted = args[1].split('ec://')
if (splitted.length > 1) {
mainWindow.webContents.send(
'proto-set-route',
splitted[1]
)
}
}
}

// On Install do Stuff
if (require('electron-squirrel-startup')) {
app.quit()
}

//Single Instance
const isSecondInstance = app.makeSingleInstance(() => {
BrowserWindow.getAllWindows()[0].show()
})
const isSecondInstance = app.makeSingleInstance(
(args, wd) => {
BrowserWindow.getAllWindows()[0].show()
handleProto(args)
}
)

if (isSecondInstance) {
app.quit()
Expand Down Expand Up @@ -65,6 +84,7 @@ function createWindow() {
loadingWindow.setClosable(true)
loadingWindow.close()
mainWindow.maximize()
handleProto(process.argv)
})
mainWindow.on('closed', () => {
mainWindow = null
Expand Down
Loading

0 comments on commit e6a5ec3

Please sign in to comment.