Skip to content

Commit 885c019

Browse files
committed
feat(ui): refresh shadcn, Base UI button fixes, portal dark-only
- Regenerate @atl/ui; inline buttonVariants; remove button-variants; add use-mobile - Skip oxlint/lint-staged for packages/ui via ignorePatterns and lint-staged prefix - Portal: DonateCtaSections; forcedTheme dark; remove theme toggle - Web/portal: nativeButton={false} for Button+Link; contribute layout classes on Button - Align components.json/tsconfig; update pnpm-lock Made-with: Cursor
1 parent 2657080 commit 885c019

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+863
-873
lines changed

.oxlintrc.json

Lines changed: 32 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
"apps/web/.wrangler/**",
1818
"apps/portal/references/**",
1919
"apps/portal/drizzle/**",
20-
"apps/portal/.cursor/skills/**"
20+
"apps/portal/.cursor/skills/**",
21+
"packages/ui/**",
2122
],
2223
"extends": [
2324
"./node_modules/ultracite/config/oxlint/core/.oxlintrc.json",
2425
"./node_modules/ultracite/config/oxlint/react/.oxlintrc.json",
25-
"./node_modules/ultracite/config/oxlint/next/.oxlintrc.json"
26+
"./node_modules/ultracite/config/oxlint/next/.oxlintrc.json",
2627
],
2728
"rules": {
2829
"import/no-namespace": "error",
@@ -36,7 +37,7 @@
3637
"no-use-before-define": "off",
3738
"typescript/no-explicit-any": "off",
3839
"promise/prefer-await-to-callbacks": "off",
39-
"typescript/no-non-null-assertion": "off"
40+
"typescript/no-non-null-assertion": "off",
4041
},
4142
"overrides": [
4243
{
@@ -49,11 +50,11 @@
4950
"apps/portal/src/shared/api/index.ts",
5051
"apps/portal/src/shared/types/api.ts",
5152
"apps/portal/src/app/metadata.ts",
52-
"apps/portal/src/features/integrations/lib/xmpp/index.ts"
53+
"apps/portal/src/features/integrations/lib/xmpp/index.ts",
5354
],
5455
"rules": {
55-
"oxc/no-barrel-file": "off"
56-
}
56+
"oxc/no-barrel-file": "off",
57+
},
5758
},
5859
{
5960
"files": [
@@ -69,11 +70,11 @@
6970
"apps/portal/src/components/layout/index.ts",
7071
"apps/portal/src/components/layout/header/index.ts",
7172
"apps/portal/src/components/layout/navigation/index.ts",
72-
"apps/portal/src/shared/config/index.ts"
73+
"apps/portal/src/shared/config/index.ts",
7374
],
7475
"rules": {
75-
"oxc/no-barrel-file": "off"
76-
}
76+
"oxc/no-barrel-file": "off",
77+
},
7778
},
7879
{
7980
"files": [
@@ -83,18 +84,18 @@
8384
"apps/portal/src/features/**/unreal/client.ts",
8485
"apps/portal/src/features/**/components/*.tsx",
8586
"apps/portal/src/app/**/integrations-content.tsx",
86-
"apps/portal/src/sentry.*.ts"
87+
"apps/portal/src/sentry.*.ts",
8788
],
8889
"rules": {
89-
"import/no-namespace": "off"
90-
}
90+
"import/no-namespace": "off",
91+
},
9192
},
9293
{
9394
"files": ["apps/web/**/*.{ts,tsx}"],
9495
"rules": {
9596
"unicorn/filename-case": "off",
96-
"react/jsx-handler-names": "off"
97-
}
97+
"react/jsx-handler-names": "off",
98+
},
9899
},
99100
{
100101
"files": ["apps/web/src/components/mdx-components.tsx"],
@@ -104,68 +105,50 @@
104105
"jsx-a11y/heading-has-content": "off",
105106
"react/no-react-children": "off",
106107
"no-nested-ternary": "off",
107-
"unicorn/no-nested-ternary": "off"
108-
}
108+
"unicorn/no-nested-ternary": "off",
109+
},
109110
},
110111
{
111112
"files": ["apps/web/scripts/**/*.mjs"],
112113
"rules": {
113114
"import/no-namespace": "off",
114-
"no-param-reassign": "off"
115-
}
115+
"no-param-reassign": "off",
116+
},
116117
},
117118
{
118119
"files": ["apps/portal/src/features/auth/lib/localization.ts"],
119120
"rules": {
120-
"sort-keys": "off"
121-
}
121+
"sort-keys": "off",
122+
},
122123
},
123124
{
124125
"files": [
125-
"apps/portal/src/features/integrations/lib/**/implementation.ts"
126+
"apps/portal/src/features/integrations/lib/**/implementation.ts",
126127
],
127128
"rules": {
128-
"class-methods-use-this": "off"
129-
}
129+
"class-methods-use-this": "off",
130+
},
130131
},
131132
{
132133
"files": [
133134
"apps/portal/packages/schemas/**/*.ts",
134-
"apps/portal/src/app/**/integrations-content.tsx"
135+
"apps/portal/src/app/**/integrations-content.tsx",
135136
],
136137
"rules": {
137-
"unicorn/no-useless-undefined": "off"
138-
}
138+
"unicorn/no-useless-undefined": "off",
139+
},
139140
},
140141
{
141142
"files": ["apps/portal/tests/monorepo/monorepo-correctness.test.ts"],
142143
"rules": {
143-
"unicorn/consistent-function-scoping": "off"
144-
}
144+
"unicorn/consistent-function-scoping": "off",
145+
},
145146
},
146147
{
147148
"files": ["apps/portal/tests/**/*.test.ts"],
148-
"rules": {
149-
"import/no-namespace": "off"
150-
}
151-
},
152-
{
153-
"files": ["packages/ui/**/*.{ts,tsx}"],
154149
"rules": {
155150
"import/no-namespace": "off",
156-
"jsx-a11y/label-has-associated-control": "off",
157-
"unicorn/no-document-cookie": "off",
158-
"react/button-has-type": "off",
159-
"no-nested-ternary": "off",
160-
"unicorn/no-nested-ternary": "off",
161-
"jsx-a11y/prefer-tag-over-role": "off",
162-
"jsx-a11y/click-events-have-key-events": "off",
163-
"react/jsx-no-constructed-context-values": "off",
164-
"react/no-clone-element": "off",
165-
"react/no-react-children": "off",
166-
"no-negated-condition": "off",
167-
"jsx-a11y/anchor-has-content": "off"
168-
}
169-
}
170-
]
151+
},
152+
},
153+
],
171154
}

apps/portal/src/app/(dashboard)/app/app-error.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ export default function AppError({
6363
<Button onClick={reset} variant="default">
6464
{t("retry")}
6565
</Button>
66-
<Button render={<Link href="/app" />} variant="outline">
66+
<Button
67+
nativeButton={false}
68+
render={<Link href="/app" />}
69+
variant="outline"
70+
>
6771
{t("backToDashboard")}
6872
</Button>
6973
</CardFooter>
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
"use client";
2+
3+
import { Button } from "@atl/ui/components/button";
4+
import {
5+
Card,
6+
CardContent,
7+
CardDescription,
8+
CardHeader,
9+
CardTitle,
10+
} from "@atl/ui/components/card";
11+
import { BarChart3, BookOpen, Code, MessageSquare, Users } from "lucide-react";
12+
import Link from "next/link";
13+
import {
14+
SiBitcoin,
15+
SiCashapp,
16+
SiOpencollective,
17+
SiPaypal,
18+
SiStripe,
19+
} from "react-icons/si";
20+
21+
import { DONATION_OPTIONS } from "@/config/donate";
22+
23+
const DONATION_ICON_MAP: Record<
24+
string,
25+
React.ComponentType<{ className?: string }>
26+
> = {
27+
cashapp: SiCashapp,
28+
"every-org": SiBitcoin,
29+
opencollective: SiOpencollective,
30+
paypal: SiPaypal,
31+
"stripe-monthly": SiStripe,
32+
"stripe-onetime": SiStripe,
33+
};
34+
35+
const linkButtonClass = "inline-flex w-full items-center justify-center gap-2";
36+
37+
export function DonateCtaSections() {
38+
return (
39+
<>
40+
<Card className="border-2 transition-shadow hover:shadow-lg">
41+
<CardHeader>
42+
<div className="mb-2 flex items-center gap-3">
43+
<div className="rounded-lg bg-green-500/10 p-2">
44+
<BarChart3 className="size-6 text-green-600 dark:text-green-500" />
45+
</div>
46+
<CardTitle className="text-xl sm:text-2xl">
47+
Donate financially
48+
</CardTitle>
49+
</div>
50+
<CardDescription className="text-base">
51+
Your donations help us maintain infrastructure, run events, and grow
52+
our community.
53+
</CardDescription>
54+
</CardHeader>
55+
<CardContent>
56+
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">
57+
{DONATION_OPTIONS.map((option) => {
58+
const Icon = DONATION_ICON_MAP[option.id];
59+
return (
60+
<Button
61+
className={linkButtonClass}
62+
key={option.id}
63+
nativeButton={false}
64+
render={
65+
<a
66+
aria-label={option.name}
67+
href={option.href}
68+
rel="noopener noreferrer"
69+
target="_blank"
70+
/>
71+
}
72+
size="default"
73+
variant={
74+
option.id === "opencollective" ? "default" : "outline"
75+
}
76+
>
77+
{Icon && <Icon className="size-4 shrink-0" />}
78+
<span>{option.name}</span>
79+
</Button>
80+
);
81+
})}
82+
</div>
83+
</CardContent>
84+
</Card>
85+
86+
<div className="grid gap-4 sm:grid-cols-2">
87+
<Card className="flex flex-col border-2 transition-shadow hover:shadow-lg">
88+
<CardHeader className="flex-1">
89+
<div className="mb-2 flex items-center gap-3">
90+
<div className="rounded-lg bg-purple-500/10 p-2">
91+
<Users className="size-6 text-purple-600 dark:text-purple-500" />
92+
</div>
93+
<CardTitle className="text-lg">Volunteer your time</CardTitle>
94+
</div>
95+
<CardDescription>
96+
Join our team and help manage the community, create content, and
97+
organize events.
98+
</CardDescription>
99+
</CardHeader>
100+
<CardContent className="mt-auto">
101+
<Button
102+
className={linkButtonClass}
103+
nativeButton={false}
104+
render={<Link href="/app/connect" />}
105+
size="lg"
106+
variant="outline"
107+
>
108+
<Users className="size-4" />
109+
Connect with us
110+
</Button>
111+
</CardContent>
112+
</Card>
113+
114+
<Card className="flex flex-col border-2 transition-shadow hover:shadow-lg">
115+
<CardHeader className="flex-1">
116+
<div className="mb-2 flex items-center gap-3">
117+
<div className="rounded-lg bg-cyan-500/10 p-2">
118+
<BookOpen className="size-6 text-cyan-600 dark:text-cyan-500" />
119+
</div>
120+
<CardTitle className="text-lg">
121+
Contribute your knowledge
122+
</CardTitle>
123+
</div>
124+
<CardDescription>
125+
Share your knowledge by contributing, editing or writing articles
126+
and guides.
127+
</CardDescription>
128+
</CardHeader>
129+
<CardContent className="mt-auto">
130+
<Button
131+
className={linkButtonClass}
132+
nativeButton={false}
133+
render={
134+
<a
135+
aria-label="Visit wiki at wiki.atl.dev"
136+
href="https://wiki.atl.dev"
137+
rel="noopener noreferrer"
138+
target="_blank"
139+
/>
140+
}
141+
size="lg"
142+
variant="outline"
143+
>
144+
<BookOpen className="size-4" />
145+
Visit Wiki
146+
</Button>
147+
</CardContent>
148+
</Card>
149+
150+
<Card className="flex flex-col border-2 transition-shadow hover:shadow-lg">
151+
<CardHeader className="flex-1">
152+
<div className="mb-2 flex items-center gap-3">
153+
<div className="rounded-lg bg-blue-500/10 p-2">
154+
<Code className="size-6 text-blue-600 dark:text-blue-500" />
155+
</div>
156+
<CardTitle className="text-lg">Contribute your code</CardTitle>
157+
</div>
158+
<CardDescription>
159+
Help us build and improve our open-source projects and
160+
infrastructure.
161+
</CardDescription>
162+
</CardHeader>
163+
<CardContent className="mt-auto">
164+
<Button
165+
className={linkButtonClass}
166+
nativeButton={false}
167+
render={
168+
<a
169+
aria-label="View All Things Linux on GitHub"
170+
href="https://github.com/allthingslinux"
171+
rel="noopener noreferrer"
172+
target="_blank"
173+
/>
174+
}
175+
size="lg"
176+
variant="outline"
177+
>
178+
<Code className="size-4" />
179+
View on GitHub
180+
</Button>
181+
</CardContent>
182+
</Card>
183+
184+
<Card className="flex flex-col border-2 transition-shadow hover:shadow-lg">
185+
<CardHeader className="flex-1">
186+
<div className="mb-2 flex items-center gap-3">
187+
<div className="rounded-lg bg-orange-500/10 p-2">
188+
<MessageSquare className="size-6 text-orange-600 dark:text-orange-500" />
189+
</div>
190+
<CardTitle className="text-lg">Help and support</CardTitle>
191+
</div>
192+
<CardDescription>
193+
Help others learn Linux, answer questions, and share your
194+
knowledge in our community.
195+
</CardDescription>
196+
</CardHeader>
197+
<CardContent className="mt-auto">
198+
<Button
199+
className={linkButtonClass}
200+
nativeButton={false}
201+
render={<Link href="/app/connect" />}
202+
size="lg"
203+
variant="outline"
204+
>
205+
<MessageSquare className="size-4" />
206+
Join our community
207+
</Button>
208+
</CardContent>
209+
</Card>
210+
</div>
211+
</>
212+
);
213+
}

0 commit comments

Comments
 (0)