Skip to content

Commit 7828afb

Browse files
committed
Portal: UI tweaks
1 parent 746afa3 commit 7828afb

File tree

19 files changed

+184
-186
lines changed

19 files changed

+184
-186
lines changed

apps/portal/src/app/Header.tsx

Lines changed: 46 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export function Header() {
213213
const pathname = usePathname();
214214

215215
return (
216-
<header className="flex w-full flex-col gap-2 border-b bg-background p-4 xl:pb-0 lg:px-8 overflow-hidden">
216+
<header className="flex w-full flex-col gap-2 border-b p-4 xl:pb-0 lg:px-8 lg:pt-5 overflow-hidden bg-card">
217217
{/* Top row */}
218218
<div className="container flex items-center justify-between gap-6">
219219
<div className="flex items-center gap-2">
@@ -230,7 +230,7 @@ export function Header() {
230230
</Link>
231231
</div>
232232

233-
<div className="flex items-center gap-3">
233+
<div className="flex items-center gap-4">
234234
<div className="hidden xl:block">
235235
<Link
236236
className="text-foreground"
@@ -269,13 +269,13 @@ export function Header() {
269269
</div>
270270

271271
{/* Bottom row - hidden on mobile */}
272-
<div className="container hidden items-center justify-between gap-6 xl:flex mt-1">
272+
<div className="container hidden items-start justify-between gap-6 xl:flex mt-1">
273273
<nav className="flex grow gap-5">
274-
<ul className="flex flex-row items-center gap-0 mb-1">
274+
<ul className="flex flex-row items-center gap-0 mb-1.5">
275275
{links.map((link) => {
276276
return (
277277
<li
278-
className="flex items-center py-2 relative px-2.5 hover:text-foreground"
278+
className="flex items-center relative"
279279
key={link.href}
280280
onClick={() => {
281281
setShowBurgerMenu(false);
@@ -284,57 +284,51 @@ export function Header() {
284284
setShowBurgerMenu(false);
285285
}}
286286
>
287-
<NavLink href={link.href} name={link.name} />
287+
<NavLink
288+
href={link.href}
289+
name={link.name}
290+
className="py-2.5 px-3 hover:bg-accent rounded-lg hover:text-foreground font-normal"
291+
/>
288292
{pathname?.startsWith(link.href) && (
289-
<div className="bg-violet-700 h-[2px] inset-x-0 rounded-full absolute -bottom-1" />
293+
<div className="bg-foreground h-[2px] inset-x-0 rounded-full absolute -bottom-1.5" />
290294
)}
291295
</li>
292296
);
293297
})}
294298
</ul>
295299
</nav>
296300

297-
<div className="flex items-center gap-3">
298-
<div className="px-1">
299-
<DropdownLinks
300-
category="AI"
301-
links={aiLinks}
302-
onLinkClick={() => setShowBurgerMenu(false)}
303-
/>
304-
</div>
305-
<div className="px-1">
306-
<DropdownLinks
307-
category="SDKs"
308-
links={sdkLinks}
309-
onLinkClick={() => setShowBurgerMenu(false)}
310-
/>
311-
</div>
312-
<div className="px-1">
313-
<DropdownLinks
314-
category="APIs"
315-
links={apisLinks}
316-
onLinkClick={() => setShowBurgerMenu(false)}
317-
/>
318-
</div>
319-
320-
<div className="px-1">
321-
<DropdownLinks
322-
category="Tools"
323-
links={toolLinks}
324-
onLinkClick={() => setShowBurgerMenu(false)}
325-
/>
326-
</div>
301+
<div className="flex items-center">
302+
<DropdownLinks
303+
category="AI"
304+
links={aiLinks}
305+
onLinkClick={() => setShowBurgerMenu(false)}
306+
/>
307+
<DropdownLinks
308+
category="SDKs"
309+
links={sdkLinks}
310+
onLinkClick={() => setShowBurgerMenu(false)}
311+
/>
312+
<DropdownLinks
313+
category="APIs"
314+
links={apisLinks}
315+
onLinkClick={() => setShowBurgerMenu(false)}
316+
/>
327317

328-
<div className="px-1">
329-
<DropdownLinks
330-
category="Support"
331-
links={supportLinks}
332-
onLinkClick={() => setShowBurgerMenu(false)}
333-
/>
334-
</div>
318+
<DropdownLinks
319+
category="Tools"
320+
links={toolLinks}
321+
onLinkClick={() => setShowBurgerMenu(false)}
322+
/>
323+
<DropdownLinks
324+
category="Support"
325+
links={supportLinks}
326+
onLinkClick={() => setShowBurgerMenu(false)}
327+
/>
335328

336329
<NavLink
337330
href="/changelog"
331+
className="px-3 py-2.5 hover:bg-accent hover:text-foreground rounded-lg"
338332
name="Changelog"
339333
onClick={() => {
340334
setShowBurgerMenu(false);
@@ -448,31 +442,29 @@ function DropdownLinks(props: {
448442
<DropdownMenu>
449443
<DropdownMenuTrigger asChild>
450444
<Button
451-
className="inline-flex items-center gap-1 p-0 font-medium text-muted-foreground text-sm hover:bg-transparent hover:text-foreground"
445+
className="inline-flex items-center gap-1.5 font-normal text-muted-foreground text-sm hover:bg-accent hover:text-foreground rounded-lg px-3 py-2.5"
452446
variant="ghost"
453447
>
454448
{props.category}
455-
<ChevronDownIcon className="size-4 text-muted-foreground opacity-70" />
449+
<ChevronDownIcon className="size-3.5 text-muted-foreground opacity-70" />
456450
</Button>
457451
</DropdownMenuTrigger>
458452

459453
<DropdownMenuContent
460-
className="flex flex-col gap-1 bg-card p-3"
461-
style={{
462-
minWidth: "150px",
463-
}}
454+
className="flex flex-col gap-1 bg-card p-1 rounded-xl min-w-[200px]"
455+
sideOffset={14}
464456
>
465457
{props.links.map((info) => {
466458
return (
467459
<DropdownMenuItem asChild key={info.name}>
468460
<div
469461
className={clsx(
470-
"relative flex cursor-pointer gap-2 font-medium text-foreground",
462+
"relative flex cursor-pointer gap-3 font-medium text-foreground !rounded-lg px-3 py-2",
471463
"hover:bg-accent",
472464
)}
473465
>
474466
{info.icon && (
475-
<info.icon className="size-5 text-foreground" />
467+
<info.icon className="size-5 text-muted-foreground" />
476468
)}
477469
<Link
478470
className="before:absolute before:inset-0"
@@ -524,6 +516,7 @@ function NavLink(props: {
524516
name: string;
525517
onClick?: () => void;
526518
icon?: React.FC<{ className?: string }>;
519+
className?: string;
527520
}) {
528521
const pathname = usePathname();
529522
return (
@@ -534,6 +527,7 @@ function NavLink(props: {
534527
? "text-foreground"
535528
: "text-muted-foreground",
536529
props.icon ? "flex flex-row gap-3" : "",
530+
props.className,
537531
)}
538532
href={props.href}
539533
onClick={props.onClick}

apps/portal/src/app/transactions/page.mdx

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ Send, monitor, and manage transactions. Send transactions from user or server wa
7070
- For user wallets in React applications that use the SDK, you can obtain the user wallet auth token (JWT) with the [`useAuthToken()`](/references/typescript/v5/useAuthToken) hook.
7171
- For user wallets in TypeScript applications, you can get it by calling `wallet.getAuthToken()` on a connected [`inAppWallet()`](/references/typescript/v5/inAppWallet) or [`ecosystemWallet()`](/references/typescript/v5/ecosystemWallet).
7272

73-
<OpenApiEndpoint path="/v1/transactions" method="POST" />
73+
<OpenApiEndpoint path="/v1/transactions" method="POST" />
7474

75-
</TabsContent>
75+
</TabsContent>
7676

7777
<TabsContent value="typescript">
7878
### Installation
@@ -425,47 +425,47 @@ Send, monitor, and manage transactions. Send transactions from user or server wa
425425
2. Enter your Client ID from the thirdweb dashboard
426426
3. Allowlist your game's Bundle ID on the thirdweb dashboard for security
427427

428-
### Send a Transaction
429-
430-
Create a new script to manage transactions:
431-
432-
```csharp
433-
using Thirdweb;
434-
using UnityEngine;
435-
using UnityEngine.UI;
436-
437-
public class TransactionManager : MonoBehaviour
438-
{
439-
private ThirdwebSDK sdk;
440-
public Text walletAddressText;
441-
public Button sendButton;
442-
443-
void Start()
444-
{
445-
// Client ID is set in Project Settings > Thirdweb
446-
sdk = new ThirdwebSDK("ethereum"); // Or any supported chain
447-
sendButton.onClick.AddListener(SendTransaction);
448-
}
449-
450-
public async void SendTransaction()
451-
{
452-
try {
453-
var contract = await ThirdwebManager.Instance.GetContract(
454-
address: "contract-address",
455-
chainId: 1,
456-
abi: "optional-abi"
457-
);
458-
459-
// Send a transaction
460-
var receipt = await contract.Write(wallet, contract, "transfer", weiValue, toAddress, amount);
461-
Debug.Log($"Transaction receipt: {receipt}");
462-
}
463-
catch (System.Exception e) {
464-
Debug.LogError("Error sending transaction: " + e.Message);
465-
}
466-
}
467-
}
468-
```
428+
### Send a Transaction
429+
430+
Create a new script to manage transactions:
431+
432+
```csharp
433+
using Thirdweb;
434+
using UnityEngine;
435+
using UnityEngine.UI;
436+
437+
public class TransactionManager : MonoBehaviour
438+
{
439+
private ThirdwebSDK sdk;
440+
public Text walletAddressText;
441+
public Button sendButton;
442+
443+
void Start()
444+
{
445+
// Client ID is set in Project Settings > Thirdweb
446+
sdk = new ThirdwebSDK("ethereum"); // Or any supported chain
447+
sendButton.onClick.AddListener(SendTransaction);
448+
}
449+
450+
public async void SendTransaction()
451+
{
452+
try {
453+
var contract = await ThirdwebManager.Instance.GetContract(
454+
address: "contract-address",
455+
chainId: 1,
456+
abi: "optional-abi"
457+
);
458+
459+
// Send a transaction
460+
var receipt = await contract.Write(wallet, contract, "transfer", weiValue, toAddress, amount);
461+
Debug.Log($"Transaction receipt: {receipt}");
462+
}
463+
catch (System.Exception e) {
464+
Debug.LogError("Error sending transaction: " + e.Message);
465+
}
466+
}
467+
}
468+
```
469469

470470
</TabsContent>
471471

apps/portal/src/app/transactions/sponsor/page.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ Example sponsored contract write request:
103103

104104
</Tabs>
105105

106+
<div className='h-6' />
107+
106108
That's it! All transactions executed by the user will be sponsored via the thirdweb infrastructure.
107109

108110
</TabsContent>

apps/portal/src/components/AI/chat-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ export function ChatButton() {
2020
<>
2121
{/* Inline Button (not floating) */}
2222
<Button
23-
className="gap-2 rounded-full shadow-lg"
23+
className="gap-2 rounded-full bg-background"
2424
onClick={() => {
2525
setIsOpen(true);
2626
setHasBeenOpened(true);
2727
}}
28-
variant="default"
28+
variant="outline"
2929
>
30-
<MessageCircleIcon className="size-4" />
30+
<MessageCircleIcon className="size-4 text-muted-foreground" />
3131
Ask AI
3232
</Button>
3333

apps/portal/src/components/Document/AuthMethodsTabs.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from "@/icons";
1717
import { cn } from "@/lib/utils";
1818
import { CodeClient } from "../code/code.client";
19+
import { Button } from "../ui/button";
1920

2021
type AuthMethod =
2122
| "email"
@@ -849,25 +850,24 @@ function AuthMethodsTabsContent() {
849850
</h3>
850851
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3">
851852
{authMethods.map((method) => (
852-
<button
853+
<Button
853854
type="button"
855+
variant="outline"
854856
key={method.id}
855857
onClick={() => setSelectedAuth(method.id)}
856858
className={cn(
857-
"overflow-hidden text-ellipsis px-3 py-1.5 transition-colors duration-300 hover:text-foreground text-sm rounded-lg hover:bg-violet-800/15",
858-
selectedAuth === method.id
859-
? "font-medium text-foreground bg-violet-800/25 border border-violet-800"
860-
: "",
861-
"flex flex-row justify-start items-start gap-3",
859+
"overflow-hidden text-ellipsis text-sm rounded-lg hover:bg-accent justify-start gap-3 h-auto py-3 rounded-xl",
860+
selectedAuth === method.id &&
861+
"font-medium text-foreground bg-accent",
862862
)}
863863
>
864864
<img
865865
alt={method.label}
866866
className="size-5 shrink-0"
867867
src={getSocialIcon(method.id)}
868868
/>
869-
<div className="font-medium">{method.label}</div>
870-
</button>
869+
<div>{method.label}</div>
870+
</Button>
871871
))}
872872
</div>
873873
</div>

apps/portal/src/components/Document/Code.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export async function CodeBlock(props: {
7373
lang={lang}
7474
>
7575
<ScrollShadow
76-
className=""
7776
scrollableClassName={cn("p-4", props.scrollContainerClassName)}
77+
shadowColor="hsl(var(--card))"
7878
>
7979
<RenderCode code={code} lang={lang} tokenLinks={tokenLinks} />
8080
</ScrollShadow>

apps/portal/src/components/Document/DocLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function DocLink(props: {
1010
return (
1111
<Link
1212
className={cn(
13-
"underline decoration-violet-800 decoration-dotted underline-offset-[5px] transition-colors hover:decoration-violet-800 hover:decoration-solid hover:text-foreground",
13+
"text-blue-600 hover:text-blue-700 dark:text-blue-500 dark:hover:text-blue-400 decoration-dotted transition-colors ",
1414
props.className,
1515
)}
1616
href={props.href}

apps/portal/src/components/Document/Grid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function Grid(props: { children: React.ReactNode; className?: string }) {
44
return (
55
<div
66
className={cn(
7-
"my-4 grid gap-4 md:grid-cols-2 lg:grid-cols-3",
7+
"my-4 grid gap-3 md:grid-cols-2 lg:grid-cols-3",
88
props.className,
99
)}
1010
>

apps/portal/src/components/Document/InlineCode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function InlineCode(props: { code: string; className?: string }) {
44
return (
55
<code
66
className={cn(
7-
"max-h-20 rounded-md border bg-muted px-1.5 py-0.5 text-[0.875em]",
7+
"max-h-20 rounded-lg bg-muted border px-1.5 py-[3px] text-[0.875em]",
88
props.className,
99
)}
1010
style={{

0 commit comments

Comments
 (0)