Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

feat(extension): adopt the web's new dark mode styling (#3234)

Mohamed Bassemdfe3671f689f
diff --git a/apps/browser-extension/src/BookmarkSavedPage.tsx b/apps/browser-extension/src/BookmarkSavedPage.tsx
index dd4cc606..4ef06810 100644
--- a/apps/browser-extension/src/BookmarkSavedPage.tsx
+++ b/apps/browser-extension/src/BookmarkSavedPage.tsx
@@ -148,7 +148,7 @@ export default function BookmarkSavedPage() {
</div>
</Section>
<Section title="Lists">
- <div className="flex flex-col divide-y overflow-hidden rounded-lg border">
+ <div className="flex flex-col divide-y overflow-hidden rounded-lg border bg-card">
{/* The picker sits above the lists so adding one doesn't push it
(and its open dropdown) down. */}
<ListsSelector bookmarkId={bookmarkId} />
diff --git a/apps/browser-extension/src/OptionsPage.tsx b/apps/browser-extension/src/OptionsPage.tsx
index 708a5a15..a81e2362 100644
--- a/apps/browser-extension/src/OptionsPage.tsx
+++ b/apps/browser-extension/src/OptionsPage.tsx
@@ -296,7 +296,9 @@ function SettingsSection({
<h2 className="px-1 text-xs font-medium uppercase tracking-wide text-muted-foreground">
{title}
</h2>
- <div className="flex flex-col divide-y rounded-lg border">{children}</div>
+ <div className="flex flex-col divide-y rounded-lg border bg-card">
+ {children}
+ </div>
</section>
);
}
diff --git a/apps/browser-extension/src/ServerAddressPage.tsx b/apps/browser-extension/src/ServerAddressPage.tsx
index 64837d82..9552b35a 100644
--- a/apps/browser-extension/src/ServerAddressPage.tsx
+++ b/apps/browser-extension/src/ServerAddressPage.tsx
@@ -141,7 +141,7 @@ export default function ServerAddressPage() {
</div>
{headers.length > 0 && (
- <div className="flex max-h-48 flex-col divide-y overflow-y-auto rounded-lg border">
+ <div className="flex max-h-48 flex-col divide-y overflow-y-auto rounded-lg border bg-card">
{headers.map((header, index) => (
<div
key={index}
diff --git a/apps/browser-extension/src/components/TagList.tsx b/apps/browser-extension/src/components/TagList.tsx
index e8b78a84..33795789 100644
--- a/apps/browser-extension/src/components/TagList.tsx
+++ b/apps/browser-extension/src/components/TagList.tsx
@@ -26,7 +26,11 @@ export default function TagList({ bookmarkId }: { bookmarkId: string }) {
{tag.name}
</Badge>
) : (
- <Badge key={tag.id} variant="secondary" className="h-7 font-medium">
+ <Badge
+ key={tag.id}
+ variant="secondary"
+ className="h-7 font-medium dark:bg-input"
+ >
{tag.name}
</Badge>
),
diff --git a/apps/browser-extension/src/components/ui/button.tsx b/apps/browser-extension/src/components/ui/button.tsx
index f2e808c8..19deb41c 100644
--- a/apps/browser-extension/src/components/ui/button.tsx
+++ b/apps/browser-extension/src/components/ui/button.tsx
@@ -6,15 +6,15 @@ import { cva } from "class-variance-authority";
import { cn } from "../../utils/css";
const buttonVariants = cva(
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90 dark:bg-destructive/60",
outline:
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
+ "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
diff --git a/apps/browser-extension/src/components/ui/input.tsx b/apps/browser-extension/src/components/ui/input.tsx
index 5751b004..b3463e20 100644
--- a/apps/browser-extension/src/components/ui/input.tsx
+++ b/apps/browser-extension/src/components/ui/input.tsx
@@ -10,7 +10,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-[color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
className,
)}
ref={ref}
diff --git a/apps/browser-extension/src/components/ui/switch.tsx b/apps/browser-extension/src/components/ui/switch.tsx
index f2016ed0..ff7d65e8 100644
--- a/apps/browser-extension/src/components/ui/switch.tsx
+++ b/apps/browser-extension/src/components/ui/switch.tsx
@@ -9,7 +9,7 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
- "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
className,
)}
{...props}
@@ -17,7 +17,7 @@ const Switch = React.forwardRef<
>
<SwitchPrimitives.Thumb
className={cn(
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-muted-foreground",
)}
/>
</SwitchPrimitives.Root>
diff --git a/apps/browser-extension/src/components/ui/textarea.tsx b/apps/browser-extension/src/components/ui/textarea.tsx
index 6651e331..2d3c4c04 100644
--- a/apps/browser-extension/src/components/ui/textarea.tsx
+++ b/apps/browser-extension/src/components/ui/textarea.tsx
@@ -9,7 +9,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
return (
<textarea
className={cn(
- "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
className,
)}
ref={ref}