Skip to content

Commit

Permalink
无法获取具体速度提示
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualHotBar committed Jun 1, 2024
1 parent dd57c5b commit 99a255b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/controller/language/pack/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,5 +487,6 @@
"description.thunderx": "Thunder X",
"description.thunderxexpert": "Thunder X Expert Edition",

"restartself_to_take_effect": "Restart to take effect"
"restartself_to_take_effect": "Restart to take effect",
"unable_to_obtain_transmission_speed":"The specific transmission speed may not be available at present, but the transmission is still in progress."
}
3 changes: 2 additions & 1 deletion src/controller/language/pack/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,5 +556,6 @@
"description.thunderx": "迅雷X",
"description.thunderxexpert": "迅雷X专家版",

"restartself_to_take_effect": "重启软件以使更改生效"
"restartself_to_take_effect": "重启软件以使更改生效",
"unable_to_obtain_transmission_speed":"当前可能无法获取具体传输速度,但传输仍在进行。"
}
3 changes: 2 additions & 1 deletion src/controller/language/pack/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,5 +556,6 @@
"description.thunderx": "迅雷X",
"description.thunderxexpert": "迅雷X專家版",

"restartself_to_take_effect": "更改設定需要重新啟動程式才能生效。"
"restartself_to_take_effect": "更改設定需要重新啟動程式才能生效。",
"unable_to_obtain_transmission_speed":"當前可能無法獲取具體傳送速率,但傳輸仍在進行。"
}
2 changes: 1 addition & 1 deletion src/controller/stats/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function reupStats() {

rcloneInfo.stats = {
...stats,
realSpeed: realSpeed
realSpeed: realSpeed/* ||stats.speed */
}

//历史状态
Expand Down
2 changes: 1 addition & 1 deletion src/controller/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function Test() {
console.log(await rclone_api_post('/options/get'));
console.log(await rclone_api_post('/rc/list'),);

console.log(await getAvailablePorts() );
console.log((await getAvailablePorts(2))[1]);

//exit(true)

Expand Down
18 changes: 14 additions & 4 deletions src/page/transmit/transmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import { rcloneInfo, rcloneStatsHistory } from '../../services/rclone'
import { hooks } from '../../services/hook'
import { RcloneTransferItem } from '../../type/rclone/stats'
import { Card, Descriptions, List, Progress, Space, Statistic, Grid, Typography } from '@arco-design/web-react'
import { Card, Descriptions, List, Progress, Space, Statistic, Grid, Typography, Alert } from '@arco-design/web-react'
import { formatETA, formatSize } from '../../utils/utils'
import { Area } from '@ant-design/charts'
import { NoData_module } from '../other/noData'
Expand Down Expand Up @@ -32,7 +32,17 @@ function Transmit_page() {
title={t('overview')}
bordered={false}
>

<Space direction='vertical' style={{ width: '100%' }}>
{
transmitList.length > 0 && rcloneInfo.stats.realSpeed === 0 &&
<Alert
style={{ margin: '0.1rem' }}
type='info'
content={t('unable_to_obtain_transmission_speed')}
/>
}


{rcloneInfo.stats.bytes > 0 && <Progress percent={~~(rcloneInfo.stats.bytes / rcloneInfo.stats.totalBytes * 100)} />}
<Descriptions colon=' :' data={[
Expand Down Expand Up @@ -81,11 +91,11 @@ function Transmit_page() {
{
transmitList.map((item, index) => {
return <List.Item key={index}>
<div style={{ width: '100%' ,display: 'flex' }}>
<div style={{width:'5rem'}}>
<div style={{ width: '100%', display: 'flex' }}>
<div style={{ width: '5rem' }}>
<Progress type={'circle'} percent={item.percentage} style={{ marginTop: '0.5rem' }} size='small' />
</div>
<div style={{width:'calc(100% - 5rem)',overflow:'auto'}}>
<div style={{ width: 'calc(100% - 5rem)', overflow: 'auto' }}>
<Typography.Ellipsis >{item.name}</Typography.Ellipsis>
<Descriptions
size='small'
Expand Down

0 comments on commit 99a255b

Please sign in to comment.