Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
panustaja
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mihkel Putrinš
panustaja
Commits
b4f29ef1
Commit
b4f29ef1
authored
Nov 05, 2015
by
Mihkel Putrinš
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version number to auth window
parent
0f518d4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
.gitignore
.gitignore
+1
-0
code/app.js
code/app.js
+13
-5
package.json
package.json
+1
-1
No files found.
.gitignore
View file @
b4f29ef1
bin
node_modules
old
Panustaja*
code/app.js
View file @
b4f29ef1
...
...
@@ -16,18 +16,26 @@ var home_path = process.env.HOME ? process.env.HOME : process.env.HOMEPATH
USER_PATH
=
path
.
join
(
home_path
,
'
user.json
'
)
IS_DEV
=
process
.
env
.
DEV
?
true
:
false
var
pjson_path
=
path
.
join
(
__dirname
,
'
..
'
,
'
package.json
'
)
var
pjson
=
require
(
pjson_path
)
if
(
IS_DEV
)
{
var
pjson_path
=
path
.
join
(
__dirname
,
'
..
'
,
'
package.json
'
)
var
pjson
=
require
(
pjson_path
)
console
.
log
(
'
----====
'
+
pjson
.
name
+
'
v.
'
+
pjson
.
version
+
'
(build
'
+
(
++
pjson
.
build
)
+
'
) ====----
'
)
pjson
.
build
++
console
.
log
(
'
----====
'
+
pjson
.
name
+
'
v.
'
+
pjson
.
version
+
'
(build
'
+
(
pjson
.
build
)
+
'
) ====----
'
)
fs
.
writeFileSync
(
pjson_path
,
JSON
.
stringify
(
pjson
,
null
,
4
))
}
app
.
on
(
'
ready
'
,
function
()
{
windows
[
'
authWindow
'
]
=
new
BrowserWindow
({
width
:
300
,
height
:
600
,
show
:
true
})
windows
[
'
authWindow
'
].
setTitle
(
'
Panustaja - log in
'
)
windows
[
'
authWindow
'
]
=
new
BrowserWindow
({
width
:
350
,
height
:
600
,
show
:
true
,
"
web-preferences
"
:
{
partition
:
"
persist:panustaja (build
"
+
(
pjson
.
build
)
+
"
)
"
}
})
var
title
=
pjson
.
name
+
'
v.
'
+
pjson
.
version
+
(
pjson
.
version
.
indexOf
(
'
-
'
)
>
-
1
?
pjson
.
build
:
''
)
+
'
| Logi sisse.
'
windows
[
'
authWindow
'
].
setTitle
(
title
)
windows
[
'
authWindow
'
].
loadUrl
(
auth_url
)
windows
[
'
authWindow
'
].
webContents
.
on
(
'
did-finish-load
'
,
function
()
{
windows
[
'
authWindow
'
].
setTitle
(
title
)
console
.
log
(
windows
[
'
authWindow
'
].
webContents
.
getUrl
())
if
(
windows
[
'
authWindow
'
].
webContents
.
getUrl
()
!==
user_url
&&
windows
[
'
authWindow
'
].
webContents
.
getUrl
()
!==
user_url
+
'
#
'
)
{
return
}
// require('dialog').showMessageBox({type:'info', message:'enne salvestamist: ' + USER_PATH, buttons:['ok']})
windows
[
'
authWindow
'
].
webContents
.
savePage
(
USER_PATH
,
'
HTMLOnly
'
,
function
(
err
)
{
if
(
err
)
{
...
...
package.json
View file @
b4f29ef1
...
...
@@ -2,7 +2,7 @@
"name"
:
"Panustaja"
,
"description"
:
"Ressursikataloogi upitamiseks keeleressurside Entu repositooriumisse."
,
"version"
:
"1.0.1-d"
,
"build"
:
41
,
"build"
:
56
,
"main"
:
"./code/app.js"
,
"license"
:
"CC-SA"
,
"private"
:
true
,
...
...
Write
Preview
Markdown
is supported
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