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
1ff87d19
Commit
1ff87d19
authored
Mar 26, 2014
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安装完成桌面通知
parent
4fa82d94
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
app/js/controllers.coffee
app/js/controllers.coffee
+5
-6
app/js/controllers.js
app/js/controllers.js
+5
-5
app/js/controllers.map
app/js/controllers.map
+1
-1
No files found.
app/js/controllers.coffee
View file @
1ff87d19
...
@@ -43,7 +43,6 @@ angular.module('maotama.controllers', [])
...
@@ -43,7 +43,6 @@ angular.module('maotama.controllers', [])
}
}
},
(
err
,
numReplaced
,
newDoc
)
->
},
(
err
,
numReplaced
,
newDoc
)
->
throw
err
if
err
throw
err
if
err
$scope
.
$digest
();
$scope
.
$digest
();
$scope
.
install
=
()
->
$scope
.
install
=
()
->
...
@@ -69,7 +68,7 @@ angular.module('maotama.controllers', [])
...
@@ -69,7 +68,7 @@ angular.module('maotama.controllers', [])
console
.
log
'err: '
,
data
console
.
log
'err: '
,
data
aria2c
.
on
'close'
,
(
code
)
->
aria2c
.
on
'close'
,
(
code
)
->
if
code
!=
0
if
code
!=
0
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
'下载失败'
,
"
错误:
#{
code
}
"
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
$scope
.
app
.
name
,
"下载失败,
错误:
#{
code
}
"
delete
$scope
.
installing
[
$scope
.
app
.
id
]
delete
$scope
.
installing
[
$scope
.
app
.
id
]
$scope
.
$digest
();
$scope
.
$digest
();
else
else
...
@@ -87,7 +86,7 @@ angular.module('maotama.controllers', [])
...
@@ -87,7 +86,7 @@ angular.module('maotama.controllers', [])
file
.
on
'end'
,
()
->
file
.
on
'end'
,
()
->
if
checksum
.
digest
(
'hex'
)
!=
$scope
.
app
.
download
.
checksum
if
checksum
.
digest
(
'hex'
)
!=
$scope
.
app
.
download
.
checksum
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
'下载失败'
,
"校验错误"
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
$scope
.
app
.
name
,
"校验错误"
delete
$scope
.
installing
[
$scope
.
app
.
id
]
delete
$scope
.
installing
[
$scope
.
app
.
id
]
$scope
.
$digest
();
$scope
.
$digest
();
else
else
...
@@ -104,13 +103,13 @@ angular.module('maotama.controllers', [])
...
@@ -104,13 +103,13 @@ angular.module('maotama.controllers', [])
console
.
log
'err: '
,
data
console
.
log
'err: '
,
data
p7zip
.
on
'close'
,
(
code
)
->
p7zip
.
on
'close'
,
(
code
)
->
if
code
!=
0
if
code
!=
0
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
'安装失败'
,
"
错误:
#{
code
}
"
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
$scope
.
app
.
name
,
"安装失败,
错误:
#{
code
}
"
delete
$scope
.
installing
[
$scope
.
app
.
id
]
delete
$scope
.
installing
[
$scope
.
app
.
id
]
$scope
.
$digest
();
$scope
.
$digest
();
else
else
$scope
.
add
path
.
join
(
p
,
$scope
.
app
.
main
)
delete
$scope
.
installing
[
$scope
.
app
.
id
]
delete
$scope
.
installing
[
$scope
.
app
.
id
]
$scope
.
$digest
();
window
.
LOCAL_NW
.
desktopNotifications
.
notify
"TODO://icon"
,
$scope
.
app
.
name
,
'安装完成'
$scope
.
add
path
.
join
(
p
,
$scope
.
app
.
main
)
...
...
app/js/controllers.js
View file @
1ff87d19
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
return
aria2c
.
on
(
'
close
'
,
function
(
code
)
{
return
aria2c
.
on
(
'
close
'
,
function
(
code
)
{
var
checksum
,
downloaded
,
file
;
var
checksum
,
downloaded
,
file
;
if
(
code
!==
0
)
{
if
(
code
!==
0
)
{
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
'
下载失败
'
,
"
错误:
"
+
code
);
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
$scope
.
app
.
name
,
"
下载失败,
错误:
"
+
code
);
delete
$scope
.
installing
[
$scope
.
app
.
id
];
delete
$scope
.
installing
[
$scope
.
app
.
id
];
return
$scope
.
$digest
();
return
$scope
.
$digest
();
}
else
{
}
else
{
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
return
file
.
on
(
'
end
'
,
function
()
{
return
file
.
on
(
'
end
'
,
function
()
{
var
p
;
var
p
;
if
(
checksum
.
digest
(
'
hex
'
)
!==
$scope
.
app
.
download
.
checksum
)
{
if
(
checksum
.
digest
(
'
hex
'
)
!==
$scope
.
app
.
download
.
checksum
)
{
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
'
下载失败
'
,
"
校验错误
"
);
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
$scope
.
app
.
name
,
"
校验错误
"
);
delete
$scope
.
installing
[
$scope
.
app
.
id
];
delete
$scope
.
installing
[
$scope
.
app
.
id
];
return
$scope
.
$digest
();
return
$scope
.
$digest
();
}
else
{
}
else
{
...
@@ -139,13 +139,13 @@
...
@@ -139,13 +139,13 @@
});
});
return
p7zip
.
on
(
'
close
'
,
function
(
code
)
{
return
p7zip
.
on
(
'
close
'
,
function
(
code
)
{
if
(
code
!==
0
)
{
if
(
code
!==
0
)
{
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
'
安装失败
'
,
"
错误:
"
+
code
);
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
$scope
.
app
.
name
,
"
安装失败,
错误:
"
+
code
);
delete
$scope
.
installing
[
$scope
.
app
.
id
];
delete
$scope
.
installing
[
$scope
.
app
.
id
];
return
$scope
.
$digest
();
return
$scope
.
$digest
();
}
else
{
}
else
{
$scope
.
add
(
path
.
join
(
p
,
$scope
.
app
.
main
));
delete
$scope
.
installing
[
$scope
.
app
.
id
];
delete
$scope
.
installing
[
$scope
.
app
.
id
];
return
$scope
.
$digest
();
window
.
LOCAL_NW
.
desktopNotifications
.
notify
(
"
TODO://icon
"
,
$scope
.
app
.
name
,
'
安装完成
'
);
return
$scope
.
add
(
path
.
join
(
p
,
$scope
.
app
.
main
));
}
}
});
});
});
});
...
...
app/js/controllers.map
View file @
1ff87d19
This diff is collapsed.
Click to expand it.
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