parent
951300a1cd
commit
1ef182ed71
2 changed files with 10 additions and 5 deletions
|
@ -581,7 +581,6 @@
|
||||||
"'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead": "'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead",
|
"'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead": "'claimId' should no longer be used. Use 'streamClaimId' or 'channelClaimId' instead",
|
||||||
"View Tag": "View Tag",
|
"View Tag": "View Tag",
|
||||||
"Block": "Block",
|
"Block": "Block",
|
||||||
"% downloaded": "% downloaded",
|
|
||||||
"'claimName' should no longer be used. Use 'streamClaimName' or 'channelClaimName' instead": "'claimName' should no longer be used. Use 'streamClaimName' or 'channelClaimName' instead",
|
"'claimName' should no longer be used. Use 'streamClaimName' or 'channelClaimName' instead": "'claimName' should no longer be used. Use 'streamClaimName' or 'channelClaimName' instead",
|
||||||
"Vietnamese": "Vietnamese",
|
"Vietnamese": "Vietnamese",
|
||||||
"Thai": "Thai",
|
"Thai": "Thai",
|
||||||
|
@ -1199,6 +1198,7 @@
|
||||||
"Share this channel": "Share this channel",
|
"Share this channel": "Share this channel",
|
||||||
"File preview": "File preview",
|
"File preview": "File preview",
|
||||||
"Go Home": "Go Home",
|
"Go Home": "Go Home",
|
||||||
|
"%percent%% downloaded": "%percent%% downloaded",
|
||||||
"Uploading (%progress%%) ": "Uploading (%progress%%) ",
|
"Uploading (%progress%%) ": "Uploading (%progress%%) ",
|
||||||
"Confirming": "Confirming",
|
"Confirming": "Confirming",
|
||||||
"Unfollow this channel": "Unfollow this channel",
|
"Unfollow this channel": "Unfollow this channel",
|
||||||
|
|
|
@ -71,11 +71,16 @@ function FileDownloadLink(props: Props) {
|
||||||
|
|
||||||
// @if TARGET='app'
|
// @if TARGET='app'
|
||||||
if (downloading || loading) {
|
if (downloading || loading) {
|
||||||
const progress = fileInfo && fileInfo.written_bytes > 0 ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0;
|
if (hideDownloadStatus) {
|
||||||
const label =
|
return null;
|
||||||
fileInfo && fileInfo.written_bytes > 0 ? progress.toFixed(0) + __('% downloaded') : __('Connecting...');
|
}
|
||||||
|
|
||||||
return hideDownloadStatus ? null : <span className="download-text">{label}</span>;
|
if (fileInfo && fileInfo.written_bytes > 0) {
|
||||||
|
const progress = (fileInfo.written_bytes / fileInfo.total_bytes) * 100;
|
||||||
|
return <span className="download-text">{__('%percent%% downloaded', { percent: progress.toFixed(0) })}</span>;
|
||||||
|
} else {
|
||||||
|
return <span className="download-text">{__('Connecting...')}</span>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// @endif
|
// @endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue