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
bf638c91
Commit
bf638c91
authored
Dec 02, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正进度条
parent
078de2f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
app/app-detail.component.html
app/app-detail.component.html
+12
-21
app/app.ts
app/app.ts
+11
-1
No files found.
app/app-detail.component.html
View file @
bf638c91
<h1>
{{currentApp.name}}
</h1>
<h1>
{{currentApp.name}}
</h1>
<!--应用未安装-->
<!--应用未安装-->
<div
class=
"actions"
*ngIf=
"!currentApp.isInstalled()"
>
<div
class=
"actions"
*ngIf=
"!currentApp.isInstalled()"
>
<button
i18n
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
(click)=
"updateInstallOption(currentApp)"
data-target=
"#install-modal"
>
<button
i18n
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
(click)=
"updateInstallOption(currentApp)"
data-target=
"#install-modal"
>
安装
</button>
安装
</button>
<button
i18n
type=
"button"
class=
"btn btn-secondary"
>
导入
</button>
<button
i18n
type=
"button"
class=
"btn btn-secondary"
>
导入
</button>
</div>
</div>
<!--应用变更中-->
<!--应用变更中-->
<div
class=
"actions"
*ngIf=
"currentApp.isInstalled() && !currentApp.isReady()"
>
<div
class=
"actions"
*ngIf=
"currentApp.isInstalled() && !currentApp.isReady()"
>
<div
*ngIf=
"currentApp.isDownloading()"
>
<div>
<span>
正在下载
</span><span
*ngIf=
"currentApp.status.total"
>
{{currentApp.status.progress/currentApp.status.total}}%
</span>
<span
*ngIf=
"currentApp.isDownloading()"
>
正在下载
</span>
<span
*ngIf=
"currentApp.isInstalling()"
>
正在安装...
</span>
<span
*ngIf=
"currentApp.isWaiting()"
>
等待安装...
</span>
<span
*ngIf=
"currentApp.status.total"
>
{{(currentApp.status.progress/currentApp.status.total * 100).toFixed()}}%
</span>
<span>
{{currentApp.progressMessage()}}
</span>
</div>
</div>
<div
i18n
*ngIf=
"currentApp.isInstalling()"
>
正在安装...
</div>
<div
i18n
*ngIf=
"currentApp.isWaiting()"
>
等待安装...
</div>
<progress
class=
"progress"
[class.progress-striped]=
"!currentApp.status.total"
[class.progress-animated]=
"!currentApp.status.total"
value=
"{{currentApp.status.progress}}"
max=
"{{currentApp.status.total}}"
></progress>
<progress
class=
"progress"
[class.progress-striped]=
"!currentApp.status.total"
[class.progress-animated]=
"!currentApp.status.total"
value=
"{{currentApp.status.progress}}"
max=
"{{currentApp.status.total}}"
></progress>
</div>
</div>
<!--应用ready-->
<!--应用ready-->
<div
class=
"actions"
*ngIf=
"currentApp.isReady() && (currentApp.id != 'ygopro')"
>
<div
class=
"actions"
*ngIf=
"currentApp.isReady() && (currentApp.id != 'ygopro')"
>
<button
i18n
*ngIf=
"currentApp.runable()"
(click)=
"runApp(currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
<button
i18n
*ngIf=
"currentApp.runable()"
(click)=
"runApp(currentApp)"
type=
"button"
class=
"btn btn-primary"
>
运行
</button>
</button>
<button
i18n
*ngIf=
"currentApp.runable() && currentApp.actions.get('custom')"
(click)=
"custom(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
设置
</button>
<button
i18n
*ngIf=
"currentApp.runable() && currentApp.actions.get('custom')"
(click)=
"custom(currentApp)"
type=
"button"
class=
"btn btn-secondary"
>
设置
</button>
<div
id=
"network"
*ngIf=
"currentApp.network && currentApp.network.protocol == 'maotama'"
>
<div
id=
"network"
*ngIf=
"currentApp.network && currentApp.network.protocol == 'maotama'"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
*ngIf=
"appsService.connections.get(currentApp)"
[value]=
"appsService.connections.get(currentApp).address || 'Loading...'"
readonly
type=
"text"
class=
"form-control"
title=
"address"
>
<input
*ngIf=
"appsService.connections.get(currentApp)"
[value]=
"appsService.connections.get(currentApp).address || 'Loading...'"
readonly
type=
"text"
class=
"form-control"
title=
"address"
>
<div
class=
"input-group-btn"
>
<div
class=
"input-group-btn"
>
<button
i18n
*ngIf=
"!appsService.connections.get(currentApp)"
(click)=
"appsService.network(currentApp, currentApp.network.servers[0])"
type=
"button"
class=
"btn btn-secondary"
>
<button
i18n
*ngIf=
"!appsService.connections.get(currentApp)"
(click)=
"appsService.network(currentApp, currentApp.network.servers[0])"
type=
"button"
class=
"btn btn-secondary"
>
联机
</button>
联机
<button
i18n
*ngIf=
"appsService.connections.get(currentApp)"
(click)=
"copy(appsService.connections.get(currentApp).address)"
[disabled]=
"!appsService.connections.get(currentApp).address"
type=
"button"
class=
"btn btn-secondary"
>
复制
</button>
</button>
<button
i18n
*ngIf=
"appsService.connections.get(currentApp)"
(click)=
"copy(appsService.connections.get(currentApp).address)"
[disabled]=
"!appsService.connections.get(currentApp).address"
type=
"button"
class=
"btn btn-secondary"
>
复制
</button>
<button
type=
"button"
class=
"btn btn-secondary dropdown-toggle dropdown-toggle-split"
data-toggle=
"dropdown"
style=
"height: 38px;"
></button>
<button
type=
"button"
class=
"btn btn-secondary dropdown-toggle dropdown-toggle-split"
data-toggle=
"dropdown"
style=
"height: 38px;"
></button>
<div
class=
"dropdown-menu"
[class.dropdown-menu-right]=
"appsService.connections.get(currentApp)"
>
<div
class=
"dropdown-menu"
[class.dropdown-menu-right]=
"appsService.connections.get(currentApp)"
>
<h6
i18n
class=
"dropdown-header"
>
选择服务器
</h6>
<h6
i18n
class=
"dropdown-header"
>
选择服务器
</h6>
...
@@ -69,9 +62,7 @@
...
@@ -69,9 +62,7 @@
<button
i18n
type=
"button"
(click)=
"uninstall(mod)"
class=
"btn btn-danger btn-sm"
>
卸载
</button>
<button
i18n
type=
"button"
(click)=
"uninstall(mod)"
class=
"btn btn-danger btn-sm"
>
卸载
</button>
</td>
</td>
<td
*ngIf=
"!mod.isInstalled()"
>
<td
*ngIf=
"!mod.isInstalled()"
>
<button
i18n
(click)=
"installMod(mod)"
type=
"button"
*ngIf=
"mod.status.status==='init'"
class=
"btn btn-primary btn-sm"
>
<button
i18n
(click)=
"installMod(mod)"
type=
"button"
*ngIf=
"mod.status.status==='init'"
class=
"btn btn-primary btn-sm"
>
安装
</button>
安装
</button>
<progress
*ngIf=
"mod.status.status==='downloading'"
class=
"progress progress-striped progress-animated"
value=
"{{mod.status.progress}}"
max=
"{{mod.status.total}}"
></progress>
<progress
*ngIf=
"mod.status.status==='downloading'"
class=
"progress progress-striped progress-animated"
value=
"{{mod.status.progress}}"
max=
"{{mod.status.total}}"
></progress>
<div
i18n
*ngIf=
"mod.status.status==='waiting'"
>
等待安装...
</div>
<div
i18n
*ngIf=
"mod.status.status==='waiting'"
>
等待安装...
</div>
</td>
</td>
...
...
app/app.ts
View file @
bf638c91
...
@@ -89,10 +89,20 @@ export class App {
...
@@ -89,10 +89,20 @@ export class App {
return
this
.
status
.
status
===
"
downloading
"
;
return
this
.
status
.
status
===
"
downloading
"
;
}
}
runable
()
{
runable
()
:
boolean
{
return
[
Category
.
game
].
includes
(
this
.
category
);
return
[
Category
.
game
].
includes
(
this
.
category
);
}
}
progressMessage
():
string
|
undefined
{
if
(
this
.
isDownloading
())
{
return
'
1M/s
'
}
else
if
(
this
.
isInstalling
())
{
return
'
マニュアル/index.html
'
}
else
if
(
this
.
isWaiting
())
{
return
'
wine, Neko Project II
'
}
}
constructor
(
app
:
any
)
{
constructor
(
app
:
any
)
{
this
.
id
=
app
.
id
;
this
.
id
=
app
.
id
;
this
.
name
=
app
.
name
;
this
.
name
=
app
.
name
;
...
...
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