Skip to content

Commit 99fd761

Browse files
committed
fix dark mode inconsistencies
1 parent ba461b4 commit 99fd761

File tree

6 files changed

+28
-33
lines changed

6 files changed

+28
-33
lines changed

app/src/client/app/AccountPage.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import { TierIds } from '@wasp/shared/constants';
77
export default function AccountPage({ user }: { user: User }) {
88
return (
99
<div className='mt-10 px-6'>
10-
<div className='overflow-hidden bg-white ring-1 ring-gray-900/10 shadow-lg sm:rounded-lg lg:m-8 '>
10+
<div className='overflow-hidden border border-gray-900/10 shadow-lg sm:rounded-lg lg:m-8 dark:border-gray-100/10'>
1111
<div className='px-4 py-5 sm:px-6 lg:px-8'>
1212
<h3 className='text-base font-semibold leading-6 text-gray-900'>Account Information</h3>
1313
</div>
14-
<div className='border-t border-gray-200 px-4 py-5 sm:p-0'>
15-
<dl className='sm:divide-y sm:divide-gray-200'>
14+
<div className='border-t border-gray-900/10 dark:border-gray-100/10 px-4 py-5 sm:p-0'>
15+
<dl className='sm:divide-y sm:divide-gray-900/10 sm:dark:divide-gray-100/10'>
1616
{!!user.email && (
1717
<div className='py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6'>
1818
<dt className='text-sm font-medium text-gray-500 dark:text-white'>Email address</dt>
@@ -22,7 +22,9 @@ export default function AccountPage({ user }: { user: User }) {
2222
{!!user.username && (
2323
<div className='py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6'>
2424
<dt className='text-sm font-medium text-gray-500 dark:text-white'>Username</dt>
25-
<dd className='mt-1 text-sm text-gray-900 dark:text-gray-400 sm:col-span-2 sm:mt-0'>{user.username}</dd>
25+
<dd className='mt-1 text-sm text-gray-900 dark:text-gray-400 sm:col-span-2 sm:mt-0'>
26+
{user.username}
27+
</dd>
2628
</div>
2729
)}
2830
<div className='py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6'>
@@ -50,8 +52,10 @@ export default function AccountPage({ user }: { user: User }) {
5052
)}
5153
</div>
5254
<div className='py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6'>
53-
<dt className='text-sm font-medium text-gray-500'>About</dt>
54-
<dd className='mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0'>I'm a cool customer.</dd>
55+
<dt className='text-sm font-medium text-gray-500 dark:text-white'>About</dt>
56+
<dd className='mt-1 text-sm text-gray-900 dark:text-gray-400 sm:col-span-2 sm:mt-0'>
57+
I'm a cool customer.
58+
</dd>
5559
</div>
5660
</dl>
5761
</div>
@@ -85,7 +89,7 @@ function CustomerPortalButton() {
8589

8690
return (
8791
<div className='ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0'>
88-
<button onClick={handleClick} className={`font-medium text-sm text-indigo-600 hover:text-indigo-500`}>
92+
<button onClick={handleClick} className={`font-medium text-sm text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300`}>
8993
Manage Subscription
9094
</button>
9195
</div>

app/src/client/app/CheckoutPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ export default function CheckoutPage() {
3434
return (
3535
<div className='flex min-h-full flex-col justify-center mt-10 sm:px-6 lg:px-8'>
3636
<div className='sm:mx-auto sm:w-full sm:max-w-md'>
37-
<div className='bg-white text-black py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10'>
37+
<div className='py-8 px-4 shadow-xl ring-1 ring-gray-900/10 dark:ring-gray-100/10 sm:rounded-lg sm:px-10'>
3838
<h1>
3939
{paymentStatus === 'paid'
4040
? '🥳 Payment Successful!'
4141
: paymentStatus === 'canceled'
42-
? '😢 Payment Canceled'
43-
: paymentStatus === 'error' && '🙄 Payment Error'}
42+
? '😢 Payment Canceled'
43+
: paymentStatus === 'error' && '🙄 Payment Error'}
4444
</h1>
4545
{paymentStatus !== 'loading' && (
4646
<span className='text-center'>

app/src/client/app/DemoAppPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function DemoAppPage() {
2222
This example app uses OpenAI's chat completions with function calling to return a structured JSON object. Try it out, enter your day's tasks, and let AI do the rest!
2323
</p>
2424
{/* begin AI-powered Todo List */}
25-
<div className='my-8 border rounded-3xl border-gray-900/10'>
25+
<div className='my-8 border rounded-3xl border-gray-900/10 dark:border-gray-100/10'>
2626
<div className='sm:w-[90%] md:w-[70%] lg:w-[50%] py-10 px-6 mx-auto my-8 space-y-10'>
2727
<NewTaskForm handleCreateTask={createTask} />
2828
</div>

app/src/client/app/FileUploadPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export default function FileUploadPage() {
7474
</h2>
7575
</div>
7676
<p className='mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600 dark:text-white'>
77-
This is an example file upload page using AWS S3. Maybe your app needs this. Maybe it
78-
doesn't. But a lot of people asked for this feature, so here you go 🤝
77+
This is an example file upload page using AWS S3. Maybe your app needs this. Maybe it doesn't. But a lot of
78+
people asked for this feature, so here you go 🤝
7979
</p>
80-
<div className='my-8 border rounded-3xl border-gray-900/10'>
80+
<div className='my-8 border rounded-3xl border-gray-900/10 dark:border-gray-100/10'>
8181
<div className='space-y-10 my-10 py-8 px-4 mx-auto sm:max-w-lg'>
8282
<form onSubmit={handleUpload} className='flex flex-col gap-2'>
8383
<input
@@ -93,7 +93,7 @@ export default function FileUploadPage() {
9393
Upload
9494
</button>
9595
</form>
96-
<div className='border-b-2 border-gray-200'></div>
96+
<div className='border-b-2 border-gray-200 dark:border-gray-100/10'></div>
9797
<div className='space-y-4 col-span-full'>
9898
<h2 className='text-xl font-bold'>Uploaded Files</h2>
9999
{isFilesLoading && <p>Loading...</p>}

app/src/client/app/PricingPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const PricingPage = () => {
7575
key={tier.id}
7676
className={`relative flex flex-col ${
7777
tier.bestDeal ? 'ring-2' : 'ring-1 lg:mt-8'
78-
} grow justify-between rounded-3xl ring-gray-200 overflow-hidden p-8 xl:p-10`}
78+
} grow justify-between rounded-3xl ring-gray-900/10 dark:ring-gray-100/10 overflow-hidden p-8 xl:p-10`}
7979
>
8080
{tier.bestDeal && (
8181
<div className='absolute top-0 right-0 -z-10 w-full h-full transform-gpu blur-3xl' aria-hidden='true'>
@@ -95,7 +95,9 @@ const PricingPage = () => {
9595
</div>
9696
<p className='mt-4 text-sm leading-6 text-gray-600 dark:text-white'>{tier.description}</p>
9797
<p className='mt-6 flex items-baseline gap-x-1 dark:text-white'>
98-
<span className='text-4xl font-bold tracking-tight text-gray-900 dark:text-white'>{tier.priceMonthly}</span>
98+
<span className='text-4xl font-bold tracking-tight text-gray-900 dark:text-white'>
99+
{tier.priceMonthly}
100+
</span>
99101
<span className='text-sm font-semibold leading-6 text-gray-600 dark:text-white'>/month</span>
100102
</p>
101103
<ul role='list' className='mt-8 space-y-3 text-sm leading-6 text-gray-600 dark:text-white'>

app/src/client/components/AppNavBar.tsx

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ export default function AppNavBar() {
2828

2929
const { data: user, isLoading: isUserLoading } = useAuth();
3030
return (
31-
<header className='absolute inset-x-0 top-0 z-50 shadow sticky bg-white bg-opacity-50 backdrop-blur-lg backdrop-filter dark:border-strokedark dark:bg-boxdark-2'>
32-
<nav
33-
className='flex items-center justify-between p-6 lg:px-8'
34-
aria-label='Global'
35-
>
31+
<header className='absolute inset-x-0 top-0 z-50 shadow sticky bg-white bg-opacity-50 backdrop-blur-lg backdrop-filter dark:border dark:border-gray-100/10 dark:bg-boxdark-2'>
32+
<nav className='flex items-center justify-between p-6 lg:px-8' aria-label='Global'>
3633
<div className='flex lg:flex-1'>
3734
<a href='/' className='-m-1.5 p-1.5'>
3835
<img className='h-8 w-8' src={logo} alt='My SaaS App' />
@@ -65,10 +62,7 @@ export default function AppNavBar() {
6562
</ul>
6663

6764
{isUserLoading ? null : !user ? (
68-
<a
69-
href={!user ? '/login' : '/account'}
70-
className='text-sm font-semibold leading-6 ml-4'
71-
>
65+
<a href={!user ? '/login' : '/account'} className='text-sm font-semibold leading-6 ml-4'>
7266
<div className='flex items-center duration-300 ease-in-out text-gray-900 hover:text-yellow-500 dark:text-white'>
7367
Log in <BiLogIn size='1.1rem' className='ml-1 mt-[0.1rem]' />
7468
</div>
@@ -80,12 +74,7 @@ export default function AppNavBar() {
8074
)}
8175
</div>
8276
</nav>
83-
<Dialog
84-
as='div'
85-
className='lg:hidden'
86-
open={mobileMenuOpen}
87-
onClose={setMobileMenuOpen}
88-
>
77+
<Dialog as='div' className='lg:hidden' open={mobileMenuOpen} onClose={setMobileMenuOpen}>
8978
<div className='fixed inset-0 z-50' />
9079
<Dialog.Panel className='fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white dark:text-white dark:bg-boxdark px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10'>
9180
<div className='flex items-center justify-between'>
@@ -124,7 +113,7 @@ export default function AppNavBar() {
124113
</div>
125114
</Link>
126115
) : (
127-
<UserMenuItems user={user} setMobileMenuOpen={setMobileMenuOpen}/>
116+
<UserMenuItems user={user} setMobileMenuOpen={setMobileMenuOpen} />
128117
)}
129118
</div>
130119
</div>

0 commit comments

Comments
 (0)