Skip to content

Commit 375c748

Browse files
committed
support chat ui improvements
1 parent 833a4fc commit 375c748

File tree

9 files changed

+318
-296
lines changed

9 files changed

+318
-296
lines changed

apps/dashboard/src/@/lib/support-utils.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1+
type BadgeVariant =
2+
| "default"
3+
| "destructive"
4+
| "outline"
5+
| "secondary"
6+
| "success"
7+
| "warning";
8+
19
/**
210
* Shared utility functions for support ticket status handling
311
*/
412

513
/**
614
* Get the CSS classes for a support ticket status badge
715
*/
8-
export function getStatusColor(status: string | undefined): string {
9-
if (!status) {
10-
return "warning";
11-
}
12-
13-
switch (status.toLowerCase()) {
16+
export function getStatusColor(
17+
status: "needs_response" | "in_progress" | "on_hold" | "closed" | "resolved",
18+
): BadgeVariant {
19+
switch (status) {
1420
case "resolved":
21+
return "success";
1522
case "closed":
16-
return "border-muted text-muted-foreground bg-muted/10";
23+
return "outline";
1724
case "in_progress":
18-
return "border-destructive text-destructive bg-destructive/10";
25+
return "default";
1926
case "needs_response":
2027
return "warning";
2128
case "on_hold":
22-
return "border-secondary text-secondary-foreground bg-secondary/10";
29+
return "outline";
2330
default:
24-
return "warning";
31+
return "default";
2532
}
2633
}
2734

apps/dashboard/src/app/(app)/components/ThirdwebMiniLogo.tsx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,38 @@ function prefixId(id: string, prefix?: string) {
44
return prefix ? `${prefix}_${id}` : id;
55
}
66

7-
export function ThirdwebMiniLogo(props: { className?: string }) {
7+
export function ThirdwebMiniLogo(props: {
8+
className?: string;
9+
isMonoChrome?: boolean;
10+
}) {
811
const id = useId();
912
return (
1013
<svg className={props.className} fill="none" viewBox="0 0 516 321">
1114
<title>thirdweb</title>
1215
<g clipPath={`url(#${prefixId("clip0_3:35)", id)}`}>
1316
<path
1417
d="M1.40497 27.0011C-3.73633 14.022 5.84519 0 19.8669 0H106.919C115.098 0 122.342 4.86715 125.381 12.3996L194.671 185.299C196.541 189.935 196.541 195.149 194.671 199.901L151.087 308.484C144.427 325.056 120.823 325.056 114.163 308.484L1.40497 27.0011Z"
15-
fill={`url(#${prefixId("paint0_linear_3:35)", id)}`}
18+
fill={
19+
props.isMonoChrome
20+
? "currentColor"
21+
: `url(#${prefixId("paint0_linear_3:35)", id)}`
22+
}
1623
/>
1724
<path
1825
d="M169.547 26.4217C164.873 13.5585 174.454 0 188.242 0H264.077C272.49 0 279.968 5.2148 282.772 12.9791L345.753 185.879C347.272 190.166 347.272 194.918 345.753 199.321L307.894 303.27C301.585 320.652 276.813 320.652 270.503 303.27L169.547 26.4217Z"
19-
fill={`url(#${prefixId("paint1_linear_3:35)", id)}`}
26+
fill={
27+
props.isMonoChrome
28+
? "currentColor"
29+
: `url(#${prefixId("paint1_linear_3:35)", id)}`
30+
}
2031
/>
2132
<path
2233
d="M321.331 27.0011C316.19 14.022 325.771 0 339.793 0H426.845C435.024 0 442.269 4.86715 445.307 12.3996L514.597 185.299C516.467 189.935 516.467 195.149 514.597 199.901L471.013 308.484C464.353 325.056 440.75 325.056 434.089 308.484L321.331 27.0011Z"
23-
fill={`url(#${prefixId("paint2_linear_3:35)", id)}`}
34+
fill={
35+
props.isMonoChrome
36+
? "currentColor"
37+
: `url(#${prefixId("paint2_linear_3:35)", id)}`
38+
}
2439
/>
2540
</g>
2641
<defs>

0 commit comments

Comments
 (0)