Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mihkel Putrinš
panustaja
Commits
5055700e
Commit
5055700e
authored
Nov 12, 2015
by
Mihkel Putrinš
Browse files
Merge branch 'test'
parents
86d1afb0
45abb5d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
code/app.js
View file @
5055700e
...
...
@@ -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
)
...
...
@@ -57,8 +58,8 @@ app.on('ready', function() {
mainWindow
.
center
()
var
view_path
=
path
.
join
(
app
.
getAppPath
(),
'
code
'
,
'
panu_view.html
'
)
mainWindow
.
webContents
.
loadUrl
(
'
file://
'
+
view_path
)
mainWindow
.
webContents
.
openDevTools
(
true
)
if
(
IS_DEV
)
{
mainWindow
.
webContents
.
openDevTools
(
true
)
}
windows
[
'
authWindow
'
].
close
()
delete
windows
[
'
authWindow
'
]
...
...
code/panu.js
View file @
5055700e
...
...
@@ -22,7 +22,10 @@ var user_data = {}
var
data
=
ipc
.
sendSync
(
'
getUser
'
,
null
)
var
initialize
=
function
initialize
()
{
<<<<<<<
HEAD
:
code
/
main
.
js
=======
// console.log('user_data: ' + data)
>>>>>>>
master
:
code
/
panu
.
js
if
(
!
data
)
{
data
=
JSON
.
parse
(
clipboard
.
readText
())
clipboard
.
clear
()
...
...
code/test.jade
0 → 100644
View file @
5055700e
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')
test.js
0 → 100644
View file @
5055700e
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()
// })
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment