Skip to content

Commit

Permalink
fix: upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lulu-tro committed Jun 3, 2024
1 parent 2acf836 commit a1105a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/APIClient/APIClient10.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ class APIClient10 {
'Content-Type':'application/x-www-form-urlencoded',
},
'timeout': 0,
// signal: signal,
onUploadProgress:onUploadProgress
});
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/Modals/DecryptFileModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default function EncryptFileModal({ color }) {
value={decryptType}>
{options.map(v => {
return (
<Radio value={v.value}>
<Radio value={v.value} key={v.value}>
<div className=" w-full font-semibold mb-3">
<p>{t(`${v.label}`)}</p>
</div>
Expand All @@ -211,6 +211,7 @@ export default function EncryptFileModal({ color }) {
ref={inputHostIdRef}
onChange={hostIdChange}
value={hostId}
readOnly={loading}
/>
<div className="flex justify-between w-full mb-4">
<span className="theme-text-error text-xs pt-1">{validateHostIdMsg}</span>
Expand All @@ -229,6 +230,7 @@ export default function EncryptFileModal({ color }) {
ref={inputRef}
onChange={cidChange}
value={cId}
readOnly={loading}
/>
<div className="flex justify-between w-full mb-4">
<span className="theme-text-error text-xs pt-1">{validateMsg}</span>
Expand All @@ -250,6 +252,7 @@ export default function EncryptFileModal({ color }) {
maxLength={inputMaxLength}
ref={inputKeyRef}
onChange={passwordChange}
readOnly={loading}
value={password}
/>
<div className="flex justify-between text-xs w-full mb-4">
Expand Down
4 changes: 4 additions & 0 deletions src/components/Modals/EncryptFileModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export default function EncryptFileModal({ color }) {
const [isCurHost, setIsCurHost] = useState(true);
const [password, setPassword] = useState('');
const [validateKeyMsg, setValidateKeyMsg] = useState('');
// const controller = useRef<AbortController>(new AbortController());


const init = () => {
setHostId('');
Expand Down Expand Up @@ -136,6 +138,7 @@ export default function EncryptFileModal({ color }) {

const closeModal = () => {
init();
// controller.current.abort();
setShowModal(false);
window.body.style.overflow = '';
};
Expand Down Expand Up @@ -306,6 +309,7 @@ export default function EncryptFileModal({ color }) {
className="common-input random_key"
value={password}
onChange={passwordChange}
readOnly={loading}
suffix={
<Button
type="primary"
Expand Down

0 comments on commit a1105a0

Please sign in to comment.