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
7d462a4a
Commit
7d462a4a
authored
Nov 25, 2016
by
wudizhanche1000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: 安装Reference显示不同步
parent
18a60acb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
app/app-detail.component.ts
app/app-detail.component.ts
+25
-17
No files found.
app/app-detail.component.ts
View file @
7d462a4a
...
@@ -113,36 +113,44 @@ export class AppDetailComponent implements OnInit {
...
@@ -113,36 +113,44 @@ export class AppDetailComponent implements OnInit {
let
downloadPath
=
path
.
join
(
this
.
installConfig
.
installLibrary
,
"
downloading
"
);
let
downloadPath
=
path
.
join
(
this
.
installConfig
.
installLibrary
,
"
downloading
"
);
try
{
try
{
let
downloadApps
=
await
this
.
downloadService
.
addUris
(
apps
,
downloadPath
);
let
downloadApps
=
await
this
.
downloadService
.
addUris
(
apps
,
downloadPath
);
this
.
downloadService
.
getProgress
(
currentApp
)
for
(
let
app
of
apps
)
{
.
subscribe
((
progress
)
=>
{
this
.
downloadService
.
getProgress
(
app
)
currentApp
.
status
.
status
=
"
downloading
"
;
.
subscribe
((
progress
)
=>
{
currentApp
.
status
.
progress
=
progress
.
progress
;
app
.
status
.
status
=
"
downloading
"
;
currentApp
.
status
.
total
=
progress
.
total
;
app
.
status
.
progress
=
progress
.
progress
;
this
.
ref
.
detectChanges
();
app
.
status
.
total
=
progress
.
total
;
},
(
error
)
=>
{
},
()
=>
{
// 避免安装过快
if
(
currentApp
.
status
.
status
===
"
downloading
"
)
{
currentApp
.
status
.
status
=
"
waiting
"
;
this
.
ref
.
detectChanges
();
this
.
ref
.
detectChanges
();
}
},
});
(
error
)
=>
{
},
()
=>
{
// 避免安装过快
if
(
app
.
status
.
status
===
"
downloading
"
)
{
app
.
status
.
status
=
"
waiting
"
;
this
.
ref
.
detectChanges
();
}
});
}
await
Promise
.
all
(
downloadApps
.
map
((
app
)
=>
{
await
Promise
.
all
(
downloadApps
.
map
((
app
)
=>
{
return
this
.
downloadService
.
getComplete
(
app
)
return
this
.
downloadService
.
getComplete
(
app
)
.
then
((
completeApp
:
App
)
=>
{
.
then
((
completeApp
:
App
)
=>
{
return
this
.
installService
.
add
(
completeApp
,
options
);
return
this
.
installService
.
add
(
completeApp
,
options
);
});
});
}));
}));
for
(
let
app
of
apps
){
new
Promise
(
async
(
resolve
,
reject
)
=>
{
await
this
.
installService
.
getComplete
(
app
);
app
.
status
.
status
=
'
ready
'
;
resolve
();
})
}
await
this
.
installService
.
getComplete
(
currentApp
);
await
this
.
installService
.
getComplete
(
currentApp
);
currentApp
.
status
.
status
=
"
ready
"
;
currentApp
.
status
.
status
=
"
ready
"
;
this
.
ref
.
detectChanges
();
this
.
ref
.
detectChanges
();
}
catch
(
e
)
{
}
catch
(
e
)
{
new
Notification
(
currentApp
.
name
,
{
body
:
"
下载失败
"
});
new
Notification
(
currentApp
.
name
,
{
body
:
"
下载失败
"
});
}
}
}
}
selectDir
()
{
selectDir
()
{
...
...
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