Commit 9d777341 authored by Mihkel Putrinš's avatar Mihkel Putrinš

test

parent b02d83d1
......@@ -18,9 +18,9 @@ var pjson_path = path.join(__dirname, '..', 'package.json')
var pjson = require(pjson_path)
if (IS_DEV) {
pjson.build++
console.log('----==== ' + pjson.name + ' v.' + pjson.version + ' (build ' + (pjson.build) + ') ====----')
fs.writeFileSync(pjson_path, JSON.stringify(pjson, null, 4))
}
console.log('----==== ' + pjson.name + ' v.' + pjson.version + ' (build ' + (pjson.build) + ') ====----')
app.on('ready', function() {
USER_PATH = path.join(app.getPath('temp'), 'user.json')
......@@ -29,6 +29,7 @@ app.on('ready', function() {
"partition": "persist:panustaja (build " + (pjson.build) + ")",
}
windows['authWindow'] = new BrowserWindow({ width: 900, height: 600, show: true, "web-preferences": web_preferences })
windows['authWindow'].webContents.openDevTools(true)
var title = pjson.name + ' v.' + pjson.version + (pjson.version.indexOf('-') > -1 ? pjson.build : '') + ' | Logi sisse'
windows['authWindow'].center()
windows['authWindow'].setTitle(title)
......
......@@ -25,13 +25,12 @@ var user_data = {}
var data = ipc.sendSync('getUser', null)
var initialize = function initialize() {
console.log('user_data: ' + data)
if (!data) {
data = JSON.parse(clipboard.readText())
clipboard.clear()
ipc.send('setUser', data)
}
console.log('user_data: ' + JSON.stringify(data, null, 4))
// console.log('user_data: ' + JSON.stringify(data, null, 4))
if (op.get(data, 'result.user_id', false)) {
user_data['user_id'] = op.get(data, 'result.user_id')
user_data['session_key'] = op.get(data, 'result.session_key')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment