Skip to content
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
67ee922
feat: add tab navigation for app details and deals in AppsRoute compo…
ErwanDecoster Oct 15, 2025
e2de601
feat: add AppAccessTable component and integrate into AppsRoute
ErwanDecoster Oct 16, 2025
ca724b5
feat: enhance AppAccessTable and AppDealsTable with loading and outda…
ErwanDecoster Oct 16, 2025
aeae164
feat: rename columns to appColumns and remove app address and price c…
ErwanDecoster Oct 16, 2025
10c2da9
feat: add tab navigation for dataset details, deals, and access in Da…
ErwanDecoster Oct 16, 2025
df51a0e
feat: integrate loading and outdated state management in DatasetDeals…
ErwanDecoster Oct 16, 2025
6970d14
feat: add DatasetAccessTable component and integrate it into Datasets…
ErwanDecoster Oct 16, 2025
691c276
feat: add tab navigation for workerpool details, deals, and access
ErwanDecoster Oct 16, 2025
9a9ac27
feat: enhance WorkerpoolDealsTable with loading and outdated state ma…
ErwanDecoster Oct 16, 2025
f26634d
feat: add WorkerpoolAccessTable component and integrate it into Worke…
ErwanDecoster Oct 16, 2025
d05f864
feat: refactor loading and outdated state management in access and de…
ErwanDecoster Oct 16, 2025
6a02688
feat: add access tables for apps, datasets, and workerpools on addres…
ErwanDecoster Oct 17, 2025
f93cdc2
fix: correct import path for WorkerpoolAccessTable component
ErwanDecoster Oct 17, 2025
f340188
refactor: remove console logs from access data fetching functions
ErwanDecoster Oct 17, 2025
d35aa68
feat: enhance pagination logic to display all pages for 7 or fewer to…
ErwanDecoster Oct 17, 2025
4efb46f
feat: update pagination logic to support mobile-first design and dyna…
ErwanDecoster Oct 17, 2025
6332132
feat: update access data fetching logic to support pagination and tot…
ErwanDecoster Oct 17, 2025
2e677ba
fix: prevent rendering of pagination controls for invalid states
ErwanDecoster Oct 17, 2025
83f837e
refactor: prettier
ErwanDecoster Oct 17, 2025
66d27df
fix: stabilize pagination rendering during lading state
ErwanDecoster Oct 17, 2025
198d0ed
fix: normalize case for order restrictions in CopyButton components
ErwanDecoster Oct 17, 2025
370ab44
Merge branch 'main' into feature/add-assets-order
ErwanDecoster Oct 17, 2025
53f512f
fix: useTabParam() name in dataset
ErwanDecoster Oct 17, 2025
985787e
fix: correct error message wording in loading alerts across multiple …
ErwanDecoster Oct 17, 2025
2f58900
Merge branch 'feature/add-assets-order' of https://github.com/iExecBl…
ErwanDecoster Oct 17, 2025
81c3397
feat: add price column with token symbol for app, dataset, and worker…
ErwanDecoster Oct 17, 2025
a811ac9
fix: conditionally apply cursor pointer class based on destination
ErwanDecoster Oct 17, 2025
f094a9d
feat: format access data to include destination paths for apps, datas…
ErwanDecoster Oct 17, 2025
2046f43
fix: adjust indicator position calculation to include scroll offset
ErwanDecoster Oct 17, 2025
1afc908
fix: update initIExecSDKs to work without wallet connection
ErwanDecoster Oct 27, 2025
0a52e58
fix: convert price values from NRLC to RLC across app, dataset, and w…
ErwanDecoster Oct 27, 2025
f2675be
fix: update orderbook fetch calls to include 'any' for dataset, app, …
ErwanDecoster Oct 27, 2025
5cfa44e
fix: improve pagination stability by updating totalPages reference co…
ErwanDecoster Oct 27, 2025
b43dce0
feat: rename "access" tables to "access from"
ErwanDecoster Oct 28, 2025
90c6523
fix: remove unused datasetOwner parameter from dataset orderbook fetch
ErwanDecoster Oct 28, 2025
38a483c
fix: update query keys to use 'accessFrom' for apps, datasets, and wo…
ErwanDecoster Oct 28, 2025
b15e315
feat: add access to tables for apps, datasets, and workerpools to add…
ErwanDecoster Oct 28, 2025
65b14e9
fix: stabilize pagination by resetting totalPages reference on chainI…
ErwanDecoster Oct 28, 2025
b005643
fix: remove debug log for provider in initIExecSDKs function
ErwanDecoster Oct 28, 2025
732a2e8
fix: include 'requester' parameter as 'any' in access data queries fo…
ErwanDecoster Oct 28, 2025
5c27c6b
fix: reorder AddressAppsAccessTable in AddressRoute component
ErwanDecoster Oct 28, 2025
9dd6585
Merge branch 'feature/add-assets-order' into feature/upgrade-access-f…
ErwanDecoster Oct 28, 2025
1e3ee07
fix: reorder AddressAppsAccessFromTable in AddressRoute component
ErwanDecoster Oct 28, 2025
45d1f8b
feat: rename access table "access from/to" to "granted/received access"
ErwanDecoster Oct 28, 2025
09c2724
feat: add Access page
ErwanDecoster Oct 29, 2025
a1509d8
feat: convert dataset prices to RLC format in buildAccessDetails func…
ErwanDecoster Oct 29, 2025
cf3144e
feat: update access destination paths to use orderHash for all access…
ErwanDecoster Oct 29, 2025
96179ff
fix: remove unnecessary refetchInterval and console log in useAccessData
ErwanDecoster Oct 30, 2025
a5c6739
feat: enhance buildAccessDetails function with type-specific access h…
ErwanDecoster Oct 30, 2025
bdd7817
fix: add 'order' type to LinkType in SmartLinkGroup usage in buildAcc…
ErwanDecoster Oct 30, 2025
f3e7e3e
feat: implement revoke access functionality for app, dataset, and wor…
ErwanDecoster Oct 30, 2025
a2a412a
fix: adjust padding in tab buttons for improved layout
ErwanDecoster Oct 30, 2025
0d9cef6
fix: update comment to reflect correct number of displayed items per …
ErwanDecoster Oct 30, 2025
108ab36
fix: remove unnecessary console log and adjust access check placement…
ErwanDecoster Oct 30, 2025
999d308
Merge branch 'main' into feature/upgrade-access-feature
ErwanDecoster Oct 30, 2025
ff4152b
fix: remove unused imports for access tables in address layout
ErwanDecoster Oct 30, 2025
0e57f85
feat: update access routes and components for apps, datasets, and wor…
ErwanDecoster Nov 6, 2025
862ea0b
refactor: remove access hash route and related components
ErwanDecoster Nov 6, 2025
4c814f3
feat: enhance SmartLinkGroup to conditionally display address or ID a…
ErwanDecoster Nov 6, 2025
4afb03f
feat: add revoke access button on user access granted page
ErwanDecoster Nov 6, 2025
ccfb71d
Merge branch 'main' into feature/upgrade-access-feature
ErwanDecoster Nov 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/SmartLinkGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ type LinkType =
| 'workerpool'
| 'app'
| 'address'
| 'transaction';
| 'transaction'
| 'order';

interface SmartLinkGroupProps {
type: LinkType;
Expand All @@ -46,6 +47,7 @@ export default function SmartLinkGroup({
app: 'app',
address: 'address',
transaction: 'tx',
order: 'order',
};

const { data: ens } = useQuery({
Expand Down Expand Up @@ -98,7 +100,7 @@ export default function SmartLinkGroup({
</div>
)}

{type !== 'task' && (
{type !== 'task' && type !== 'order' && (
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
Expand Down
34 changes: 34 additions & 0 deletions src/components/icons/AccessIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const DatasetIcon = ({ size = 20, className = '' }) => (
<svg
width={size}
height={size}
viewBox="0 0 24 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<path
d="M12 9.16691C16.1421 9.16691 19.5 8.04764 19.5 6.66695C19.5 5.28626 16.1421 4.16699 12 4.16699C7.85786 4.16699 4.5 5.28626 4.5 6.66695C4.5 8.04764 7.85786 9.16691 12 9.16691Z"
stroke="currentColor"
strokeWidth="2.4"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M19.5 12.5C19.5 13.8834 16.1666 15 12 15C7.83336 15 4.5 13.8832 4.5 12.5"
stroke="currentColor"
strokeWidth="2.4"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M4.5 6.66602V18.3327C4.5 19.716 7.83336 20.8326 12 20.8326C16.1666 20.8326 19.5 19.7159 19.5 18.3327V6.66602"
stroke="currentColor"
strokeWidth="2.4"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);

export default DatasetIcon;
2 changes: 1 addition & 1 deletion src/modules/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function Tabs({
if (!isDisabled) onTabChange(index);
}}
className={cn(
'text-foreground relative z-10 border border-transparent px-8 py-2 transition-colors duration-300 hover:no-underline',
'text-foreground relative z-10 border border-transparent px-4 py-2 transition-colors duration-300 hover:no-underline',
isDisabled && 'cursor-not-allowed opacity-50',
currentTab === index && 'text-primary'
)}
Expand Down
35 changes: 35 additions & 0 deletions src/modules/access/access/AccessBreadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { ChainLink } from '@/components/ChainLink';
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from '@/components/ui/breadcrumb';
import { truncateAddress } from '@/utils/truncateAddress';

type AccessBreadcrumbsProps = {
accessHash: string;
};

export function AccessBreadcrumbs({ accessHash }: AccessBreadcrumbsProps) {
return (
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink asChild>
<ChainLink to="/">Homepage</ChainLink>
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>
Access{' '}
<span className="font-normal">{truncateAddress(accessHash)}</span>
</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
);
}
70 changes: 70 additions & 0 deletions src/modules/access/access/RevokeAccess.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { useMutation, useQueryClient } from '@tanstack/react-query';
import {
PublishedApporder,
PublishedDatasetorder,
PublishedWorkerpoolorder,
} from 'iexec/IExecOrderbookModule';
import { LoaderCircle } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { getIExec } from '@/externals/iexecSdkClient';
import useUserStore from '@/stores/useUser.store';

export default function RevokeAccess({
access,
}: {
access: PublishedApporder | PublishedDatasetorder | PublishedWorkerpoolorder;
}) {
const { chainId } = useUserStore();
const queryClient = useQueryClient();

const order = access.order;

const revokeAccessMutation = useMutation({
mutationFn: async () => {
const iexec = await getIExec();

if ('app' in order) {
return await iexec.order.cancelApporder(order);
} else if ('dataset' in order) {
return await iexec.order.cancelDatasetorder(order);
} else if ('workerpool' in order) {
return await iexec.order.cancelWorkerpoolorder(order);
} else {
throw new Error('Unknown order type');
}
},
onError: (err) => {
console.error(err);
},
onSuccess: () => {
let accessType = '';
if ('app' in order) {
accessType = 'App';
} else if ('dataset' in order) {
accessType = 'Dataset';
} else {
accessType = 'Workerpool';
}
queryClient.invalidateQueries({
queryKey: [chainId, 'address', `${accessType}sGrantedAccess`],
});
},
});

if (!access) return;

return (
<Button
variant="outline"
size="sm"
onClick={() => {
revokeAccessMutation.mutate();
}}
>
{revokeAccessMutation.isPending && (
<LoaderCircle className="animate-spin" />
)}
Revoke access
</Button>
);
}
137 changes: 137 additions & 0 deletions src/modules/access/access/buildAccessDetails.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
import {
PublishedApporder,
PublishedDatasetorder,
PublishedWorkerpoolorder,
} from 'iexec/IExecOrderbookModule';
import SmartLinkGroup from '@/components/SmartLinkGroup';
import {
formatDateCompact,
formatElapsedTime,
} from '@/utils/formatElapsedTime';
import { nrlcToRlc } from '@/utils/nrlcToRlc';

export function buildAccessDetails({
access,
}: {
access: PublishedApporder | PublishedDatasetorder | PublishedWorkerpoolorder;
}) {
if (!access) return {};

const order = access.order || {};

return {
...(access.orderHash && {
'Order Hash': (
<SmartLinkGroup
type="order"
isCurrentPage={true}
addressOrId={access.orderHash.toLowerCase()}
label={access.orderHash.toLowerCase()}
/>
),
}),
...('dataset' in order &&
order.dataset && {
Dataset: (
<SmartLinkGroup
type="dataset"
addressOrId={order.dataset.toLowerCase()}
label={order.dataset.toLowerCase()}
/>
),
}),
...('datasetprice' in order &&
order.datasetprice && {
'Dataset Price': <span>{nrlcToRlc(order.datasetprice)}</span>,
}),
...('app' in order &&
order.app && {
App: (
<SmartLinkGroup
type="app"
addressOrId={order.app.toLowerCase()}
label={order.app.toLowerCase()}
/>
),
}),
...('appprice' in order &&
order.appprice && {
'App Price': <span>{nrlcToRlc(order.appprice)}</span>,
}),
...('workerpool' in order &&
order.workerpool && {
Workerpool: (
<SmartLinkGroup
type="workerpool"
addressOrId={order.workerpool.toLowerCase()}
label={order.workerpool.toLowerCase()}
/>
),
}),
...('workerpoolprice' in order &&
order.workerpoolprice !== undefined && {
'Workerpool Price': <span>{nrlcToRlc(order.workerpoolprice)}</span>,
}),
...(order.volume !== undefined && {
Volume: <span>{order.volume}</span>,
}),
...(access.remaining !== undefined && {
Remaining: <span>{access.remaining}</span>,
}),
...(order.salt && { Salt: <span>{order.salt}</span> }),
...(order.tag && { Tag: <span>{order.tag}</span> }),
...('apprestrict' in order &&
order.apprestrict && {
'App Restrict': (
<SmartLinkGroup
type="app"
addressOrId={order.apprestrict.toLowerCase()}
label={order.apprestrict.toLowerCase()}
/>
),
}),
...(order.requesterrestrict && {
'Requester Restrict': (
<SmartLinkGroup
type="address"
addressOrId={order.requesterrestrict.toLowerCase()}
label={order.requesterrestrict.toLowerCase()}
/>
),
}),
...('workerpoolrestrict' in order &&
order.workerpoolrestrict && {
'Workerpool Restrict': (
<SmartLinkGroup
type="workerpool"
addressOrId={order.workerpoolrestrict.toLowerCase()}
label={order.workerpoolrestrict.toLowerCase()}
/>
),
}),
...(access.signer && {
Signer: (
<SmartLinkGroup
type="address"
addressOrId={access.signer.toLowerCase()}
label={access.signer.toLowerCase()}
/>
),
}),
...(access.publicationTimestamp && {
Publication: (
<p>
{formatElapsedTime(
new Date(access.publicationTimestamp).getTime() / 1000
)}{' '}
(
{formatDateCompact(
new Date(access.publicationTimestamp).getTime() / 1000
)}
)
</p>
),
}),
...(order.sign && { Signature: <span>{order.sign}</span> }),
};
}
Loading
Loading