code refactoring, enabled memory db persist to fs.

This commit is contained in:
2023-05-25 11:13:46 +02:00
parent acfc5aa064
commit fd0b40ac46
10 changed files with 82 additions and 17 deletions

View File

@@ -6,7 +6,7 @@ import { StackableResult } from "./StackableResult"
type Props = {
downloads: RPCResult[]
abortFunction: Function
abortFunction: (id: string) => void
}
export function DownloadsCardView({ downloads, abortFunction }: Props) {

View File

@@ -1,4 +1,4 @@
import { EightK, FourK, Hd, Sd } from "@mui/icons-material";
import { EightK, FourK, Hd, Sd } from '@mui/icons-material'
import {
Button,
Card,
@@ -11,9 +11,9 @@ import {
Skeleton,
Stack,
Typography
} from "@mui/material";
import { useEffect, useState } from "react";
import { ellipsis, formatSpeedMiB, roundMiB } from "../utils";
} from '@mui/material'
import { useEffect, useState } from 'react'
import { ellipsis, formatSpeedMiB, roundMiB } from '../utils'
type Props = {
title: string,
@@ -97,7 +97,8 @@ export function StackableResult({
variant="contained"
size="small"
color="primary"
onClick={stopCallback}>
onClick={stopCallback}
>
{isCompleted ? "Clear" : "Stop"}
</Button>
</CardActions>