Skip to content

Commit

Permalink
修复文件大小显示问题 (proxyee-down-org#1003)
Browse files Browse the repository at this point in the history
* 修复仓库地址

* 修复字节换算比例问题,1M=1024KB,以前是按1000来格式化的
  • Loading branch information
okou19900722 authored and monkeyWie committed Nov 1, 2018
1 parent 8dd46ab commit c36a5c9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
### 编译

```
git clone https://github.com/monkeyWie/proxyee-down.git
git clone https://github.com/proxyee-down-org/proxyee-down.git
cd proxyee-down/front
#build html
npm install
Expand Down
8 changes: 4 additions & 4 deletions front/src/components/Table/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
@on-change="toggleAll"></Checkbox>
</div>
<div class="td">{{ task.response.fileName }}</div>
<div class="td">{{ task.response.totalSize?$numeral(task.response.totalSize).format('0.00b'):$t('tasks.unknowLeft') }}</div>
<div class="td">{{ task.response.totalSize?$numeral(task.response.totalSize).format('0.000 ib'):$t('tasks.unknowLeft') }}</div>
<div class="td">{{ calcProgress(task) }}</div>
<div class="td">{{ $numeral(task.info.speed).format('0.00b') }}/S</div>
<div class="td">{{ $numeral(task.info.speed).format('0.000 ib') }}/S</div>
<div class="td">{{ calcStatus(task) }}</div>
<div class="td">
<Icon v-if="task.info.status === 1"
Expand Down Expand Up @@ -75,15 +75,15 @@
</p>
<p>
<b>{{ $t('tasks.fileSize') }}:</b>
<span>{{ $numeral(task.response.totalSize).format('0.00b') }}</span>
<span>{{ $numeral(task.response.totalSize).format('0.000 ib') }}</span>
</p>
<p>
<b>{{ $t('tasks.connections') }}:</b>
<span>{{ task.config.connections }}</span>
</p>
<p>
<b>{{ $t('tasks.downloadSpeed') }}:</b>
<span>{{ $numeral(task.info.speed).format('0.00b') }}/S</span>
<span>{{ $numeral(task.info.speed).format('0.000 ib') }}/S</span>
</p>
<p>
<b>{{ $t('tasks.status') }}:</b>
Expand Down
2 changes: 1 addition & 1 deletion front/src/components/Task/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<Input :disabled="disabledForm"
v-model="form.response.fileName" />
</FormItem>
<FormItem :label="$t('tasks.fileSize')">{{ form.response.totalSize?$numeral(form.response.totalSize).format('0.00b'):$t('tasks.unknowLeft') }}</FormItem>
<FormItem :label="$t('tasks.fileSize')">{{ form.response.totalSize?$numeral(form.response.totalSize).format('0.000 ib'):$t('tasks.unknowLeft') }}</FormItem>
<FormItem :label="$t('tasks.connections')"
prop="config.connections">
<Slider v-if="response.supportRange"
Expand Down
2 changes: 1 addition & 1 deletion front/src/views/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<Circle :percent="updateInfo.progress"
:size="150">
<h1>{{ updateInfo.progress.toFixed(2) }}%</h1>
<p>{{ $numeral(updateInfo.speed).format('0.00b') }}/S</p>
<p>{{ $numeral(updateInfo.speed).format('0.000 ib') }}/S</p>
</Circle>
</Spin>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<module>runner</module>
</modules>
<name>proxyee-down</name>
<url>https://github.com/monkeyWie/proxyee-down</url>
<url>https://github.com/proxyee-down-org/proxyee-down</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down

0 comments on commit c36a5c9

Please sign in to comment.