Skip to content

Commit 2cc4eb7

Browse files
authored
Minor UI fixes. (#90)
* fix: correct attribute name for script tag in code generator * refactor: improve account deletion UI * fix: correct placement of callout tag * fix: update icon color for API key creation button
1 parent 5080113 commit 2cc4eb7

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

apps/dashboard/app/(main)/settings/_components/account-deletion.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { Separator } from '@/components/ui/separator';
3939
const formSchema = z.object({
4040
email: z.string().email('Please enter a valid email address'),
4141
password: z.string().min(1, 'Password is required'),
42-
confirmText: z.literal('DELETE'),
42+
confirmText: z.string().min(1, 'Please type "DELETE" to confirm'),
4343
});
4444

4545
export function AccountDeletion() {
@@ -53,7 +53,7 @@ export function AccountDeletion() {
5353
defaultValues: {
5454
email: '',
5555
password: '',
56-
confirmText: 'DELETE',
56+
confirmText: '',
5757
},
5858
});
5959

@@ -105,11 +105,11 @@ export function AccountDeletion() {
105105
Account Deletion
106106
</h3>
107107
</div>
108-
<p className="text-slate-300 text-sm">
108+
<p className="text-slate-700 text-sm">
109109
Deleting your account will remove all your data and cannot be
110110
reversed after the grace period.
111111
</p>
112-
<div className="mt-1 hidden text-slate-400 text-xs italic md:block">
112+
<div className="mt-1 hidden text-slate-600 text-xs italic md:block">
113113
A 30-day recovery window will be available before permanent
114114
deletion.
115115
</div>
@@ -126,13 +126,16 @@ export function AccountDeletion() {
126126
</Button>
127127
</AlertDialogTrigger>
128128
<AlertDialogContent className="max-w-xl border border-red-900/30 bg-slate-950">
129-
<div className="-top-12 -translate-x-1/2 absolute left-1/2 transform rounded-full bg-red-500 p-3 text-white">
130-
<WarningIcon className="h-6 w-6" size={24} weight="duotone" />
131-
</div>
132-
133129
<AlertDialogHeader className="pt-6">
134130
<AlertDialogTitle className="text-center text-red-400 text-xl">
135-
Delete Your Account
131+
<div className="flex items-center justify-center gap-2 rounded-full bg-red-500 p-2 text-white">
132+
<WarningIcon
133+
className="h-6 w-6 bg-red-500 text-white"
134+
size={24}
135+
weight="duotone"
136+
/>
137+
Delete Your Account
138+
</div>
136139
</AlertDialogTitle>
137140
<AlertDialogDescription className="text-center text-slate-300">
138141
This action will schedule your account for deletion after a
@@ -255,12 +258,12 @@ export function AccountDeletion() {
255258
)}
256259
/>
257260

258-
<AlertDialogFooter className="gap-3 pt-2 sm:gap-0">
259-
<AlertDialogCancel className="mt-0 border-slate-700 bg-transparent text-slate-300 hover:bg-slate-800 hover:text-white">
261+
<AlertDialogFooter className="gap-0 sm:gap-3">
262+
<AlertDialogCancel className="border-slate-700 bg-transparent text-slate-300 hover:bg-slate-800 hover:text-white">
260263
Cancel
261264
</AlertDialogCancel>
262265
<Button
263-
className="border-red-600 bg-red-700 text-white hover:bg-red-600"
266+
className="border-red-600 bg-red-700 text-white hover:bg-red-800"
264267
disabled={isLoading}
265268
type="submit"
266269
variant="destructive"

apps/dashboard/app/(main)/websites/[id]/_components/utils/code-generators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function generateScriptTag(
3939
return `<script
4040
src="${scriptUrl}"
4141
data-client-id="${websiteId}"
42-
${optionsLine} crossOrigin="anonymous"
42+
${optionsLine} crossorigin="anonymous"
4343
async
4444
></script>`;
4545
}

apps/dashboard/components/organizations/api-key-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export function ApiKeyList({
221221
Create your first API key to start integrating with our platform.
222222
</div>
223223
<Button onClick={onCreateNew} type="button">
224-
<PlusIcon className="mr-2 h-4 w-4 not-dark:text-primary" />
224+
<PlusIcon className="mr-2 h-4 w-4 not-dark:text-white" />
225225
Create Your First Key
226226
</Button>
227227
</div>

apps/docs/content/docs/getting-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ Check that analytics are working correctly:
201201
data-batch-size="10"
202202
async
203203
></script>
204+
```
204205

205206
<Callout type="info">
206207
**Security**: All tracking scripts automatically include
207-
`crossOrigin="anonymous"` for enhanced security.
208+
`crossorigin="anonymous"` for enhanced security.
208209
</Callout>
209-
```
210210

211211
</Tab>
212212
</Tabs>

0 commit comments

Comments
 (0)