Skip to content

Commit

Permalink
feat(dcellar-web-ui): enlargement upload limit to 100 (#286)
Browse files Browse the repository at this point in the history
* feat(dcellar-web-ui): enlargement upload limit to 100

* fix(dcellar-web-ui): upload tab z-index

* feat(dcellar-web-ui): only one task can be signed before the upload task
  • Loading branch information
devinxl authored Nov 30, 2023
1 parent 7a9ce95 commit e93f30f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export const GlobalTasks = memo<GlobalTasksProps>(function GlobalTasks() {
});
}
};

// 2. sign
useAsyncEffect(async () => {
const task = signTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,6 @@ const StyledTabList = styled(TabList)`
position: sticky;
top: 0;
z-index: 1;
background: var(--ui-colors-bg-middle);
`;
7 changes: 6 additions & 1 deletion apps/dcellar-web-ui/src/store/slices/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,13 @@ export const selectSignTask = (address: string) => (root: AppState) => {

const signQueue = uploadQueue.filter((task) => task.status === 'SIGN');
const hashedQueue = uploadQueue.filter((task) => task.status === 'HASHED');
const uploadingQueue = uploadQueue.filter((task) => task.status === 'UPLOAD');

return !!signQueue.length ? null : hashedQueue[0] ? hashedQueue[0] : null;
if (uploadingQueue.length || !!signQueue.length) {
return null;
}

return hashedQueue[0] ? hashedQueue[0] : null;
// const folderInfos = keyBy(
// uploadQueue.filter((q) => q.waitFile.name.endsWith('/')),
// 'name',
Expand Down
2 changes: 1 addition & 1 deletion apps/dcellar-web-ui/src/store/slices/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ObjectMeta, PolicyMeta } from '@bnb-chain/greenfield-js-sdk/dist/esm/ty
import { getObjectPolicies } from '@/facade/bucket';

export const SINGLE_OBJECT_MAX_SIZE = 256 * 1024 * 1024;
export const SELECT_OBJECT_NUM_LIMIT = 20;
export const SELECT_OBJECT_NUM_LIMIT = 100;

export type ObjectItem = {
bucketName: string;
Expand Down

0 comments on commit e93f30f

Please sign in to comment.