Production
This commit is contained in:
parent
0bee135572
commit
d101d57a5c
@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": []
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -27,6 +27,15 @@
|
||||
"directories": {
|
||||
"output": "build"
|
||||
},
|
||||
"asar": "true",
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "src/renderer/utils",
|
||||
"to": "workers",
|
||||
"filter": [
|
||||
"**/*"
|
||||
]
|
||||
}],
|
||||
"files": [
|
||||
"dist/electron/**/*"
|
||||
],
|
||||
|
@ -29,7 +29,11 @@ function createWindow () {
|
||||
width: 1000
|
||||
})
|
||||
mainWindow.loadURL(winURL)
|
||||
mainWindow.webContents.openDevTools()
|
||||
|
||||
mainWindow.onerror = function (message, source, lineno, colno, error) {
|
||||
console.error(error)
|
||||
}
|
||||
mainWindow.on('closed', () => {
|
||||
mainWindow = null
|
||||
})
|
||||
|
@ -102,7 +102,7 @@
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/check.js`
|
||||
: `file://${__dirname}/check.js`
|
||||
console.log('make a worker: ', path.resolve(__dirname, 'check.js'))
|
||||
console.log('make a check worker: ', path.resolve(__dirname, 'check.js'))
|
||||
|
||||
const worker = new Worker(winURL)
|
||||
console.log(fileUrl('src/renderer/utils/check.js'))
|
||||
|
@ -19,11 +19,13 @@
|
||||
components: {},
|
||||
props: [],
|
||||
created () {
|
||||
|
||||
console.log(LMap)
|
||||
console.log(LMarker)
|
||||
console.log(L)
|
||||
console.log(LEdit)
|
||||
console.log(L2)
|
||||
console.log('Created Editlayer')
|
||||
// console.log(LSymbol)
|
||||
},
|
||||
mounted () {
|
||||
|
@ -66,7 +66,7 @@
|
||||
this.scanning = true
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/worker.js`
|
||||
: `file://${__dirname}/worker.js`
|
||||
: `file://${process.resourcesPath}/workers/worker.js`
|
||||
console.log('make a worker: ', path.resolve(__dirname, 'worker.js'))
|
||||
|
||||
const worker = new Worker(winURL)
|
||||
@ -112,7 +112,7 @@
|
||||
this.scanning = true
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/worker.js`
|
||||
: `file://${__dirname}/worker.js`
|
||||
: `file://${process.resourcesPath}/workers/worker.js`
|
||||
console.log('make a worker: ', path.resolve(__dirname, 'worker.js'))
|
||||
|
||||
const worker = new Worker(winURL)
|
||||
@ -160,7 +160,7 @@
|
||||
this.scanning = true
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/worker.js`
|
||||
: `file://${__dirname}/worker.js`
|
||||
: `file://${process.resourcesPath}/workers/worker.js`
|
||||
console.log('make a worker: ', path.resolve(__dirname, 'worker.js'))
|
||||
|
||||
const worker = new Worker(winURL)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* eslint-disable */
|
||||
const DB_NAME = 'flightgear';
|
||||
const DB_VERSION = 2;
|
||||
const DB_VERSION = 3;
|
||||
let DB;
|
||||
|
||||
export default {
|
||||
@ -19,6 +19,7 @@ export default {
|
||||
|
||||
request.onsuccess = e => {
|
||||
DB = e.target.result;
|
||||
console.log('OPENED DB', DB);
|
||||
resolve(DB);
|
||||
};
|
||||
|
||||
|
@ -12,5 +12,5 @@ const debug = process.env.NODE_ENV !== 'production'
|
||||
export default new Vuex.Store({
|
||||
modules,
|
||||
strict: debug,
|
||||
plugins: debug ? [createLogger(), createPersistedState({paths: ['Settings']})] : [] // set logger only for development
|
||||
plugins: debug ? [createLogger(), createPersistedState({paths: ['Settings']})] : [createPersistedState({paths: ['Settings']})] // set logger only for development
|
||||
})
|
||||
|
@ -33,17 +33,25 @@ const actions = {
|
||||
await idb.deleteAirport(airport);
|
||||
},
|
||||
async getAirports(context) {
|
||||
context.commit(RESET_AIRPORTS);
|
||||
let airports = await idb.getAirports();
|
||||
context.commit(SET_AIRPORTS, airports
|
||||
.filter(point => typeof point.geometry.coordinates !== "undefined" )
|
||||
.filter(point => point.properties.flights > 0 ));
|
||||
},
|
||||
try {
|
||||
context.commit(RESET_AIRPORTS);
|
||||
let airports = await idb.getAirports();
|
||||
context.commit(SET_AIRPORTS, airports
|
||||
.filter(point => typeof point.geometry.coordinates !== "undefined" )
|
||||
.filter(point => point.properties.flights > 0 ));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
async getAirportsUnfiltered(context) {
|
||||
context.commit(RESET_AIRPORTS);
|
||||
let airports = await idb.getAirports();
|
||||
context.commit(SET_UNFILTERED_AIRPORTS, airports
|
||||
.filter(point => typeof point.geometry.coordinates !== "undefined" ));
|
||||
try {
|
||||
context.commit(RESET_AIRPORTS);
|
||||
let airports = await idb.getAirports();
|
||||
context.commit(SET_UNFILTERED_AIRPORTS, airports
|
||||
.filter(point => typeof point.geometry.coordinates !== "undefined" ));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
async saveAirport(context, airport) {
|
||||
await idb.saveAirport(airport);
|
||||
|
@ -8,6 +8,7 @@ const modules = {}
|
||||
|
||||
files.keys().forEach(key => {
|
||||
if (key === './index.js') return
|
||||
console.log('Vuex Module : ' + key.replace(/(\.\/|\.js)/g, ''))
|
||||
modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
|
||||
})
|
||||
|
||||
|
@ -8,7 +8,7 @@ async function initDB() {
|
||||
if (features == null) {
|
||||
console.log("Loading DB");
|
||||
console.log(this.indexedDB);
|
||||
var request = this.indexedDB.open("flightgear", 2);
|
||||
var request = this.indexedDB.open("flightgear", 3);
|
||||
request.onerror = function (event) {
|
||||
reject(event);
|
||||
};
|
||||
@ -26,7 +26,7 @@ async function initDB() {
|
||||
var objectStore = db.createObjectStore("airports", { keyPath: "properties.icao" });
|
||||
}
|
||||
if (event.oldVersion < 2) {
|
||||
// Version 1 is the first version of the database.
|
||||
// Version 2 is the first version of the database.
|
||||
var objectStore = event.target.transaction.objectStore("airports");
|
||||
var indexNames = objectStore.indexNames;
|
||||
var desiredKeyPathForMyIndex = "properties.icao";
|
||||
|
@ -64,6 +64,7 @@ async function scanGroundnetFiles(p, features) {
|
||||
}).catch(reason => {
|
||||
logger('info', "Crashed");
|
||||
logger('info', reason);
|
||||
this.postMessage('DONE');
|
||||
});
|
||||
|
||||
//walkDir(p, f => { readGroundnet(f, features) });
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
const winURL = process.env.NODE_ENV === 'development'
|
||||
? `http://localhost:9080/src/renderer/utils/`
|
||||
: `file://D:/GIT/flightgear-airports/src/renderer/utils/`
|
||||
: `file://${process.resourcesPath}/workers/`
|
||||
|
||||
var scanner = importScripts(`${winURL}scan.js`);
|
||||
var apt = importScripts(`${winURL}apt.js`);
|
||||
@ -9,7 +9,7 @@ var path = require('path');
|
||||
const fs = require('fs');
|
||||
const homedir = require('os').homedir();
|
||||
var airports = importScripts(`${winURL}airports.js`);
|
||||
importScripts('../txml/tXml.min.js');
|
||||
importScripts(`${winURL}txml/tXml.min.js`);
|
||||
|
||||
importScripts('logger.js');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user