Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
9b3f8f5d
Commit
9b3f8f5d
authored
Dec 07, 2016
by
wudizhanche1000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge index.js
parent
95f65352
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
index.js
index.js
+7
-2
No files found.
index.js
View file @
9b3f8f5d
...
...
@@ -10,7 +10,7 @@ function handleElevate() {
if
(
process
.
argv
[
1
]
==
'
-e
'
)
{
if
(
process
.
platform
==
'
darwin
'
)
{
app
.
dock
.
hide
();
require
(
'
electron
'
).
app
.
dock
.
hide
();
}
let
elevate
=
JSON
.
parse
(
new
Buffer
(
process
.
argv
[
2
],
'
base64
'
).
toString
());
require
(
'
net
'
).
connect
(
elevate
[
'
ipc
'
],
function
()
{
...
...
@@ -74,18 +74,23 @@ if (process.env['NODE_ENV'] == 'production' && process.platform == 'darwin') {
// }, 6000)
// }
autoUpdater
.
on
(
'
error
'
,
(
event
)
=>
{
global
.
update_status
=
'
error
'
;
console
.
log
(
'
autoUpdater
'
,
'
error
'
,
event
);
});
autoUpdater
.
on
(
'
checking-for-update
'
,
()
=>
{
global
.
update_status
=
'
checking-for-update
'
;
console
.
log
(
'
autoUpdater
'
,
'
checking-for-update
'
);
});
autoUpdater
.
on
(
'
update-available
'
,
()
=>
{
global
.
update_status
=
'
update-available
'
;
console
.
log
(
'
autoUpdater
'
,
'
update-available
'
);
});
autoUpdater
.
on
(
'
update-not-available
'
,
()
=>
{
global
.
update_status
=
'
update-not-available
'
;
console
.
log
(
'
autoUpdater
'
,
'
update-not-available
'
);
});
autoUpdater
.
on
(
'
update-downloaded
'
,
(
event
)
=>
{
global
.
update_status
=
'
update-downloaded
'
;
console
.
log
(
'
autoUpdater
'
,
'
update-downloaded
'
,
event
);
updateWindow
=
new
BrowserWindow
({
width
:
640
,
...
...
@@ -180,7 +185,7 @@ function createTray() {
app
.
on
(
'
ready
'
,
()
=>
{
createWindow
();
if
(
process
.
env
[
'
NODE_ENV
'
]
==
'
production
'
)
{
setTimeout
(
autoUpdater
.
checkForUpdates
.
bind
(
autoUpdater
),
2000
);
autoUpdater
.
checkForUpdates
()
}
if
(
process
.
platform
==
'
win32
'
)
{
createTray
()
...
...
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