mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
다운로드 및 업로드 속도가 잘못 표기되던 버그 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Writable } from "svelte/store";
|
||||
import { formatNetworkSpeed } from "$lib/modules/util";
|
||||
import type { FileDownloadStatus } from "$lib/stores";
|
||||
import { isFileDownloading, type FileDownloadStatus } from "$lib/stores";
|
||||
|
||||
interface Props {
|
||||
status?: Writable<FileDownloadStatus>;
|
||||
@@ -10,7 +10,7 @@
|
||||
let { status }: Props = $props();
|
||||
</script>
|
||||
|
||||
{#if $status && $status.status !== "decrypted" && $status.status !== "canceled" && $status.status !== "error"}
|
||||
{#if $status && isFileDownloading($status.status)}
|
||||
<div class="flex w-full flex-col rounded-xl bg-gray-100 p-3">
|
||||
<p class="font-medium">
|
||||
{#if $status.status === "download-pending"}
|
||||
@@ -26,7 +26,7 @@
|
||||
<p class="text-xs">
|
||||
{#if $status.status === "downloading"}
|
||||
전송됨
|
||||
{Math.floor(($status.progress ?? 0) * 100)}% · {formatNetworkSpeed($status.rate ?? 0)}
|
||||
{Math.floor(($status.progress ?? 0) * 100)}% · {formatNetworkSpeed(($status.rate ?? 0) * 8)}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user