Skip to content

Commit 84e4ce3

Browse files
authored
Merge branch 'main' into nebula-docs
2 parents ea56eee + b173ad2 commit 84e4ce3

File tree

38 files changed

+2092
-369
lines changed

38 files changed

+2092
-369
lines changed

.github/workflows/auto-assign.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ name: Auto Author Assign
22

33
on:
44
pull_request:
5-
types: [ opened, reopened ]
5+
types: [opened, reopened]
66

77
permissions:
88
pull-requests: write
99

1010
jobs:
1111
assign-author:
1212
runs-on: ubuntu-latest
13+
if: |
14+
github.event.pull_request.author_association == 'MEMBER' ||
15+
github.event.pull_request.author_association == 'OWNER' ||
16+
github.event.pull_request.author_association == 'COLLABORATOR'
1317
steps:
1418
- uses: toshimaru/[email protected]

.github/workflows/issue.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Linked Issue
22

33
on:
44
pull_request:
5-
types: [opened, edited]
5+
types: [opened, edited, ready_for_review]
66

77
env:
88
VALID_ISSUE_PREFIXES: "CNCT|DASH|PROT|INSIGHT|ENGINE|CS|DES|BIL|DEVX|SOLU|NEB"
@@ -22,6 +22,17 @@ jobs:
2222
pull_number: context.issue.number
2323
});
2424
25+
// Check if contributor is external
26+
const isInternalContributor = ['MEMBER', 'OWNER', 'COLLABORATOR'].includes(
27+
context.payload.pull_request.author_association
28+
);
29+
30+
// Automatically pass for external contributors
31+
if (!isInternalContributor) {
32+
console.log('External contributor detected - automatically passing check');
33+
return;
34+
}
35+
2536
const body = pr.data.body || '';
2637
const branchName = pr.data.head.ref;
2738
const issueRegex = new RegExp(`(${process.env.VALID_ISSUE_PREFIXES})-\\d+`, 'i');

.github/workflows/typedoc.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: TypeDoc
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment
14+
concurrency:
15+
group: "typedoc"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
name: "Generate TypeDoc"
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Install
27+
uses: ./.github/composite-actions/install
28+
29+
- name: Run TypeDoc
30+
run: pnpm typedoc
31+
32+
- name: Update Gist
33+
uses: actions/github-script@v7
34+
with:
35+
github-token: ${{ secrets.GIST_TOKEN }}
36+
script: |
37+
const fs = require('fs');
38+
const content = fs.readFileSync('./packages/thirdweb/typedoc/parsed.json', 'utf8');
39+
const gistId = '678fe1f331a01270bb002fee660f285d';
40+
41+
await github.rest.gists.update({
42+
gist_id: gistId,
43+
files: {
44+
'data.json': {
45+
content: content
46+
}
47+
}
48+
});
49+
50+
console.log(`Permalink: https://gist.githubusercontent.com/raw/${gistId}/data.json`);

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ import {
88
SheetTitle,
99
SheetTrigger,
1010
} from "@/components/ui/sheet";
11+
import { TabButtons } from "@/components/ui/tabs";
1112
import { ListerOnly } from "@3rdweb-sdk/react/components/roles/lister-only";
1213
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
14+
import { isAlchemySupported } from "lib/wallet/nfts/alchemy";
15+
import { isMoralisSupported } from "lib/wallet/nfts/moralis";
16+
import { isSimpleHashSupported } from "lib/wallet/nfts/simpleHash";
1317
import { PlusIcon } from "lucide-react";
1418
import { useState } from "react";
1519
import type { ThirdwebContract } from "thirdweb";
@@ -23,6 +27,8 @@ interface CreateListingButtonProps {
2327
twAccount: Account | undefined;
2428
}
2529

30+
const LISTING_MODES = ["Select NFT", "Manual"] as const;
31+
2632
export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
2733
createText = "Create",
2834
type,
@@ -32,7 +38,13 @@ export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
3238
}) => {
3339
const address = useActiveAccount()?.address;
3440
const [open, setOpen] = useState(false);
35-
41+
const [listingMode, setListingMode] =
42+
useState<(typeof LISTING_MODES)[number]>("Select NFT");
43+
const isSupportedChain =
44+
contract.chain.id &&
45+
(isSimpleHashSupported(contract.chain.id) ||
46+
isAlchemySupported(contract.chain.id) ||
47+
isMoralisSupported(contract.chain.id));
3648
return (
3749
<ListerOnly contract={contract}>
3850
<Sheet open={open} onOpenChange={setOpen}>
@@ -43,15 +55,47 @@ export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
4355
</SheetTrigger>
4456
<SheetContent className="w-full overflow-y-auto sm:min-w-[540px] lg:min-w-[700px]">
4557
<SheetHeader>
46-
<SheetTitle className="mb-5 text-left">{createText}</SheetTitle>
58+
<SheetTitle className="mb-3 text-left">{createText}</SheetTitle>
4759
</SheetHeader>
48-
<CreateListingsForm
49-
twAccount={twAccount}
50-
contract={contract}
51-
type={type}
52-
actionText={createText}
53-
setOpen={setOpen}
54-
/>
60+
{/*
61+
If the chain is not supported by the indexer providers
62+
we don't show the tabs, we only show the Manual input form.
63+
Otherwise we show both */}
64+
{isSupportedChain ? (
65+
<>
66+
<TabButtons
67+
tabs={LISTING_MODES.map((mode) => ({
68+
name: mode,
69+
isActive: mode === listingMode,
70+
onClick: () => setListingMode(mode),
71+
isEnabled: true,
72+
}))}
73+
tabClassName="text-sm gap-2 !text-sm"
74+
tabContainerClassName="gap-0.5"
75+
/>
76+
<div className="mt-5">
77+
<CreateListingsForm
78+
twAccount={twAccount}
79+
contract={contract}
80+
type={type}
81+
actionText={createText}
82+
setOpen={setOpen}
83+
mode={listingMode === "Select NFT" ? "automatic" : "manual"}
84+
/>
85+
</div>
86+
</>
87+
) : (
88+
<div className="mt-5">
89+
<CreateListingsForm
90+
twAccount={twAccount}
91+
contract={contract}
92+
type={type}
93+
actionText={createText}
94+
setOpen={setOpen}
95+
mode="manual"
96+
/>
97+
</div>
98+
)}
5599
</SheetContent>
56100
</Sheet>
57101
</ListerOnly>

0 commit comments

Comments
 (0)