init: 0.0.8

feat: 实现了分片上传
todo:
  1. 上传完成后 code 回显
  2. 清理不用的临时 code file
  3. 断点续传
  4. 多 chunk 并发上传
This commit is contained in:
loveuer
2025-05-12 15:54:43 +08:00
parent fb96934abe
commit 7ec8cd5c0e
22 changed files with 1110 additions and 356 deletions
@@ -0,0 +1,33 @@
import React, {ReactNode} from 'react';
import {createUseStyles} from "react-jss";
const useStyle = createUseStyles({
ubutton: {
backgroundColor: "#4CAF50",
color: "white",
padding: "10px 20px",
border: "none",
borderRadius: "5px",
cursor: "pointer",
transition: "background-color 0.3s",
"&:hover": {
backgroundColor: "#45a049",
},
"&:disabled": {
backgroundColor: "#a5d6a7",
cursor: "not-allowed",
},
}
})
type Props = {
onClick: () => void;
children: ReactNode;
disabled?: boolean;
style?: React.CSSProperties | undefined;
};
export const UButton: React.FC<Props> = ({onClick, children, style,disabled = false}) => {
const classes= useStyle()
return <button style={style} className={classes.ubutton} disabled={disabled} onClick={onClick}>
{children}
</button>
}