Skip to content

Commit

Permalink
feat(dcellar-web-ui): introduce activities feature for bucket, object… (
Browse files Browse the repository at this point in the history
#380)

* feat(dcellar-web-ui): introduce activities feature for bucket, object and group

* fix(dcellar-web-ui): text case error

* refactor(dcellar-web-ui): the transfer in style & toolbox style

* feat(dcellar-web-ui): add discord and release note link

* feat(dcellar-web-ui): introduce the stop upload feature (#385)

* feat(dcellar-web-ui): introduce the stop upload feature

* fix(dcellar-web-ui): the uploading name text ellispsis

* fix(dcellar-web-ui): change the stop status icon

* feat(dcellar-web-ui): introduce activities feature for bucket, object and group

* fix(dcellar-web-ui): text case error

* refactor(dcellar-web-ui): the transfer in style & toolbox style

* feat(dcellar-web-ui): add discord and release note link

* feat(dcellar-web-ui): introduce the stop upload feature

* refactor(dcellar-web-ui): remove rerandunt codes

* docs(dcellar-web-ui): update changelog
  • Loading branch information
devinxl committed May 23, 2024
1 parent 627aaaa commit ddf19fc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/dcellar-web-ui/src/facade/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,13 @@ export const cancelMigrateBucket = async (
if (!tx) return [null, error1];

return broadcastTx({ tx: tx, address: params.operator, connector });
}

export const getBucketActivities = async (id: string): Promise<Activity[]> => {
const url = `/api/tx/list/by_bucket/${id}`;

const [result] = await axios.get<{ result: Activity[] }>(url).then(resolve, commonFault);
if (!result) return [];

return result.data.result || [];
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
TBucket,
setupBucketActivity,
BucketOperationsType,
setupBucketActivity,
} from '@/store/slices/bucket';
import { selectBucketSp } from '@/store/slices/sp';
import { convertObjectKey } from '@/utils/common';
Expand Down Expand Up @@ -44,6 +45,7 @@ import { useMount, useUnmount } from 'ahooks';
import { DEFAULT_TAG } from '@/components/common/ManageTags';
import { Activities } from '@/components/Activities';
import { BucketStatus } from '@bnb-chain/greenfield-js-sdk';
import { Activities } from '@/components/Activities';

export const Label = ({ children }: PropsWithChildren) => (
<Text as={'div'} fontSize={'14px'} fontWeight={500} color="readable.tertiary">
Expand Down
2 changes: 2 additions & 0 deletions apps/dcellar-web-ui/src/store/slices/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { convertObjectKey } from '@/utils/common';
import { Activity } from './object';
import { numberToHex } from 'viem';
import { BucketStatus as BucketStatusEnum } from '@bnb-chain/greenfield-js-sdk';
import { Activity } from './object';
import { numberToHex } from 'viem';

export type BucketOperationsType =
| 'detail'
Expand Down

0 comments on commit ddf19fc

Please sign in to comment.