Commit 5055700e authored by Mihkel Putrinš's avatar Mihkel Putrinš

Merge branch 'test'

parents 86d1afb0 45abb5d6
...@@ -29,6 +29,7 @@ app.on('ready', function() { ...@@ -29,6 +29,7 @@ app.on('ready', function() {
"partition": "persist:panustaja (build " + (pjson.build) + ")", "partition": "persist:panustaja (build " + (pjson.build) + ")",
} }
windows['authWindow'] = new BrowserWindow({ width: 900, height: 600, show: true, "web-preferences": web_preferences }) 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' var title = pjson.name + ' v.' + pjson.version + (pjson.version.indexOf('-') > -1 ? pjson.build : '') + ' | Logi sisse'
windows['authWindow'].center() windows['authWindow'].center()
windows['authWindow'].setTitle(title) windows['authWindow'].setTitle(title)
...@@ -57,8 +58,8 @@ app.on('ready', function() { ...@@ -57,8 +58,8 @@ app.on('ready', function() {
mainWindow.center() mainWindow.center()
var view_path = path.join(app.getAppPath(), 'code', 'panu_view.html') var view_path = path.join(app.getAppPath(), 'code', 'panu_view.html')
mainWindow.webContents.loadUrl('file://' + view_path) mainWindow.webContents.loadUrl('file://' + view_path)
mainWindow.webContents.openDevTools(true)
if (IS_DEV) { if (IS_DEV) {
mainWindow.webContents.openDevTools(true)
} }
windows['authWindow'].close() windows['authWindow'].close()
delete windows['authWindow'] delete windows['authWindow']
......
...@@ -22,7 +22,10 @@ var user_data = {} ...@@ -22,7 +22,10 @@ var user_data = {}
var data = ipc.sendSync('getUser', null) var data = ipc.sendSync('getUser', null)
var initialize = function initialize() { var initialize = function initialize() {
<<<<<<< HEAD:code/main.js
=======
// console.log('user_data: ' + data) // console.log('user_data: ' + data)
>>>>>>> master:code/panu.js
if (!data) { if (!data) {
data = JSON.parse(clipboard.readText()) data = JSON.parse(clipboard.readText())
clipboard.clear() clipboard.clear()
......
doctype html
html
head
meta(charset='utf-8')
link(rel='stylesheet', type='text/css', href='../style/style.css')
link(rel='icon' type='image/png', href='/favicon-96x96.png' sizes='96x96')
link(rel='shortcut icon', href='/favicon.ico')
body
iframe#login_frame(name='disable-x-frame-options' src='https://entu.keeleressursid.ee/api2/user/auth', width='600', height='600')
var app = require('app')
var op = require('object-path')
var path = require('path')
var fs = require('fs')
var ipc = require('ipc')
var j = require('electron-jade')({pretty: true}, {})
var BrowserWindow = require('browser-window')
var user_url = 'https://entu.keeleressursid.ee/api2/user'
var auth_url = user_url + '/auth'
console.log(auth_url)
app.on('ready', function() {
var home_path = app.getPath('home')
//
mainWindow = new BrowserWindow({ width: 900, height: 600, show: true })
// var title = pjson.name + ' v.' + pjson.version + (pjson.version.indexOf('-') > -1 ? pjson.build : '') + ' | Logi sisse'
var view_path = path.join(__dirname, 'code', 'views', 'test.jade')
mainWindow.webContents.loadUrl('file://' + view_path)
//
// mainWindow.center()
// mainWindow.setTitle(title)
// mainWindow.loadUrl(auth_url)
// mainWindow.webContents.on('did-get-response-details', function(e, s, new_url) {
})
//
// app.on('window-all-closed', function() {
// app.quit()
// })
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